diff options
Diffstat (limited to 'src/Internal/KeysM.hs')
| -rw-r--r-- | src/Internal/KeysM.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Internal/KeysM.hs b/src/Internal/KeysM.hs index de48bee..0d7adce 100644 --- a/src/Internal/KeysM.hs +++ b/src/Internal/KeysM.hs @@ -43,8 +43,8 @@ instance HasConfig ButtonsM where getConfig = fst <$> ButtonsM get {- Generally it is assumed that the mod key shoud be pressed, but not always. -} -naked :: f -> BindingBuilder f () -naked = rawMask 0 +noMod :: f -> BindingBuilder f () +noMod = rawMask 0 rawMask :: KeyMask -> f -> BindingBuilder f () rawMask m x = BindingBuilder $ modify' (second ((m, x):)) @@ -339,6 +339,12 @@ hyperMod = maskMod hyperMask altgrMod :: f -> BindingBuilder f () altgrMod = maskMod altgrMask +{- Can combine two or more of the functions above to apply the same action to + - multiple masks. -} +(-|-) :: (f -> BindingBuilder f ()) -> + (f -> BindingBuilder f ()) -> + f -> BindingBuilder f () +(-|-) fn1 fn2 f = fn1 f >> fn2 f {- Meant for submapping, binds all alphanumeric charactes to (fn c). -} mapNumbersAndAlpha :: KeyMask -> (Char -> X ()) -> KeysM l () |