This request is used by the Session Manager to set a list of keyboard hot keys, searched for by the physical keyboard device driver. Up to 16 hot keys can be defined by the Session Manager for handling by the physical keyboard device driver. The new hot key is global (that is, it applies to all sessions). A hot key can be redefined by calling this function with the same Hot Key ID.
The combination of shift flags in the first WORD and scan codes in the second allows the Session Manager to set hot key combinations such as Alt+Esc. The hot key is triggered on detection of the scan code for the hot key break.
Note: If a DOS application has claimed hardware INT 9 or INT 50, the hot key is triggered on detection of the break scan code for the required shift key.
Hot key definition requests that have identical data definitions (shift state, make, and break scan codes) but different Hot Key IDs result in an INVALID_PARAMETER error code returned to the caller. Attempts to define a new or unique hot key when the maximum number is currently active also result in an INVALID_PARAMETER error code returned to the caller.
This IOCtl is successful only if performed by the process that initially invoked it, unless it is called with a Hot Key ID of -1. A Hot Key ID with a value of -1 acts like a toggle. The first time a call is made with -1, the Ctrl+Alt+Del keystrokes are disabled. The second time a call is made with -1, the keystroke sequences are enabled.
The caller of this interface must use caution in the key combinations selected because hot key definitions become system property, and any resulting characters normally produced by that key combination will no longer be available to applications.