From d3479b1865d7456b40e5f73427f7d55dbe53e0f6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 15 May 2011 21:33:26 +0200 Subject: add-movenext-moveprev-bindings Ignore-this: 2ad1ce1de0c2954b2946551dd62e6b3b Adds default bindings to GridSelect for the moveNext and movePrev motions. darcs-hash:20110515193326-24e3f-6ee8e182ecb4ba179bf038cef88e1d8d78f05e75.gz --- XMonad/Actions/GridSelect.hs | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'XMonad/Actions/GridSelect.hs') 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 -- cgit v1.2.3