[xmonad] Issue 69 in xmonad: Key binding improvements

codesite-noreply at google.com codesite-noreply at google.com
Sat Dec 11 07:01:49 CET 2010


Comment #11 on issue 69 by kekito.fig: Key binding improvements
http://code.google.com/p/xmonad/issues/detail?id=69

There's a really simple way to do this!  I'm surprised the example isn't in  
a FAQ somewhere, but this issue shows up first on Google for "xmonad prefix  
key", so I'm adding the code here.

Tailor to your preference.  The tuple passed to prefixKey is a regular  
xmonad-style (modifier, keycode) tuple.  In this file, I use an unmodded  
Escape key as my prefix, and strip the modifier from the usual keybindings  
by setting modMask to 0.

So, where a keybinding used to be (modMask, keycode), I've changed it to  
the moral equivalent of [(0, xK_Escape), (0, keycode)].

Have fun, and happy hacking!

P.S. Haskell's type system rules.  As soon as I got this to compile, it  
Just Worked. :)


Attachments:
	xmonad.hs  276 bytes




More information about the xmonad mailing list