mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 20:51:52 -07:00
Fix type of additionalKeys and removeKeys functions
This commit is contained in:
@@ -80,7 +80,7 @@ import Text.ParserCombinators.ReadP
|
|||||||
-- Note that, unlike in xmonad 0.4 and previous, you can't use modMask to refer
|
-- Note that, unlike in xmonad 0.4 and previous, you can't use modMask to refer
|
||||||
-- to the modMask you configured earlier. You must specify mod1Mask (or
|
-- to the modMask you configured earlier. You must specify mod1Mask (or
|
||||||
-- whichever), or add your own @myModMask = mod1Mask@ line.
|
-- whichever), or add your own @myModMask = mod1Mask@ line.
|
||||||
additionalKeys :: XConfig a -> [((ButtonMask, KeySym), X ())] -> XConfig a
|
additionalKeys :: XConfig a -> [((KeyMask, KeySym), X ())] -> XConfig a
|
||||||
additionalKeys conf keyList =
|
additionalKeys conf keyList =
|
||||||
conf { keys = \cnf -> M.union (M.fromList keyList) (keys conf cnf) }
|
conf { keys = \cnf -> M.union (M.fromList keyList) (keys conf cnf) }
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ additionalKeysP conf keyList =
|
|||||||
--
|
--
|
||||||
-- > main = xmonad $ def { terminal = "urxvt" }
|
-- > main = xmonad $ def { terminal = "urxvt" }
|
||||||
-- > `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]]
|
-- > `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]]
|
||||||
removeKeys :: XConfig a -> [(ButtonMask, KeySym)] -> XConfig a
|
removeKeys :: XConfig a -> [(KeyMask, KeySym)] -> XConfig a
|
||||||
removeKeys conf keyList =
|
removeKeys conf keyList =
|
||||||
conf { keys = \cnf -> keys conf cnf `M.difference` M.fromList (zip keyList $ repeat ()) }
|
conf { keys = \cnf -> keys conf cnf `M.difference` M.fromList (zip keyList $ repeat ()) }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user