Usage

To use this module, first import it into your ~/.xmonad/xmonad.hs:

import XMonad.Util.EZConfig

Then, use one of the provided functions to modify your
configuration. You can use additionalKeys, removeKeys,
additionalMouseBindings, and removeMouseBindings to easily add
and remove keybindings or mouse bindings. You can use mkKeymap
to create a keymap using emacs-style keybinding specifications
like "M-x" instead of (modMask, xK_x), or additionalKeysP
and removeKeysP to easily add or remove emacs-style keybindings.
If you use emacs-style keybindings, the checkKeymap function is
provided, suitable for adding to your startupHook, which can warn
you of any parse errors or duplicate bindings in your keymap.

Emacs-style keybinding specifications

Given a config (used to determine the proper modifier key to use)
and a list of (String, X ()) pairs, create a key map by parsing
the key sequence descriptions contained in the Strings. The key
sequence descriptions are "emacs-style": M-, C-, S-, and
M#- denote mod, control, shift, and mod1-mod5 (where # 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 "M1-x" for alt+x (check the output of xmodmap
to see which mod key 'alt' is bound to). Some special keys can
also be specified by enclosing their name in angle brackets.

Sequences of keys can also be specified by separating the key
descriptions with spaces. For example, "M-x y <Down>" denotes the
sequence of keys mod+x, y, down. Submaps (see
XMonad.Actions.Submap) will be automatically generated to
correctly handle these cases.

Alternatively, you can use additionalKeysP to automatically
create a keymap and add it to your config.

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.

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 startupHook, and you are highly
encouraged to do so; otherwise, duplicate or unparseable
keybindings will be silently ignored.

NOTE: the return () 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 return (), but making myKeymap take
myConfig as a parameter would definitely lead to
problems. Believe me. It, uh, happened to my friend. In... a
dream. Yeah. In any event, the return () >> introduces enough
laziness to break the deadlock.