Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-09-10 13:38:12 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-09-10 13:38:12 +0300
commit037df2aaa6b36aa4f4e78f3ef978a8196be0057d (patch)
tree7135697e4d8e38bc2989b604402b78127e7449c0 /intern
parent2820ab5a8fdb6d5d4e6778d7019a7989bc03264f (diff)
Fix T49303: Fix T49314: More issues with new handling of X11 shortcuts.
This commits changes two things: * It adds more keysyms preferably taken from XLookupKeysym than XLookupString (namely, all numpad ones). * It falls back to keysyms from XLookupKeysym in other cases, when XLookupString does not produce anything we know of. Finding the correct balance here is far from easy, but think we are comming rather close to it now...
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 9a2dcfc9687..30cfac08153 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -902,7 +902,8 @@ GHOST_SystemX11::processEvent(XEvent *xe)
ascii = '\0';
}
- /* Only allow a very limited set of keys from XLookupKeysym, all others we take from XLookupString... */
+ /* Only allow a limited set of keys from XLookupKeysym, all others we take from XLookupString,
+ * unless it gives unknown key... */
gkey = convertXKey(key_sym);
switch (gkey) {
case GHOST_kKeyRightAlt:
@@ -922,9 +923,28 @@ GHOST_SystemX11::processEvent(XEvent *xe)
case GHOST_kKey7:
case GHOST_kKey8:
case GHOST_kKey9:
+ case GHOST_kKeyNumpad0:
+ case GHOST_kKeyNumpad1:
+ case GHOST_kKeyNumpad2:
+ case GHOST_kKeyNumpad3:
+ case GHOST_kKeyNumpad4:
+ case GHOST_kKeyNumpad5:
+ case GHOST_kKeyNumpad6:
+ case GHOST_kKeyNumpad7:
+ case GHOST_kKeyNumpad8:
+ case GHOST_kKeyNumpad9:
+ case GHOST_kKeyNumpadPeriod:
+ case GHOST_kKeyNumpadEnter:
+ case GHOST_kKeyNumpadPlus:
+ case GHOST_kKeyNumpadMinus:
+ case GHOST_kKeyNumpadAsterisk:
+ case GHOST_kKeyNumpadSlash:
break;
default:
- gkey = convertXKey(key_sym_str);
+ GHOST_TKey gkey_str = convertXKey(key_sym_str);
+ if (gkey_str != GHOST_kKeyUnknown) {
+ gkey = gkey_str;
+ }
}
#else
/* In keyboards like latin ones,