Let's say I have a form that has a menu bar on it. I have an item in the menu bar, TMenuItem, for which I can assign a keyboard shortcut, for example, "Ctrl-I". But when I assign the βShortCutβ property to TMenuItem, it seems I just changed the appearance of the menu item to show the shortcut code, rather than automatically listening to the shortcut key press and running my ActionManager code.
Today my google-fu is failing, I only find articles on how to assign global hotkeys for Windows, and not how to assign hotkeys to applications that only work in active form.
Can someone outline for me the steps necessary to add a hotkey, in addition to adding a shortcut property to the menu. I think somewhere I probably need to set up a form to listen for keyboard input and capture a keystroke and respond to it? But I'm not quite sure where and what Delphi can do.
source
share