From c0e1a3cdb4696b4dd5c254ac2ff332f8e6d15fcc Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 14:23:17 +0200 Subject: [PATCH] Keysyms for dead acute and dead grave keys to better support int'l keyboards --- panda/src/x11display/x11GraphicsWindow.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 785ab51ff0..709911479e 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1641,6 +1641,7 @@ map_button(KeySym key) const { case XK_ampersand: return KeyboardButton::ascii_key('&'); case XK_apostrophe: // == XK_quoteright + case XK_dead_acute: // on int'l keyboards return KeyboardButton::ascii_key('\''); case XK_parenleft: return KeyboardButton::ascii_key('('); @@ -1772,6 +1773,7 @@ map_button(KeySym key) const { case XK_underscore: return KeyboardButton::ascii_key('_'); case XK_grave: // == XK_quoteleft + case XK_dead_grave: // on int'l keyboards return KeyboardButton::ascii_key('`'); case XK_a: return KeyboardButton::ascii_key('a'); @@ -1914,15 +1916,20 @@ map_button(KeySym key) const { case XK_Alt_R: return KeyboardButton::ralt(); case XK_Meta_L: + case XK_Super_L: return KeyboardButton::lmeta(); case XK_Meta_R: + case XK_Super_R: return KeyboardButton::rmeta(); case XK_Caps_Lock: return KeyboardButton::caps_lock(); case XK_Shift_Lock: return KeyboardButton::shift_lock(); } - + if (x11display_cat.is_debug()) { + x11display_cat.debug() + << "Unrecognized keysym 0x" << hex << key << dec << "\n"; + } return ButtonHandle::none(); }