diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2011-05-15 21:33:26 +0200 |
---|---|---|
committer | Ben Boeckel <mathstuf@gmail.com> | 2011-05-15 21:33:26 +0200 |
commit | d3479b1865d7456b40e5f73427f7d55dbe53e0f6 (patch) | |
tree | 4c39d0a341b19b4c284bad0c0122938043402f44 /XMonad | |
parent | 08ba531488beb0cbca824dfa8cac225226e6a81b (diff) | |
download | XMonadContrib-d3479b1865d7456b40e5f73427f7d55dbe53e0f6.tar.gz XMonadContrib-d3479b1865d7456b40e5f73427f7d55dbe53e0f6.tar.xz XMonadContrib-d3479b1865d7456b40e5f73427f7d55dbe53e0f6.zip |
add-movenext-moveprev-bindings
Ignore-this: 2ad1ce1de0c2954b2946551dd62e6b3b
Adds default bindings to GridSelect for the moveNext and movePrev motions.
darcs-hash:20110515193326-24e3f-6ee8e182ecb4ba179bf038cef88e1d8d78f05e75.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Actions/GridSelect.hs | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs index d0d14db..66aa952 100644 --- a/XMonad/Actions/GridSelect.hs +++ b/XMonad/Actions/GridSelect.hs @@ -456,17 +456,21 @@ transformSearchString f = do defaultNavigation :: TwoD a (Maybe a) defaultNavigation = makeXEventhandler $ shadowWithKeymap navKeyMap navDefaultHandler where navKeyMap = M.fromList [ - ((0,xK_Escape), cancel) - ,((0,xK_Return), select) - ,((0,xK_slash) , substringSearch defaultNavigation) - ,((0,xK_Left) , move (-1,0) >> defaultNavigation) - ,((0,xK_h) , move (-1,0) >> defaultNavigation) - ,((0,xK_Right) , move (1,0) >> defaultNavigation) - ,((0,xK_l) , move (1,0) >> defaultNavigation) - ,((0,xK_Down) , move (0,1) >> defaultNavigation) - ,((0,xK_j) , move (0,1) >> defaultNavigation) - ,((0,xK_Up) , move (0,-1) >> defaultNavigation) - ,((0,xK_k) , move (0,-1) >> defaultNavigation) + ((0,xK_Escape) , cancel) + ,((0,xK_Return) , select) + ,((0,xK_slash) , substringSearch defaultNavigation) + ,((0,xK_Left) , move (-1,0) >> defaultNavigation) + ,((0,xK_h) , move (-1,0) >> defaultNavigation) + ,((0,xK_Right) , move (1,0) >> defaultNavigation) + ,((0,xK_l) , move (1,0) >> defaultNavigation) + ,((0,xK_Down) , move (0,1) >> defaultNavigation) + ,((0,xK_j) , move (0,1) >> defaultNavigation) + ,((0,xK_Up) , move (0,-1) >> defaultNavigation) + ,((0,xK_k) , move (0,-1) >> defaultNavigation) + ,((0,xK_Tab) , moveNext >> defaultNavigation) + ,((0,xK_n) , moveNext >> defaultNavigation) + ,((shiftMask,xK_Tab), movePrev >> defaultNavigation) + ,((0,xK_p) , movePrev >> defaultNavigation) ] -- The navigation handler ignores unknown key symbols, therefore we const navDefaultHandler = const defaultNavigation @@ -477,12 +481,14 @@ defaultNavigation = makeXEventhandler $ shadowWithKeymap navKeyMap navDefaultHan navNSearch :: TwoD a (Maybe a) navNSearch = makeXEventhandler $ shadowWithKeymap navNSearchKeyMap navNSearchDefaultHandler where navNSearchKeyMap = M.fromList [ - ((0,xK_Escape), cancel) - ,((0,xK_Return), select) - ,((0,xK_Left) , move (-1,0) >> navNSearch) - ,((0,xK_Right) , move (1,0) >> navNSearch) - ,((0,xK_Down) , move (0,1) >> navNSearch) - ,((0,xK_Up) , move (0,-1) >> navNSearch) + ((0,xK_Escape) , cancel) + ,((0,xK_Return) , select) + ,((0,xK_Left) , move (-1,0) >> navNSearch) + ,((0,xK_Right) , move (1,0) >> navNSearch) + ,((0,xK_Down) , move (0,1) >> navNSearch) + ,((0,xK_Up) , move (0,-1) >> navNSearch) + ,((0,xK_Tab) , moveNext >> navNSearch) + ,((shiftMask,xK_Tab), movePrev >> navNSearch) ,((0,xK_BackSpace), transformSearchString (\s -> if (s == "") then "" else init s) >> navNSearch) ] -- The navigation handler ignores unknown key symbols, therefore we const |