forked from Mirrors/openclonk
Fix accelerator hotkeys.
They were broken since keys aren't passed as VK-codes but as scancodes now. Tested under Windows only.stable-5.4
parent
8d1fbd1401
commit
a9a2470ace
|
@ -526,8 +526,10 @@ namespace C4GUI
|
|||
|
||||
bool Dialog::KeyHotkey(const C4KeyCodeEx &key)
|
||||
{
|
||||
WORD wKey = WORD(key.Key);
|
||||
StdStrBuf sKey = C4KeyCodeEx::KeyCode2String(key.Key, true, true);
|
||||
// do hotkey procs for standard alphanumerics only
|
||||
if (sKey.getLength() != 1) return false;
|
||||
WORD wKey = WORD(*sKey.getData());
|
||||
if (Inside<WORD>(TOUPPERIFX11(wKey), 'A', 'Z')) if (OnHotkey(char(TOUPPERIFX11(wKey)))) return true;
|
||||
if (Inside<WORD>(TOUPPERIFX11(wKey), '0', '9')) if (OnHotkey(char(TOUPPERIFX11(wKey)))) return true;
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue