diff options
Diffstat (limited to 'src/Internal/Keys.hs')
| -rw-r--r-- | src/Internal/Keys.hs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index ce48dfd..49b85d1 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -494,6 +494,7 @@ windowSpecificBindings config = do w <- lift ask let configureIf b k = tell =<< lift (b --> return (runKeys k config)) + emitKey = flip sendKey w configureIf (flip elem browsers <$> className) $ do @@ -521,46 +522,46 @@ windowSpecificBindings config = do let mods = permuteMods [shiftMask, controlMask, 0] bind xK_h $ do - rawMask controlMask $ sendKey (0, xK_BackSpace) w + rawMask controlMask $ emitKey (0, xK_BackSpace) forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ sendKey (mask, xK_Left) w + rawMask (altMask .|. mask) $ emitKey (mask, xK_Left) bind xK_j $ forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ sendKey (mask, xK_Down) w + rawMask (altMask .|. mask) $ emitKey (mask, xK_Down) bind xK_k $ forM_ mods $ \mask -> - rawMask (altMask .|.mask) $ sendKey (mask, xK_Up) w + rawMask (altMask .|.mask) $ emitKey (mask, xK_Up) bind xK_l $ forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ sendKey (mask, xK_Right) w + rawMask (altMask .|. mask) $ emitKey (mask, xK_Right) bind xK_u $ - rawMask controlMask $ sendKey (controlMask .|. shiftMask, xK_BackSpace) w + rawMask controlMask $ emitKey (controlMask .|. shiftMask, xK_BackSpace) bind xK_w $ - rawMask controlMask $ sendKey (controlMask, xK_BackSpace) w + rawMask controlMask $ emitKey (controlMask, xK_BackSpace) bind xK_b $ do - rawMask controlMask $ sendKey (controlMask, xK_Left) w + rawMask controlMask $ emitKey (controlMask, xK_Left) rawMask (controlMask .|. shiftMask) $ - sendKey (controlMask .|. shiftMask, xK_Left) w + emitKey (controlMask .|. shiftMask, xK_Left) bind xK_e $ do - rawMask controlMask $ sendKey (controlMask, xK_Right) w + rawMask controlMask $ emitKey (controlMask, xK_Right) rawMask (controlMask .|. shiftMask) $ - sendKey (controlMask .|. shiftMask, xK_Right) w + emitKey (controlMask .|. shiftMask, xK_Right) bind xK_dollar $ - rawMask controlMask $ sendKey (0, xK_End) w + rawMask controlMask $ emitKey (0, xK_End) bind xK_at $ - rawMask (controlMask .|. shiftMask) $ sendKey (0, xK_Home) w + rawMask (controlMask .|. shiftMask) $ emitKey (0, xK_Home) bind xK_d $ - rawMask controlMask $ sendKey (controlMask, xK_w) w + rawMask controlMask $ emitKey (controlMask, xK_w) bind xK_F2 $ -- Experimental. @@ -569,7 +570,7 @@ windowSpecificBindings config = do -- Add a binding to xev as a test. configureIf (title =? "Event Tester") $ bind xK_F2 $ - noMod $ sendKey (controlMask, xK_F2) w + noMod $ emitKey (controlMask, xK_F2) where browsers = ["Google-chrome", "Brave-browser", "firefox-default"] |