Special Keyboard Keys on Win 10
Posted: 06 Oct 2020, 10:40
On my keyboard, I have a Power button and a Standby button next to the media keys.
When I set up hotkeys, the media keys work and get intercepted properly.
However, if I use the Sleep hotkey, and attach a messagebox to it, the computer goes to sleep, and when I wake it up, I can see the messagebox there waiting for me, so I know the hotkey is getting caught by ahk, but the computer still sleeps.
I never had this problem on Windows 7. So, Windows 10 is not allowing ahk to completely intercept the hotkey, it seems.
What is the trick for Windows 10 and the special Standby or Power buttons on my keyboard?
When I set up hotkeys, the media keys work and get intercepted properly.
However, if I use the Sleep hotkey, and attach a messagebox to it, the computer goes to sleep, and when I wake it up, I can see the messagebox there waiting for me, so I know the hotkey is getting caught by ahk, but the computer still sleeps.
I never had this problem on Windows 7. So, Windows 10 is not allowing ahk to completely intercept the hotkey, it seems.
Code: Select all
Launch_Mail::msgbox, Email Button
Sleep:: msgbox, Sleep button ;Standby button on keyboard
SC15E::msgbox, what did you push? ;supposed to be the power button on the keyboard
#SC15E::msgbox, Power button? ;win+POWER KEY