<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >XMonad.Util.EZConfig</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_XMonad-Util-EZConfig.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >xmonad-contrib-0.9.1: Third party extensions for xmonad</TD ><TD CLASS="topbut" ><A HREF="src/XMonad-Util-EZConfig.html" >Source code</A ></TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >XMonad.Util.EZConfig</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >Devin Mullins <me@twifkak.com></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" ><B >Contents</B ></TD ></TR ><TR ><TD ><DL ><DT ><A HREF="#1" >Usage </A ></DT ><DT ><A HREF="#2" >Adding or removing keybindings </A ></DT ><DT ><A HREF="#3" >Emacs-style keybinding specifications </A ></DT ></DL ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P >Useful helper functions for amending the defaultConfig, and for parsing keybindings specified in a special (emacs-like) format. </P ><P >(See also <A HREF="XMonad-Util-CustomKeys.html" >XMonad.Util.CustomKeys</A > in xmonad-contrib.) </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AadditionalKeys" >additionalKeys</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >), <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AadditionalKeysP" >additionalKeysP</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AremoveKeys" >removeKeys</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [(<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AremoveKeysP" >removeKeysP</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AadditionalMouseBindings" >additionalMouseBindings</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButton" >Button</A >), <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow" >Window</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AremoveMouseBindings" >removeMouseBindings</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [(<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButton" >Button</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AmkKeymap" >mkKeymap</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap" >Map</A > (<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeyMask" >KeyMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >) (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcheckKeymap" >checkKeymap</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, a)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AmkNamedKeymap" >mkNamedKeymap</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="XMonad-Util-NamedActions.html#t%3ANamedAction" >NamedAction</A >)] -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeyMask" >KeyMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >), <A HREF="XMonad-Util-NamedActions.html#t%3ANamedAction" >NamedAction</A >)]</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="1" ><A NAME="1" >Usage </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="doc" ><P >To use this module, first import it into your <TT >~/.xmonad/xmonad.hs</TT >: </P ><PRE > import XMonad.Util.EZConfig </PRE ><P >Then, use one of the provided functions to modify your configuration. You can use <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalKeys" >additionalKeys</A ></TT >, <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AremoveKeys" >removeKeys</A ></TT >, <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalMouseBindings" >additionalMouseBindings</A ></TT >, and <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AremoveMouseBindings" >removeMouseBindings</A ></TT > to easily add and remove keybindings or mouse bindings. You can use <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AmkKeymap" >mkKeymap</A ></TT > to create a keymap using emacs-style keybinding specifications like <TT >"M-x"</TT > instead of <TT >(modMask, xK_x)</TT >, or <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalKeysP" >additionalKeysP</A ></TT > and <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AremoveKeysP" >removeKeysP</A ></TT > to easily add or remove emacs-style keybindings. If you use emacs-style keybindings, the <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AcheckKeymap" >checkKeymap</A ></TT > function is provided, suitable for adding to your <TT ><A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#v%3AstartupHook" >startupHook</A ></TT >, which can warn you of any parse errors or duplicate bindings in your keymap. </P ><P >For more information and usage examples, see the documentation provided with each exported function, and check the xmonad config archive (<A HREF="http://haskell.org/haskellwiki/Xmonad/Config_archive" >http://haskell.org/haskellwiki/Xmonad/Config_archive</A >) for some real examples of use. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="2" ><A NAME="2" >Adding or removing keybindings </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:additionalKeys" ><A NAME="v%3AadditionalKeys" ></A ></A ><B >additionalKeys</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >), <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#additionalKeys" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Add or override keybindings from the existing set. Example use: </P ><PRE > main = xmonad $ defaultConfig { terminal = "urxvt" } `additionalKeys` [ ((mod1Mask, xK_m ), spawn "echo 'Hi, mom!' | dzen2 -p 4") , ((mod1Mask, xK_BackSpace), withFocused hide) -- N.B. this is an absurd thing to do ] </PRE ><P >This overrides the previous definition of mod-m. </P ><P >Note that, unlike in xmonad 0.4 and previous, you can't use modMask to refer to the modMask you configured earlier. You must specify mod1Mask (or whichever), or add your own <TT >myModMask = mod1Mask</TT > line. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:additionalKeysP" ><A NAME="v%3AadditionalKeysP" ></A ></A ><B >additionalKeysP</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#additionalKeysP" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Like <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalKeys" >additionalKeys</A ></TT >, except using short <TT >String</TT > key descriptors like <TT >"M-m"</TT > instead of <TT >(modMask, xK_m)</TT >, as described in the documentation for <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AmkKeymap" >mkKeymap</A ></TT >. For example: </P ><PRE > main = xmonad $ defaultConfig { terminal = "urxvt" } `additionalKeysP` [ ("M-m", spawn "echo 'Hi, mom!' | dzen2 -p 4") , ("M-<Backspace>", withFocused hide) -- N.B. this is an absurd thing to do ] </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:removeKeys" ><A NAME="v%3AremoveKeys" ></A ></A ><B >removeKeys</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [(<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#removeKeys" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Remove standard keybindings you're not using. Example use: </P ><PRE > main = xmonad $ defaultConfig { terminal = "urxvt" } `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]] </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:removeKeysP" ><A NAME="v%3AremoveKeysP" ></A ></A ><B >removeKeysP</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#removeKeysP" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Like <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AremoveKeys" >removeKeys</A ></TT >, except using short <TT >String</TT > key descriptors like <TT >"M-m"</TT > instead of <TT >(modMask, xK_m)</TT >, as described in the documentation for <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AmkKeymap" >mkKeymap</A ></TT >. For example: </P ><PRE > main = xmonad $ defaultConfig { terminal = "urxvt" } `removeKeysP` ["M-S-" ++ [n] | n <- ['1'..'9']] </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:additionalMouseBindings" ><A NAME="v%3AadditionalMouseBindings" ></A ></A ><B >additionalMouseBindings</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButton" >Button</A >), <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow" >Window</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#additionalMouseBindings" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Like <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalKeys" >additionalKeys</A ></TT >, but for mouse bindings. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:removeMouseBindings" ><A NAME="v%3AremoveMouseBindings" ></A ></A ><B >removeMouseBindings</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a -> [(<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButtonMask" >ButtonMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AButton" >Button</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > a</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#removeMouseBindings" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Like <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AremoveKeys" >removeKeys</A ></TT >, but for mouse bindings. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="3" ><A NAME="3" >Emacs-style keybinding specifications </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:mkKeymap" ><A NAME="v%3AmkKeymap" ></A ></A ><B >mkKeymap</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap" >Map</A > (<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeyMask" >KeyMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >) (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A >)</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#mkKeymap" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Given a config (used to determine the proper modifier key to use) and a list of <TT >(String, X ())</TT > pairs, create a key map by parsing the key sequence descriptions contained in the Strings. The key sequence descriptions are "emacs-style": <TT >M-</TT >, <TT >C-</TT >, <TT >S-</TT >, and <TT >M#-</TT > denote mod, control, shift, and mod1-mod5 (where <TT >#</TT > is replaced by the appropriate number) respectively. Note that if you want to make a keybinding using 'alt' even though you use a different key (like the 'windows' key) for 'mod', you can use something like <TT >"M1-x"</TT > for alt+x (check the output of <TT >xmodmap</TT > to see which mod key 'alt' is bound to). Some special keys can also be specified by enclosing their name in angle brackets. </P ><P >For example, <TT >"M-C-x"</TT > denotes mod+ctrl+x; <TT >"S-<Escape>"</TT > denotes shift-escape; <TT >"M1-C-<Delete>"</TT > denotes alt+ctrl+delete (assuming alt is bound to mod1, which is common). </P ><P >Sequences of keys can also be specified by separating the key descriptions with spaces. For example, <TT >"M-x y <Down>"</TT > denotes the sequence of keys mod+x, y, down. Submaps (see <A HREF="XMonad-Actions-Submap.html" >XMonad.Actions.Submap</A >) will be automatically generated to correctly handle these cases. </P ><P >So, for example, a complete key map might be specified as </P ><PRE > keys = \c -> mkKeymap c $ [ ("M-S-<Return>", spawn $ terminal c) , ("M-x w", spawn "xmessage 'woohoo!'") -- type mod+x then w to pop up 'woohoo!' , ("M-x y", spawn "xmessage 'yay!'") -- type mod+x then y to pop up 'yay!' , ("M-S-c", kill) ] </PRE ><P >Alternatively, you can use <TT ><A HREF="XMonad-Util-EZConfig.html#v%3AadditionalKeysP" >additionalKeysP</A ></TT > to automatically create a keymap and add it to your config. </P ><P >Here is a complete list of supported special keys. Note that a few keys, such as the arrow keys, have synonyms. If there are other special keys you would like to see supported, feel free to submit a patch, or ask on the xmonad mailing list; adding special keys is quite simple. </P ><PRE > <Backspace> <Tab> <Return> <Pause> <Scroll_lock> <Sys_Req> <Print> <Escape>, <Esc> <Delete> <Home> <Left>, <L> <Up>, <U> <Right>, <R> <Down>, <D> <Page_Up> <Page_Down> <End> <Insert> <Break> <Space> <F1>-<F24> <KP_Space> <KP_Tab> <KP_Enter> <KP_F1> <KP_F2> <KP_F3> <KP_F4> <KP_Home> <KP_Left> <KP_Up> <KP_Right> <KP_Down> <KP_Prior> <KP_Page_Up> <KP_Next> <KP_Page_Down> <KP_End> <KP_Begin> <KP_Insert> <KP_Delete> <KP_Equal> <KP_Multiply> <KP_Add> <KP_Separator> <KP_Subtract> <KP_Decimal> <KP_Divide> <KP_0>-<KP_9> </PRE ><P >Long list of multimedia keys. Please note that not all keys may be present in your particular setup although most likely they will do. </P ><PRE > <XF86ModeLock> <XF86MonBrightnessUp> <XF86MonBrightnessDown> <XF86KbdLightOnOff> <XF86KbdBrightnessUp> <XF86KbdBrightnessDown> <XF86Standby> <XF86AudioLowerVolume> <XF86AudioMute> <XF86AudioRaiseVolume> <XF86AudioPlay> <XF86AudioStop> <XF86AudioPrev> <XF86AudioNext> <XF86HomePage> <XF86Mail> <XF86Start> <XF86Search> <XF86AudioRecord> <XF86Calculator> <XF86Memo> <XF86ToDoList> <XF86Calendar> <XF86PowerDown> <XF86ContrastAdjust> <XF86RockerUp> <XF86RockerDown> <XF86RockerEnter> <XF86Back> <XF86Forward> <XF86Stop> <XF86Refresh> <XF86PowerOff> <XF86WakeUp> <XF86Eject> <XF86ScreenSaver> <XF86WWW> <XF86Sleep> <XF86Favorites> <XF86AudioPause> <XF86AudioMedia> <XF86MyComputer> <XF86VendorHome> <XF86LightBulb> <XF86Shop> <XF86History> <XF86OpenURL> <XF86AddFavorite> <XF86HotLinks> <XF86BrightnessAdjust> <XF86Finance> <XF86Community> <XF86AudioRewind> <XF86XF86BackForward> <XF86Launch0>-<XF86Launch9>, <XF86LaunchA>-<XF86LaunchF> <XF86ApplicationLeft> <XF86ApplicationRight> <XF86Book> <XF86CD> <XF86Calculater> <XF86Clear> <XF86Close> <XF86Copy> <XF86Cut> <XF86Display> <XF86DOS> <XF86Documents> <XF86Excel> <XF86Explorer> <XF86Game> <XF86Go> <XF86iTouch> <XF86LogOff> <XF86Market> <XF86Meeting> <XF86MenuKB> <XF86MenuPB> <XF86MySites> <XF86New> <XF86News> <XF86OfficeHome> <XF86Open> <XF86Option> <XF86Paste> <XF86Phone> <XF86Q> <XF86Reply> <XF86Reload> <XF86RotateWindows> <XF86RotationPB> <XF86RotationKB> <XF86Save> <XF86ScrollUp> <XF86ScrollDown> <XF86ScrollClick> <XF86Send> <XF86Spell> <XF86SplitScreen> <XF86Support> <XF86TaskPane> <XF86Terminal> <XF86Tools> <XF86Travel> <XF86UserPB> <XF86User1KB> <XF86User2KB> <XF86Video> <XF86WheelButton> <XF86Word> <XF86Xfer> <XF86ZoomIn> <XF86ZoomOut> <XF86Away> <XF86Messenger> <XF86WebCam> <XF86MailForward> <XF86Pictures> <XF86Music> <XF86_Switch_VT_1>-<XF86_Switch_VT_12> <XF86_Ungrab> <XF86_ClearGrab> <XF86_Next_VMode> <XF86_Prev_VMode> </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:checkKeymap" ><A NAME="v%3AcheckKeymap" ></A ></A ><B >checkKeymap</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, a)] -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#checkKeymap" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Given a configuration record and a list of (key sequence description, action) pairs, check the key sequence descriptions for validity, and warn the user (via a popup xmessage window) of any unparseable or duplicate key sequences. This function is appropriate for adding to your <TT >startupHook</TT >, and you are highly encouraged to do so; otherwise, duplicate or unparseable keybindings will be silently ignored. </P ><P >For example, you might do something like this: </P ><PRE > main = xmonad $ myConfig myKeymap = [("S-M-c", kill), ...] myConfig = defaultConfig { ... keys = \c -> mkKeymap c myKeymap startupHook = return () >> checkKeymap myConfig myKeymap ... } </PRE ><P >NOTE: the <TT >return ()</TT > in the example above is very important! Otherwise, you might run into problems with infinite mutual recursion: the definition of myConfig depends on the definition of startupHook, which depends on the definition of myConfig, ... and so on. Actually, it's likely that the above example in particular would be OK without the <TT >return ()</TT >, but making <TT >myKeymap</TT > take <TT >myConfig</TT > as a parameter would definitely lead to problems. Believe me. It, uh, happened to my friend. In... a dream. Yeah. In any event, the <TT >return () >></TT > introduces enough laziness to break the deadlock. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:mkNamedKeymap" ><A NAME="v%3AmkNamedKeymap" ></A ></A ><B >mkNamedKeymap</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AXConfig" >XConfig</A > l -> [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</A >, <A HREF="XMonad-Util-NamedActions.html#t%3ANamedAction" >NamedAction</A >)] -> [((<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeyMask" >KeyMask</A >, <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AKeySym" >KeySym</A >), <A HREF="XMonad-Util-NamedActions.html#t%3ANamedAction" >NamedAction</A >)]</TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Util-EZConfig.html#mkNamedKeymap" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.1</TD ></TR ></TABLE ></BODY ></HTML >