Hotkey system
trying to make a hotkey system, i'm not sure how to get the user's key input after a click of a button
6 Replies
What UI framework?
Oops, sorry.
So WinForms doesn't really have event bubbling.
The approaches I can think of: 1. subscribe all controls to your keyboard event or 2. reset the focus to some main control instead of letting (ie. your
Button
) maintain focus after being clicked.
There are global hotkeys that work for out-of-app, keyboard accelerators, etc that might play more nicely depending on what you're doing.I was able to achieve what I wanted using this:
Yeah, that's dipping into win32api.
But it is a relatively simple solution otherwise.
yep
alright i'll close the post now, thanks for the help