From a97f6faba501a3e934510e9d1c27e331d2c48301 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 7 Jun 2007 04:48:53 +0000 Subject: [PATCH] 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. --- openbox/modkeys.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 */ } -- 2.45.2