Reading the help file, I discovered debugging methods using KeyHistory:
Code: Select all
Pause::
SendInput, ^{LWin}
KeyHistory
return
produced the follwing output
Code: Select all
VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
13 045 d 11.33 Pause PSPAD-utf8.ahk - SciTE4AutoHotkey
5B 15B i d 0.00 LWin
5B 15B i u 0.00 LWin
Now this looks like ^ is not sent at all which explains the behaviour (LWin first down -d-, then up -u-). Hey!
Reading further (Special Keys):
NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access.
This is interesting. I use a very special keyboard, as far as I know the only one with these features, being long out of production (Chicony KB-108), using a special keyboard driver everybody who owns this keyboard is looking for and has to reinstall it on a new machine (like me). Fortunately there was a nice guy who had one and put it online.
KB-108 has keys for ^x, ^c, ^v, which makes it very handy for my work (for example editing this text). When I noticed that it is no longer produced and none other has these features, not even from Chicony, I hunted for them at eBay and own a dozen of them now which should last until my end here on earth.
By the way, none of them ever let me down yet, the first, being in use since about 10 years, has had contact problems with those keys, but they are gone since I have ample spares.
Let's see if this is the cause of my behavior. An interesting hint here is that those hotkeys don't work in Scite4AutoHotkey. I try to force the Ctrl key this way:
Code: Select all
Pause::
SendInput, {Ctrl down}{LWin down}{LWin up}{Ctrl up}
KeyHistory
return
Nope, this produces crap:
Code: Select all
01 000 a d 3.78 LButton D:\data\dl\PSPAD-utf8.ahk - AutoHotkey v1.1.16.05
01 000 a u 1.15 LButton
No way. Another attempt:
Code: Select all
Pause::
;ControlSend, Pause, {Ctrl down}{LWin down}{LWin up}{Ctrl up} ; no way, doesn't work either
SendInput, {Ctrl down}
SendInput, {LWin down}
SendInput, {LWin up}
SendInput, {Ctrl up}
KeyHistory
return
That's it!
Code: Select all
13 045 d 1.70 Pause Kurznotiz ; where I started from to test the Pause key
A2 01D i d 0.00 LControl
5B 15B i d 0.00 LWin
5B 15B i u 0.00 LWin
A2 01D i u 0.00 LControl
Works brilliantly! Omit history:
Code: Select all
Pause::
SendInput, {Ctrl down}
SendInput, {LWin down}
SendInput, {LWin up}
SendInput, {Ctrl up}
return
Finally! Simple solution! Thank you all!