Map option to alt and command to meta keys on macOS (#1158)

This commit is contained in:
Marcin Michalski 2021-08-22 00:38:58 +02:00 committed by GitHub
parent 89dc0f87eb
commit f173b03dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,6 +88,11 @@ X11Window::X11Window()
m_keyMap[XK_Meta_R] = Fw::KeyMeta;
m_keyMap[XK_Menu] = Fw::KeyMenu;
#if defined(__APPLE__)
m_keyMap[65406] = Fw::KeyAlt;// Option
m_keyMap[65511] = Fw::KeyMeta;// Command
#endif
// ascii characters
m_keyMap[XK_space] = Fw::KeySpace;
m_keyMap[XK_exclam] = Fw::KeyExclamation;