Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 404d46ca9bb341d7a0e7e04bc69da9df > files > 772

ghc-gtk-devel-0.12.0-4.fc15.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>Graphics.UI.Gtk.Gdk.Keymap</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_Graphics-UI-Gtk-Gdk-Keymap.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-Gtk-Gdk-Keymap.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">gtk-0.12.0: Binding to the Gtk+ graphical user interface library.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable (depends on GHC)</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>gtk2hs-users@lists.sourceforge.net</td></tr></table><p class="caption">Graphics.UI.Gtk.Gdk.Keymap</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Details
</a></li><li><a href="#g:2">Class Hierarchy
</a></li><li><a href="#g:3">Types
</a></li><li><a href="#g:4">Methods
</a></li><li><a href="#g:5">Signals
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Functions for manipulating keyboard codes
</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"><span class="keyword">data</span>  <a href="#t:Keymap">Keymap</a> </li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o =&gt; <a href="#t:KeymapClass">KeymapClass</a> o </li><li class="src short"><a href="#v:castToKeymap">castToKeymap</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj =&gt; obj -&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></li><li class="src short"><a href="#v:toKeymap">toKeymap</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> o =&gt; o -&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:KeymapKey">KeymapKey</a> </li><li class="src short"><a href="#v:keymapGetDefault">keymapGetDefault</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></li><li class="src short"><a href="#v:keymapGetForDisplay">keymapGetForDisplay</a> :: <a href="Graphics-UI-Gtk-Gdk-Display.html#t:Display">Display</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></li><li class="src short"><a href="#v:keymapLookupKey">keymapLookupKey</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> self -&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-UI-Gtk-General-Enums.html#t:Modifier">Modifier</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="Graphics-UI-Gtk-General-Enums.html#t:Modifier">Modifier</a>))</li><li class="src short"><a href="#v:keymapGetEntriesForKeyval">keymapGetEntriesForKeyval</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="Graphics-UI-Gtk-Gdk-Keys.html#t:KeyVal">KeyVal</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a>])</li><li class="src short"><a href="#v:keymapGetEntriesForKeycode">keymapGetEntriesForKeycode</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> ([<a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a>], [<a href="Graphics-UI-Gtk-Gdk-Keys.html#t:KeyVal">KeyVal</a>]))</li><li class="src short"><a href="#v:keymapGetDirection">keymapGetDirection</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/pango-0.12.0/Graphics-Rendering-Pango-Enums.html#t:PangoDirection">PangoDirection</a></li><li class="src short"><a href="#v:keymapHaveBidiLayouts">keymapHaveBidiLayouts</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:keymapGetCapsLockState">keymapGetCapsLockState</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; self -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:keymapDirectionChanged">keymapDirectionChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <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:keymapKeysChanged">keymapKeysChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <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:keymapStateChanged">keymapStateChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <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">Details
</h1><div class="doc"><p>Key values are the codes which are sent whenever a key is pressed or released. They appear in the
 keyval field of the <code>EventKey</code> structure, which is passed to signal handlers for the
 <code>keyPressEvent</code> and <code>keyReleaseEvent</code> signals.
</p><p>Key values are regularly updated from the upstream X.org X11 implementation, so new values are added
 regularly. They will be prefixed with GDK_ rather than XF86XK_ or ' (for older symbols)'.
</p><p>Key values can be converted into a string representation using <code>keyvalName</code>. The reverse
 function, converting a string to a key value, is provided by <code>keyvalFromName</code>.
</p><p>The case of key values can be determined using <code>keyvalIsUpper</code>. Key
 values can be converted to upper or lower case using <code>keyvalToUpper</code> and
 <code>keyvalToLower</code>.
</p><p>When it makes sense, key values can be converted to and from Unicode characters with
 <code>keyvalToUnicode</code>.
</p><p>One <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> object exists for each user display. <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapGetDefault">keymapGetDefault</a></code> returns the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code>
 for the default display; to obtain keymaps for other displays, use <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapGetForDisplay">keymapGetForDisplay</a></code>. A
 keymap is a mapping from <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code> to key values. You can think of a <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code> as a
 representation of a symbol printed on a physical keyboard key. That is, it contains three pieces of
 information. First, it contains the hardware keycode; this is an identifying number for a physical
 key. Second, it contains the level of the key. The level indicates which symbol on the key will be
 used, in a vertical direction. So on a standard US keyboard, the key with the number &quot;1&quot; on it also
 has the exclamation point &quot;!&quot; character on it. The level indicates whether to use the &quot;1&quot; or the
 &quot;!&quot; symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase
 letter at level 1, though only the uppercase letter is printed. Third, the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code> contains a
 group; groups are not used on standard US keyboards, but are used in many other countries. On a
 keyboard with groups, there can be 3 or 4 symbols printed on a single key. The group indicates
 movement in a horizontal direction. Usually groups are used for two different languages. In group 0,
 a key might have two English characters, and in group 1 it might have two Hebrew characters. The
 Hebrew characters will be printed on the key next to the English characters.
