0

This is what I have tried. LCtrl is disabled successfully but all the shortcuts using Ctrl such as Ctrl+Z are also disabled. I don't know why {vkE8} isn't working.

#IfWinActive ahk_exe Photoshop.exe
    LCtrl::send, {Blind}{vkE8}
#IfWinActive

https://www.autohotkey.com/docs/v1/lib/_MenuMaskKey.htm

1 Answer 1

0

Try this:

; Sends Ctrl+key after releasing LControl:

#IfWinActive ahk_exe Photoshop.exe

    LCtrl:: Send {Blind}{vkE8}
    
    LCtrl Up::
        If (A_PriorKey != "LControl")
            Send ^%A_PriorKey%
    return

#IfWinActive

EDIT:

This should work:

#IfWinActive ahk_exe Photoshop.exe

    LCtrl:: Send {Blind}{vkE8}
    
    ; In this case it is necessary to define a combination by using "<^+key",
    ; to avoid that LControl loses its modifier function:

    <^a:: Send ^a

#IfWinActive

<^ means LControl.

2
  • It works. If I want to toggle a hotkey multiple times without releasing ctrl key. How can I do
    – rint
    Commented Apr 30 at 12:52
  • See EDIT in this answer.
    – Relax
    Commented Apr 30 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .