mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-13 23:25:27 +08:00
Added KeySym <-> Unicode mappings. Changed code to use those
mappings to better support Unicode key events.
This commit is contained in:
@@ -720,10 +720,17 @@ CXWindowsPrimaryScreen::mapKey(XKeyEvent* event) const
|
||||
// MISCELLANY
|
||||
return static_cast<KeyID>(keysym - 0xff00 + 0xef00);
|
||||
|
||||
default:
|
||||
// FIXME -- support unicode characters
|
||||
default: {
|
||||
// lookup character in table
|
||||
UInt32 key = CXWindowsUtil::mapKeySymToUCS4(keysym);
|
||||
if (key != 0x0000ffff) {
|
||||
return static_cast<KeyID>(key);
|
||||
}
|
||||
|
||||
// unknown character
|
||||
return kKeyNone;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ButtonID
|
||||
|
||||
Reference in New Issue
Block a user