HotKey  Top  Previous  Next



Success = HotKey(WindowID.i, ID.w, Key$)


Associates or removes a keyboard hot-key combination with a WindowID (HWND). ID is the identifier of the #WM_COMMAND message that will be posted to WindowID's message queue or if WindowID is zero then the hot-key will be an application global hot-key and will be posted to the thread's active root window. ID can also be '-1' to remove/disable the hot-key described in Key$.

Key$ is a text string describing the key combination that triggers the posted ID. Key$ can be written in practically any format, for example "Ctrl+S" would trigger ID to be posted when the Control key and 'S' keys are pressed. The space character and following list of characters are supported as key name delimiters:-

 +  |  -  ,  .  ~  ^  /  \  :  ;  

The Control key, Alt key and Shift key can be combined with any of the alphanumeric keys or following special key descriptions: -

















































































































If Key$ is an empty string then all the hot-keys for that window (or all global hot-keys if WindowID is equal to zero) will be cleared.


Returns true for success, zero for failure.



General Index