source: trunk/dports/xfce/xfwm4/files/patch-keyboard.c @ 29366

Last change on this file since 29366 was 29366, checked in by afb@…, 13 years ago

if keymap doesn't have any alt keys mapped at all, use the default mapping for option modifier instead of no modifier

  • Property svn:eol-style set to native
File size: 806 bytes
Line 
1--- src/keyboard.c.orig 2007-09-22 13:32:29.000000000 +0200
2+++ src/keyboard.c      2007-09-22 13:51:01.000000000 +0200
3@@ -255,6 +255,7 @@
4     int max_keycode;
5 
6     AltMask = 0;
7+    int ModeMask = 0;
8     MetaMask = 0;
9     NumLockMask = 0;
10     ScrollLockMask = 0;
11@@ -303,9 +304,17 @@
12                 {
13                     AltMask |= (1 << ( i / modmap->max_keypermod));
14                 }
15+                else if (syms[j] == XK_Mode_switch)
16+                {
17+                    ModeMask |= (1 << ( i / modmap->max_keypermod));
18+                }
19             }
20         }
21     }
22+     
23+    if (AltMask == 0) /* if we don't have any alt keys, use the option keys */
24+        AltMask = ModeMask;
25+   
26     KeyMask =
27         ControlMask | ShiftMask | AltMask | MetaMask | SuperMask | HyperMask;
28 
Note: See TracBrowser for help on using the repository browser.