From: Dana Jansens Date: Tue, 5 Jun 2007 18:48:14 +0000 (+0000) Subject: ignore control_l/r shift_l/r and caps_lock bindings. Control, Shift and NumLock are... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=ca0c9272018656f36e0c3b2a61324fa06fd6f143;p=chaz%2Fopenbox ignore control_l/r shift_l/r and caps_lock bindings. Control, Shift and NumLock are hardcoded to the modmasks for them. --- diff --git a/openbox/modkeys.c b/openbox/modkeys.c index 356ef886..04c6b86b 100644 --- a/openbox/modkeys.c +++ b/openbox/modkeys.c @@ -77,6 +77,11 @@ void modkeys_startup(gboolean reconfigure) } } } + + /* CapsLock, Shift, and Control are special and hard-coded */ + modkeys_keys[OB_MODKEY_KEY_CAPSLOCK] = LockMask; + modkeys_keys[OB_MODKEY_KEY_SHIFT] = ShiftMask; + modkeys_keys[OB_MODKEY_KEY_CONTROL] = ControlMask; } void modkeys_shutdown(gboolean reconfigure) @@ -130,12 +135,6 @@ static void set_modkey_mask(guchar mask, KeySym sym) modkeys_keys[OB_MODKEY_KEY_NUMLOCK] |= mask; else if (sym == XK_Scroll_Lock) modkeys_keys[OB_MODKEY_KEY_SCROLLLOCK] |= mask; - else if (sym == XK_Caps_Lock) - modkeys_keys[OB_MODKEY_KEY_CAPSLOCK] |= mask; - else if (sym == XK_Shift_L || sym == XK_Shift_R) - modkeys_keys[OB_MODKEY_KEY_SHIFT] |= mask; - else if (sym == XK_Control_L || sym == XK_Control_R) - modkeys_keys[OB_MODKEY_KEY_CONTROL] |= mask; else if (sym == XK_Super_L || sym == XK_Super_R) modkeys_keys[OB_MODKEY_KEY_SUPER] |= mask; else if (sym == XK_Hyper_L || sym == XK_Hyper_R) @@ -144,6 +143,7 @@ static void set_modkey_mask(guchar mask, KeySym sym) modkeys_keys[OB_MODKEY_KEY_ALT] |= mask; else if (sym == XK_Meta_L || sym == XK_Meta_R) modkeys_keys[OB_MODKEY_KEY_META] |= mask; + /* CapsLock, Shift, and Control are special and hard-coded */ } KeyCode modkeys_sym_to_code(KeySym sym) diff --git a/openbox/modkeys.h b/openbox/modkeys.h index 8f222369..dc72f28e 100644 --- a/openbox/modkeys.h +++ b/openbox/modkeys.h @@ -22,7 +22,8 @@ #include #include -/*! These keys are bound to the modifier masks in any fashion */ +/*! These keys are bound to the modifier masks in any fashion, + except for CapsLock, Shift, and Control. */ typedef enum { OB_MODKEY_KEY_CAPSLOCK, OB_MODKEY_KEY_NUMLOCK,