Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Hotkeys with modifiers - how do they work?


  • Please log in to reply
No replies to this topic
Riv
  • Members
  • 1 posts
  • Last active: Jan 07 2017 09:55 PM
  • Joined: 30 Nov 2013

I need some basic hotkey functionality in my C++ app, and I ran into this small issue:

 

If I register a hotkey for, say, Alt+Q (using RegisterHotKey api), and handle it by sending an 'A' keystroke (via SendInput), the target window receives an Alt+A because, of course, alt is still held down. How does AHK solve this issue? Does it emit an "alt up"? In that case, what would happen if I press Q again without releasing and pressing alt again, would it still count as Alt+Q or would it be just Q?