I'm trying to do something simple in Windows 10: hotkeys to reprogram buttons on my remote.
I want the "Media_Play_Pause" button to send {space} and the "Browser_Search" button to send "F" (used for full screen). The hotkeys run fine but they don't override the default Windows actions.
Here's my script:
;pause/play button = space
vkB3::{space}
;Search button = full screen
*vkAA::f
And here's what it's doing:
Play/Pause:
B3 122 h d 12.81 Media_Play_Pause
20 039 i d 0.00 Space
20 039 i u 0.00 Space
B3 122 a u 0.20 Media_Play_Pause
Search:
AA 165 h d 2.19 Browser_Search
46 021 i d 0.00 f
5C 05C a d 0.00 RWin
53 01F a d 0.00 s
53 01F a u 0.00 s
5C 05C a u 0.00 RWin
AA 165 h u 0.22 Browser_Search Cortana
46 021 i u 0.00 f
Any way to fix this?
AHK will not override Windows default hotkeys
Re: AHK will not override Windows default hotkeys
Syntax!
Code: Select all
;pause/play button = space
vkB3::Send, {space}
;Search button = full screen
*vkAA::Send, f
Re: AHK will not override Windows default hotkeys
Tried that. Still same problem.
Re: AHK will not override Windows default hotkeys
This is very strange!
Would you mind to test this code and report result?
Btw.: I experience no problems!
Would you mind to test this code and report result?
Btw.: I experience no problems!
Re: AHK will not override Windows default hotkeys
both LWin & Right:: and #Right:: produce the same result:
5B 15B d 4.77 LWin
27 14D h d 0.22 Right
11 01D i d 0.00 Control
11 01D i u 0.00 Control
5B 15B i u 0.00 LWin
23 14F i d 0.00 End
23 14F i u 0.00 End
11 01D i d 0.00 Control
5B 15B i d 0.00 LWin
11 01D i u 0.00 Control
27 14D s u 0.16 Right
5B 15B u 0.06 LWin
A2 01D i d 0.00 LControl
A2 01D i u 0.00 LControl
I also tried this and it seems to work fine and override the windows-d command fine:
#d::
send, d
return
It only seems to create a problem when AHK is trying to take over multimedia keys.
5B 15B d 4.77 LWin
27 14D h d 0.22 Right
11 01D i d 0.00 Control
11 01D i u 0.00 Control
5B 15B i u 0.00 LWin
23 14F i d 0.00 End
23 14F i u 0.00 End
11 01D i d 0.00 Control
5B 15B i d 0.00 LWin
11 01D i u 0.00 Control
27 14D s u 0.16 Right
5B 15B u 0.06 LWin
A2 01D i d 0.00 LControl
A2 01D i u 0.00 LControl
I also tried this and it seems to work fine and override the windows-d command fine:
#d::
send, d
return
It only seems to create a problem when AHK is trying to take over multimedia keys.
Re: AHK will not override Windows default hotkeys
Did Win + Right keys in any case trigger Start menu?bkrstmuse wrote:both LWin & Right:: and #Right:: produce the same result:
P.s.: To override multimedia keys you might try:
Code: Select all
;pause/play button = space
vkB3::Send % " "
;Search button = full screen
*vkAA::Send % "f"
Re: AHK will not override Windows default hotkeys
Wow, running as administrator did the trick! Thanks!rommmcek wrote: ↑14 Jan 2019, 03:53Did Win + Right keys in any case trigger Start menu?bkrstmuse wrote:both LWin & Right:: and #Right:: produce the same result:
P.s.: To override multimedia keys you might try:P.p.s.: What about testing it with a different keyboard (hardware)?, besides when having unexpected results I tend to test running script as administrator.Code: Select all
;pause/play button = space vkB3::Send % " " ;Search button = full screen *vkAA::Send % "f"
Anyway, here are the answers to your questions:
1. Win + Right keys did not trigger anything, and it seems to have overridden the default "snap to right" Windows function.
2. I tried your new code and it still does the same thing.
3. I tried using the media buttons on different hardware (logitech k270) and for some reason those buttons don't trigger AHK. The keylogger doesn't detect it at all. Weird.
Re: AHK will not override Windows default hotkeys
Thanks for the feedback!
Yeah, modern Windows (Win8+) require sometimes admin. Probably depending on security settings, but I don't know much about that.
For other hardware (keyboard), try at least to log off or even restart OS, if you didn't do that already.
Yeah, modern Windows (Win8+) require sometimes admin. Probably depending on security settings, but I don't know much about that.
For other hardware (keyboard), try at least to log off or even restart OS, if you didn't do that already.
Who is online
Users browsing this forum: balawi28 and 229 guests