From the comments I see that you want to do a certain action (eg. open a form) when a certain key is pressed.
For this, you can assign your shortcut key to an TAction
and write the appropriate code in the TAction.OnExecute
Steps:
- Drop a
TActionManager
(or TActionList
)
- Double click on it (the
TActionManager
's editor appear). Press 'New Action' button.
- Set the
ShortCut
property to the desired value.
- Write the appropriate code in
OnExecute
event.
Note that on step 3. (perhaps) you (and most probably your users) will have trouble assigning the Enter
key to something so uncommon like opening a form. 'Enter' has a very defined meaning in Windows.
I'd suggest to assign a functional key (F2-F9 usually) and/or Ctrl+[the first letter of your form's name]
HTH