</p><p>In order to use a keymap to interpret a key event, it's necessary to first convert the keyboard
 state into an effective group and level. This is done via a set of rules that varies widely
 according to type of keyboard and user configuration. The function
 <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a></code> accepts a keyboard state -- consisting of hardware keycode
 pressed, active modifiers, and active group -- applies the appropriate rules, and returns the
 group/level to be used to index the keymap, along with the modifiers which did not affect the group
 and level. i.e. it returns <a href="unconsumed modifiers-.html">unconsumed modifiers.</a> The keyboard group may differ from the effective
 group used for keymap lookups because some keys don't have multiple groups - e.g. the Enter key is
 always in group 0 regardless of keyboard state.
</p><p>Note that <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a></code> also returns the keyval, i.e. it goes ahead and
 performs the keymap lookup in addition to telling you which effective group/level values were used
 for the lookup. <code>EventKey</code> already contains this keyval, however, so you don't normally need to
 call <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a></code> just to get the keyval.
</p></div><h1 id="g:2">Class Hierarchy
</h1><div class="doc"><pre>
 | <code><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObject">GObject</a></code>
 | +----Keymap
</pre></div><h1 id="g:3">Types
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Keymap" class="def">Keymap</a>  <a href="src/Graphics-UI-Gtk-Types.html#Keymap" class="link">Source</a></p><div class="subs instances"><p id="control.i:Keymap" class="caption collapser" onclick="toggleSection('i:Keymap')">Instances</p><div id="section.i:Keymap" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o =&gt; <a name="t:KeymapClass" class="def">KeymapClass</a> o <a href="src/Graphics-UI-Gtk-Types.html#KeymapClass" class="link">Source</a></p><div class="subs instances"><p id="control.i:KeymapClass" class="caption collapser" onclick="toggleSection('i:KeymapClass')">Instances</p><div id="section.i:KeymapClass" class="show"><table><tr><td class="src"><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:castToKeymap" class="def">castToKeymap</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj =&gt; obj -&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a><a href="src/Graphics-UI-Gtk-Types.html#castToKeymap" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toKeymap" class="def">toKeymap</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> o =&gt; o -&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a><a href="src/Graphics-UI-Gtk-Types.html#toKeymap" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:KeymapKey" class="def">KeymapKey</a>  <a href="src/Graphics-UI-Gtk-General-Structs.html#KeymapKey" class="link">Source</a></p><div class="doc"><p>A <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code> is a hardware key that can be mapped to a keyval.
</p></div><div class="subs instances"><p id="control.i:KeymapKey" class="caption collapser" onclick="toggleSection('i:KeymapKey')">Instances</p><div id="section.i:KeymapKey" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:4">Methods
</h1><div class="top"><p class="src"><a name="v:keymapGetDefault" class="def">keymapGetDefault</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetDefault" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc"><p>returns the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> attached to the default display.
</p></td></tr></table></div><div class="doc"><p>Returns the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> attached to the default display.
</p></div></div><div class="top"><p class="src"><a name="v:keymapGetForDisplay" class="def">keymapGetForDisplay</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetForDisplay" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Display.html#t:Display">Display</a></td><td class="doc"><p><code>display</code> - the <code><a href="Graphics-UI-Gtk-Gdk-Display.html#t:Display">Display</a></code>.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></td><td class="doc"><p>returns the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> attached to <code>display</code>.
</p></td></tr></table></div><div class="doc"><p>Returns the <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> attached to <code>display</code>.
</p><ul><li> Available since Gdk version 2.2
</li></ul></div></div><div class="top"><p class="src"><a name="v:keymapLookupKey" class="def">keymapLookupKey</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapLookupKey" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> self</td><td class="doc"><p><code>keymap</code> a <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:Keymap">Keymap</a></code> or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> to use the default keymap
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></td><td class="doc"><p><code>key</code> - a <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code>
 with keycode, group, and level initialized
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>returns a keyval, or 0 if none was mapped to
 the given <code>key</code>
</p></td></tr></table></div><div class="doc"><p>Looks up the keyval mapped to a keycode/group/level triplet. If no
 keyval is bound to <code>key</code>, returns 0. For normal user input, you want to use
 <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a></code> instead of this function, since the effective
 group/level may not be the same as the current keyboard state.
</p></div></div><div class="top"><p class="src"><a name="v:keymapTranslateKeyboardState" class="def">keymapTranslateKeyboardState</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapTranslateKeyboardState" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>hardwareKeycode</code> - a keycode
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-UI-Gtk-General-Enums.html#t:Modifier">Modifier</a></td><td class="doc"><p><code>state</code> - a modifier state
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>group</code> - active keyboard group
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="Graphics-UI-Gtk-General-Enums.html#t:Modifier">Modifier</a>))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Translates the contents of a <code>EventKey</code> into a
 keyval, effective group, and level. Modifiers that affected the translation
 and are thus unavailable for application use are returned in
 <code>consumedModifiers</code>. See <code>keyvalGetKeys</code> for an explanation of groups and
 levels. The <code>effectiveGroup</code> is the group that was actually used for the
 translation; some keys such as Enter are not affected by the active keyboard
 group. The <code>level</code> is derived from <code>state</code>. For convenience, <code>EventKey</code>
 already contains the translated keyval, so this function
 isn't as useful as you might think.
