Page 1 of 1

Special Keyboard Keys on Win 10

Posted: 06 Oct 2020, 10:40
by BGM
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.

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
What is the trick for Windows 10 and the special Standby or Power buttons on my keyboard?

Re: Special Keyboard Keys on Win 10

Posted: 06 Oct 2020, 10:52
by gregster
BGM wrote:
06 Oct 2020, 10:40
What is the trick for Windows 10 and the special Standby or Power buttons on my keyboard?
Iirc correctly, I had to de-activate the corresponding button on my keyboard somehwere in the Win10 settings (either keyboard or power settings, I think), before I could remap it without going into standby...

Edit:
The one keyboard button I have I de-activated in the Powersaving settings (I would post a screenshot, but it's all in german).

Re: Special Keyboard Keys on Win 10

Posted: 06 Oct 2020, 16:49
by BGM
Hey! That did the trick! I disabled both the power and sleep buttons in Power Settings, and now the keyboard special buttons work without turning off the computer.

Thanks! I never thought of that. Actually, I must have had them disabled on my Win7, because I figure the same thing would have happened then, too, now that I think about it this way.