Do you happen to have example code of how to add a hotkey to buttons? I would like to take a dialog that I have written, and have it respond when a particular keystroke is hit. For example, if the dialog is just sitting there, and the user hits the escape key, I’d like that to be interpreted the same as if they activated the cancel button on my dialog box. Similarly, I’d like Alt- keys to work: for the OK button, I’d like alt-k to be interpreted the same as if the user had clicked it; and other fields on the dialog box become the focus when an assigned Alt- key was hit.
- You must be logged in to reply to this topic.