</p></div></div><div class="top"><p class="src"><a name="v:keymapGetEntriesForKeyval" class="def">keymapGetEntriesForKeyval</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetEntriesForKeyval" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Graphics-UI-Gtk-Gdk-Keys.html#t:KeyVal">KeyVal</a></td><td class="doc"><p><code>keyval</code> - a keyval, such as <code>GDK_a</code>, <code>GDK_Up</code>,
 <code>GDK_Return</code>, etc.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a>])</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Obtains a list of keycode/group/level combinations that will generate
 <code>keyval</code>. Groups and levels are two kinds of keyboard mode; in general, the
 level determines whether the top or bottom symbol on a key is used, and the
 group determines whether the left or right symbol is used. On US keyboards,
 the shift key changes the keyboard level, and there are no groups. A group
 switch key might convert a keyboard between Hebrew to English modes, for
 example. <code>EventKey</code> contains a <code>group</code> field that
 indicates the active keyboard group. The level is computed from the modifier
 mask.
</p></div></div><div class="top"><p class="src"><a name="v:keymapGetEntriesForKeycode" class="def">keymapGetEntriesForKeycode</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetEntriesForKeycode" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>hardwareKeycode</code> - a keycode
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> ([<a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a>], [<a href="Graphics-UI-Gtk-Gdk-Keys.html#t:KeyVal">KeyVal</a>]))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Returns the keyvals bound to <code>hardwareKeycode</code>. The Nth <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapKey">KeymapKey</a></code>
 in <code>keys</code> is bound to the Nth keyval in <code>keyvals</code>.
 When a keycode is pressed by the user, the
 keyval from this list of entries is selected by considering the effective
 keyboard group and level. See <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapTranslateKeyboardState">keymapTranslateKeyboardState</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:keymapGetDirection" class="def">keymapGetDirection</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetDirection" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/pango-0.12.0/Graphics-Rendering-Pango-Enums.html#t:PangoDirection">PangoDirection</a></td><td class="doc"><p>returns <code>DirectionLtr</code> or <code>DirectionRtl</code> if it can
 determine the direction. <code>DirectionNeutral</code> otherwise.
</p></td></tr></table></div><div class="doc"><p>Returns the direction of effective layout of the keymap.
</p><p>Returns the direction of the keymap.
</p></div></div><div class="top"><p class="src"><a name="v:keymapHaveBidiLayouts" class="def">keymapHaveBidiLayouts</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapHaveBidiLayouts" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>returns <code>True</code> if there are layouts in both directions,
 <code>False</code> otherwise
</p></td></tr></table></div><div class="doc"><p>Determines if keyboard layouts for both right-to-left and left-to-right
 languages are in use.
</p><ul><li> Available since Gdk version 2.12
</li></ul></div></div><div class="top"><p class="src"><a name="v:keymapGetCapsLockState" class="def">keymapGetCapsLockState</a><a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapGetCapsLockState" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; self</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>returns <code>True</code> if Caps Lock is on
</p></td></tr></table></div><div class="doc"><p>Returns whether the Caps Lock modifer is locked.
</p><ul><li> Available since Gdk version 2.16
</li></ul></div></div><h1 id="g:5">Signals
</h1><div class="top"><p class="src"><a name="v:keymapDirectionChanged" class="def">keymapDirectionChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapDirectionChanged" class="link">Source</a></p><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapDirectionChanged">keymapDirectionChanged</a></code> signal gets emitted when the direction of the
 keymap changes.
</p><ul><li> Available since Gdk version 2.0
</li></ul></div></div><div class="top"><p class="src"><a name="v:keymapKeysChanged" class="def">keymapKeysChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapKeysChanged" class="link">Source</a></p><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapKeysChanged">keymapKeysChanged</a></code> signal is emitted when the mapping represented by
 <code>keymap</code> changes.
</p><ul><li> Available since Gdk version 2.2
</li></ul></div></div><div class="top"><p class="src"><a name="v:keymapStateChanged" class="def">keymapStateChanged</a> :: <a href="Graphics-UI-Gtk-Gdk-Keymap.html#t:KeymapClass">KeymapClass</a> self =&gt; <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Gdk-Keymap.html#keymapStateChanged" class="link">Source</a></p><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapStateChanged">keymapStateChanged</a></code> signal is emitted when the state of the keyboard
 changes, e.g when Caps Lock is turned on or off. See
 <code><a href="Graphics-UI-Gtk-Gdk-Keymap.html#v:keymapGetCapsLockState">keymapGetCapsLockState</a></code>.
</p><ul><li> Available since Gdk version 2.16
</li></ul></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>