From c884dbb74beecd212366db5bef14cef09b7eb39e Mon Sep 17 00:00:00 2001 From: Khudyakov Alexey Date: Tue, 23 Jun 2009 16:46:53 +0000 Subject: [PATCH] Clean Xkb masks in X.A.Submap Xkb adds its own mask and prevent Submap keybindings from normal functioning when alternate layout is used. This patch cleans these masks. --- XMonad/Actions/Submap.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XMonad/Actions/Submap.hs b/XMonad/Actions/Submap.hs index 469f97de..a4e2cd9b 100644 --- a/XMonad/Actions/Submap.hs +++ b/XMonad/Actions/Submap.hs @@ -18,7 +18,7 @@ module XMonad.Actions.Submap ( submap, submapDefault ) where - +import Data.Bits import XMonad hiding (keys) import qualified Data.Map as M import Control.Monad.Fix (fix) @@ -74,8 +74,8 @@ submapDefault def keys = do if isModifierKey keysym then nextkey else return (m, keysym) - - m' <- cleanMask m + -- Remove num lock mask and Xkb group state bits + m' <- cleanMask $ m .&. ((1 `shiftL` 12) - 1) maybe def id (M.lookup (m', s) keys) io $ ungrabKeyboard d currentTime