Found by a code review of [bugs:#87], in code that fix did not touch (u_dzVclUtils).
1. Table entries that do nothing or name keys no keyboard sends. Measured with MapVirtualKey and GetKeyNameText, the name being what the scan code gives with and without the extended flag (one machine, en-GB):
| Key | Scan code | Without extended flag | With extended flag |
|---|---|---|---|
| VK_LEFT ($25) | $4B | NUM 4 | LEFT |
| VK_NUMLOCK ($90) | $45 | Pause | Num Lock |
| VK_DIVIDE ($6F) | $35 | / | NUM DIVIDE |
| VK_MULTIPLY ($6A) | $37 | NUMMULT | Prnt Scrn |
| VK_PAUSE ($13) | 0 | (none) | (none) |
| VK_PRINT ($2A) | 0 | (none) | (none) |
| VK_SNAPSHOT ($2C) | $54 | (none) | <00> |
What the hot key control itself shows for these keys, and what it stores when they are pressed, is not measured.
2. The list of extended keys exists twice. THotkey_SetHotkey has its own Key in [VK_LEFT, ..., VK_DIVIDE] set next to EXT_KEYS. A key added to or corrected in one but not the other breaks the round trip SetHotkey / GetHotkey.
3. THotkey_SetHotkey changes the control's rules for invalid key combinations. It adds or removes hkExt through the Modifiers property, and TCustomHotKey.SetModifiers (Vcl.ComCtrls, Delphi 12) sends HKM_SETRULES with the new modifiers as the fallback for invalid combinations, before it sends HKM_SETHOTKEY. After THotkey_SetHotkey(hk, Ctrl+Left) the fallback is Ctrl + extended instead of the component's Modifiers default [hkAlt]. Read in the source, the effect on what a user then types is not measured.
Expected: tables that only hold keys the control can show and that have a twin, one list of extended keys, and setting the extended flag without changing the rules (e.g. HKM_SETHOTKEY with HOTKEYF_EXT directly).