Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 420a649e6f65db30aa7451f64d08ff92 > files > 588

ghc-xmonad-contrib-devel-0.9.2-4.fc16.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>XMonad.Actions.Submap</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_XMonad-Actions-Submap.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Actions-Submap.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">xmonad-contrib-0.9.2: Third party extensions for xmonad</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>unportable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>Jason Creighton &lt;jcreigh@gmail.com&gt;</td></tr></table><p class="caption">XMonad.Actions.Submap</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Usage
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A module that allows the user to create a sub-mapping of key bindings.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:submap">submap</a> :: <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Map.html#t:Map">Map</a> (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>) (X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:submapDefault">submapDefault</a> :: X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Map.html#t:Map">Map</a> (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>) (X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>First, import this module into your <code>~/.xmonad/xmonad.hs</code>:
</p><pre> import XMonad.Actions.Submap
</pre><p>Allows you to create a sub-mapping of keys. Example:
</p><pre>    , ((modm, xK_a), submap . M.fromList $
        [ ((0, xK_n),     spawn &quot;mpc next&quot;)
        , ((0, xK_p),     spawn &quot;mpc prev&quot;)
        , ((0, xK_z),     spawn &quot;mpc random&quot;)
        , ((0, xK_space), spawn &quot;mpc toggle&quot;)
        ])
</pre><p>So, for example, to run 'spawn &quot;mpc next&quot;', you would hit mod-a (to
trigger the submapping) and then <code>n</code> to run that action. (0 means &quot;no
modifier&quot;). You are, of course, free to use any combination of
modifiers in the submapping. However, anyModifier will not work,
because that is a special value passed to XGrabKey() and not an actual
modifier.
</p><p>For detailed instructions on editing your key bindings, see
<a href="XMonad-Doc-Extending.html#Editing_key_bindings">XMonad.Doc.Extending</a>.
</p></div><div class="top"><p class="src"><a name="v:submap" class="def">submap</a> :: <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Map.html#t:Map">Map</a> (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>) (X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Actions-Submap.html#submap" class="link">Source</a></p><div class="doc"><p>Given a <code>Data.Map.Map</code> from key bindings to X () actions, return
   an action which waits for a user keypress and executes the
   corresponding action, or does nothing if the key is not found in
   the map.
</p></div></div><div class="top"><p class="src"><a name="v:submapDefault" class="def">submapDefault</a> :: X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Map.html#t:Map">Map</a> (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>) (X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Actions-Submap.html#submapDefault" class="link">Source</a></p><div class="doc"><p>Like <code><a href="XMonad-Actions-Submap.html#v:submap">submap</a></code>, but executes a default action if the key did not match.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>