Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 16551e78563a5b49ff9624ee1c8b8101 > files > 716

ghc-xmonad-contrib-devel-0.11-1.1.fc18.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.KeyRemap</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-KeyRemap.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Actions-KeyRemap.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.11: 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>stettberger@dokucde.de</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">XMonad.Actions.KeyRemap</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>Remap Keybinding on the fly, e.g having Dvorak char, but everything with Control/Shift
 is left us Layout
</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:setKeyRemap">setKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:buildKeyRemapBindings">buildKeyRemapBindings</a> :: [<a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a>] -&gt; [((<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>), <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>)]</li><li class="src short"><a href="#v:setDefaultKeyRemap">setDefaultKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a> -&gt; [<a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:KeymapTable">KeymapTable</a>  = <a href="#v:KeymapTable">KeymapTable</a> [((<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>), (<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>))]</li><li class="src short"><a href="#v:emptyKeyRemap">emptyKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a></li><li class="src short"><a href="#v:dvorakProgrammerKeyRemap">dvorakProgrammerKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a></li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>Provides the possibility to remap parts of the keymap to generate different keys
</p><ul><li> E.g You want to type Programmers Dvorak, but your keybindings should be the normal us layout
   after all
</li></ul><p>First, you must add all possible keybindings for all layout you want to use:
</p><pre>   keys = myKeys ++ buildKeyRemapBindings [dvorakProgrammerKeyRemap,emptyKeyRemap]
</pre><p>Then you must add setDefaultKeyRemap to your startup hook (e.g. you want to set the
 empty keyremap (no remapping is done) as default after startup):
</p><pre> myStartupHook :: X()
 myStartupHook = do
   setWMName &quot;LG3D&quot;
   setDefaultKeyRemap emptyKeyRemap [dvorakProgrammerKeyRemap, emptyKeyRemap]
</pre><p>Then you add keybindings for changing keyboard layouts;
</p><pre> , ((0                    , xK_F1    ), setKeyRemap emptyKeyRemap)
 , ((0                    , xK_F2    ), setKeyRemap dvorakProgrammerKeyRemap)
</pre><p>When defining your own keymappings, please be aware of:
</p><ul><li> If you want to emulate a key that is shifted on us you must emulate that keypress:
</li></ul><pre> KeymapTable [((0, xK_a), (shiftMask, xK_5))] -- would bind 'a' to '%'
 KeymapTable [((shiftMask, xK_a), (0, xK_5))] -- would bind 'A' to '5'
</pre><ul><li> the dvorakProgrammerKeyRemap uses the original us layout as lookuptable to generate
   the KeymapTable
</li><li> KeySym and (ord Char) are incompatible, therefore the magic numbers in dvorakProgrammerKeyRemap
   are nessesary
</li></ul></div><div class="top"><p class="src"><a name="v:setKeyRemap" class="def">setKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-KeyRemap.html#setKeyRemap" class="link">Source</a></p><div class="doc"><p>Using this in the keybindings to set the actual Key Translation table
</p></div></div><div class="top"><p class="src"><a name="v:buildKeyRemapBindings" class="def">buildKeyRemapBindings</a> :: [<a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a>] -&gt; [((<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>), <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>)]<a href="src/XMonad-Actions-KeyRemap.html#buildKeyRemapBindings" class="link">Source</a></p><div class="doc"><p>Append the output of this function to your keybindings with ++
</p></div></div><div class="top"><p class="src"><a name="v:setDefaultKeyRemap" class="def">setDefaultKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a> -&gt; [<a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-KeyRemap.html#setDefaultKeyRemap" class="link">Source</a></p><div class="doc"><p>Adding this to your startupHook, to select your default Key Translation table.
   You also must give it all the KeymapTables you are willing to use
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:KeymapTable" class="def">KeymapTable</a>  <a href="src/XMonad-Actions-KeyRemap.html#KeymapTable" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:KeymapTable" class="def">KeymapTable</a> [((<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>), (<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeyMask">KeyMask</a>, <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:KeySym">KeySym</a>))]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:KeymapTable" class="caption collapser" onclick="toggleSection('i:KeymapTable')">Instances</p><div id="section.i:KeymapTable" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:ExtensionClass">ExtensionClass</a> <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:emptyKeyRemap" class="def">emptyKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a><a href="src/XMonad-Actions-KeyRemap.html#emptyKeyRemap" class="link">Source</a></p><div class="doc"><p>The empty KeymapTable, does no translation
</p></div></div><div class="top"><p class="src"><a name="v:dvorakProgrammerKeyRemap" class="def">dvorakProgrammerKeyRemap</a> :: <a href="XMonad-Actions-KeyRemap.html#t:KeymapTable">KeymapTable</a><a href="src/XMonad-Actions-KeyRemap.html#dvorakProgrammerKeyRemap" class="link">Source</a></p><div class="doc"><p>The dvorak Programmers keymap, translates from us keybindings to dvorak programmers
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>