diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Internal/Keys.hs | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 1d3baf4..d340062 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -133,22 +133,19 @@ keymap = runKeys $ do bind xK_apostrophe $ do justMod $ doc "Jumps between marks." $ - subkeys $ do - bind xK_apostrophe $ - (noMod -|- justMod) $ - doc "Jumps to the last window." - jumpToLast - mapAlpha 0 jumpToMark + mapNextString $ \_ str -> + case str of + ['\''] -> jumpToLast + [ch] | isAlphaNum ch -> jumpToMark ch + _ -> return () shiftMod $ doc "Swap the current window with a mark." $ - subkeys $ do - bind xK_apostrophe $ - (noMod -|- shiftMod -|- rawMask shiftMask) $ - doc "Swap the current window with the last mark." - swapWithLastMark - - mapAlpha shiftMask swapWithMark + mapNextString $ \_ str -> + case str of + ['\''] -> swapWithLastMark + [ch] | isAlphaNum ch -> swapWithMark ch + _ -> return () bind xK_BackSpace $ do -- The only raw keybinding. Meant to get a terminal to unbrick XMonad if @@ -356,8 +353,10 @@ keymap = runKeys $ do bind xK_m $ do justMod $ doc "Mark the current window with the next typed character." $ - subkeys $ - mapAlpha 0 markCurrentWindow + mapNextString $ \_ str -> + case str of + [ch] | isAlphaNum ch -> markCurrentWindow ch + _ -> return () bind xK_n $ do justMod $ |