0
votes

I remapped a few combinations of the menu key and other alphanumeric keys with AutoHotKey, but in doing so it disabled the normal use of the menu key. Is there a way that I can remap combinations of the key, but leave its normal use the same with AHK. I'll put the code I'm currently using with it below. Thanks

AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440)  ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
1

1 Answers

1
votes

From the docs that user3419297 mentioned, you can get around this by putting AppsKey::AppsKey at the end of your script. However, this will cause the menu key to do its normal function only once you release the Menu key, provided that you have not hit any other keys during that time (as opposed to when you initially push it down). If this change in functionality did not occur, you would be triggering the menu key's standard function every time you attempted to hold it down in order to trigger any of your hotkeys.

Final Script

AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440)  ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
AppsKey::AppsKey