Special Keyboard Keys on Win 10

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Special Keyboard Keys on Win 10

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.

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?
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Special Keyboard Keys on Win 10

06 Oct 2020, 10:52

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).
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Re: Special Keyboard Keys on Win 10

06 Oct 2020, 16:49

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], RussF and 302 guests