How do I fire a hotkey with a control key held down?
For example - I am trying to fire something with Control + Alt + Up, but I want to be able to do it repeatedly while holding down control and alt, but pressing the up key.
I'd like it to fire when the Up key goes up.
How do I fire a hotkey with a control key held down?
-
- Posts: 2
- Joined: 17 Nov 2017, 06:57
- Contact:
Re: How do I fire a hotkey with a control key held down?
Hallo,
try:
try:
Code: Select all
^!Up::Send, fire
^!Up Up::Send, fire
Turns out it was my own sillyness.
Sorry, turns out it was my own sillyness. Didn't need any special code. The function I was calling was waiting for the control, shift, and alt keys to come up. Ooops!
The default behaviour of:
^!Up::
Seems to work just fine.
RunPenguinoCommand( command )
{
; Wait for keys to be up - may want to add windows key here
; Was hitting issue with command prompt commands, Ctrl was still held down when Penguin tried to hit Escape
; This made bad things happen!
; Ideally might want to wait for ALL keys to be up
KeyWait Control
KeyWait Alt
KeyWait Shift
ComObjCreate("DragonFns.Functions").SendMessageToKeyLogger(command)
}
#If WinActive("ahk_exe devenv.exe" )
^!Down::RunPenguinoCommandImmediate("devenvCommands.nextfoo")
^!Up::RunPenguinoCommandImmediate("devenvCommands.previousfoo")
The default behaviour of:
^!Up::
Seems to work just fine.
RunPenguinoCommand( command )
{
; Wait for keys to be up - may want to add windows key here
; Was hitting issue with command prompt commands, Ctrl was still held down when Penguin tried to hit Escape
; This made bad things happen!
; Ideally might want to wait for ALL keys to be up
KeyWait Control
KeyWait Alt
KeyWait Shift
ComObjCreate("DragonFns.Functions").SendMessageToKeyLogger(command)
}
#If WinActive("ahk_exe devenv.exe" )
^!Down::RunPenguinoCommandImmediate("devenvCommands.nextfoo")
^!Up::RunPenguinoCommandImmediate("devenvCommands.previousfoo")