I’ve been playing around with the IShellLink interface, and am confused about how hotkey combinations are mapped.
When only single hotkeys are applied, the return value corresponds to the documented virtual key code; e.g. F5 == 0x74
However, when a combination is used, an undocumented value is returned that I’m having trouble deciphering; e.g. CTRL + ALT + A == 0x641
What operation is used to combine multiple virtual key codes?
This is explained in the documentation for
IShellLink::GetHotkey:These flags are defined so:
So, when you take the CTRL and ALT flags to the high order byte of a word, and combine them, you get
0x0200 | 0x0400which equals0x0600. Combine this with the virtual key code for A which is0x41and you have your magic constant of0x0641.