mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
X.A.Submap, X.Prompt: Use cleanKeyMask
This replaces the custom `cleanMask` extension in these modules—which only filtered out XKB group bits and Button5Mask¹—with the new `cleanKeyMask` which additionally filters out all mouse buttons, as these aren't relevant for key bindings. ¹) Filtering out Button5Mask was probably an off-by-one mistake. Fixes: https://github.com/xmonad/xmonad-contrib/issues/290 Related: https://github.com/xmonad/xmonad-contrib/pull/590
This commit is contained in:
@@ -27,7 +27,7 @@ module XMonad.Actions.Submap (
|
||||
import Data.Bits
|
||||
import qualified Data.Map as M
|
||||
import XMonad hiding (keys)
|
||||
import XMonad.Prelude (fix, fromMaybe, keyToString)
|
||||
import XMonad.Prelude (fix, fromMaybe, keyToString, cleanKeyMask)
|
||||
import XMonad.Util.XUtils
|
||||
|
||||
{- $usage
|
||||
@@ -138,8 +138,7 @@ waitForKeyPress = do
|
||||
then nextkey
|
||||
else return (m, keysym)
|
||||
_ -> return (0, 0)
|
||||
-- Remove num lock mask and Xkb group state bits
|
||||
m' <- cleanMask $ m .&. ((1 `shiftL` 12) - 1)
|
||||
m' <- cleanKeyMask <*> pure m
|
||||
io $ do ungrabPointer dpy currentTime
|
||||
ungrabKeyboard dpy currentTime
|
||||
sync dpy False
|
||||
|
Reference in New Issue
Block a user