No problem here. You code works here with AHK v1 (it's not v2 code - that's why I moved your topic from AHK v2 help). As a side note, you should usually end your multi-line hotkeys with a
return (at least if there is any other code below it which doesn't belong in this hotkey subroutine) - but that's not the problem here.
This works as well:
Are you using your hotkeys in a specific app - perhaps it is elevated or a game which doesn't cooperate?
I assume that you are not getting an error message with the code above. What does
KeyHistory say, if you press
- or
= on your mouse while running your script above? Do these hotkeys work for you with the regular
- and
= keys?
Which AHK version are you using? Is it up-to-date?