From: Dana Jansens Date: Thu, 7 Jun 2007 04:48:53 +0000 (+0000) Subject: rather than making you hit both Key_L and Key_R if they are bound to different things... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a97f6faba501a3e934510e9d1c27e331d2c48301;p=chaz%2Fopenbox rather than making you hit both Key_L and Key_R if they are bound to different things, make Key_L take precidence. But if only Key_R is bound then use that. If Key_L is bound to multiple masks it'll use them all, but that won't work for Key_R right now. --- diff --git a/openbox/modkeys.c b/openbox/modkeys.c index 04c6b86b..18875d75 100644 --- a/openbox/modkeys.c +++ b/openbox/modkeys.c @@ -135,13 +135,17 @@ 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_Super_L || sym == XK_Super_R) + else if (sym == XK_Super_L || + (sym == XK_Super_R && !modkeys_keys[OB_MODKEY_KEY_SUPER])) modkeys_keys[OB_MODKEY_KEY_SUPER] |= mask; - else if (sym == XK_Hyper_L || sym == XK_Hyper_R) + else if (sym == XK_Hyper_L || + (sym == XK_Hyper_R && !modkeys_keys[OB_MODKEY_KEY_HYPER])) modkeys_keys[OB_MODKEY_KEY_HYPER] |= mask; - else if (sym == XK_Alt_L || sym == XK_Alt_R) + else if (sym == XK_Alt_L || + (sym == XK_Alt_R && !modkeys_keys[OB_MODKEY_KEY_ALT])) modkeys_keys[OB_MODKEY_KEY_ALT] |= mask; - else if (sym == XK_Meta_L || sym == XK_Meta_R) + else if (sym == XK_Meta_L || + (sym == XK_Meta_R && !modkeys_keys[OB_MODKEY_KEY_META])) modkeys_keys[OB_MODKEY_KEY_META] |= mask; /* CapsLock, Shift, and Control are special and hard-coded */ }