AutoHotKey temporarily rebind Winkey
- by wes
I've got a wireless keyboard that puts some media keys on top of the Function keys, so that by default F4 is actually lock (Rwin & l) and Fn+F4 is a real F4. So I'd like to basically switch those around. Here's what the key history shows:
VK SC Type Up/Dn Elapsed Key
-------------------------------------
73 03E d 17.32 F4 ; Fn+F4
73 03E u 0.16 F4
5C 15C d 2.96 Right Windows ; F4
4C 026 d 0.00 L
5C 15C u 0.13 Right Windows
4C 026 u 0.00 L
This doesn't do anything:
SC15C & SC026::MsgBox,Pressed F4
But this prints that I hit F4 then goes to the login screen:
Rwin & l::MsgBox,Pressed F4
So how can I stop it from switching to the login screen? Ideally I'd like F4 (which registers as Rwin & l) to just send F4, Fn+F4 to send Rwin & l, and also have them work with other keys (e.g., a manual !F4 should still close a window). Is this possible?