<refentry id="gdk-Keyboard-Handling">
<refmeta>
<refentrytitle>Key Values</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Key Values</refname><refpurpose>functions for manipulating keyboard codes.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gdk/gdk.h&gt;


struct      <link linkend="GdkKeymap">GdkKeymap</link>;
struct      <link linkend="GdkKeymapKey">GdkKeymapKey</link>;
<link linkend="GdkKeymap">GdkKeymap</link>*  <link linkend="gdk-keymap-get-default">gdk_keymap_get_default</link>          (void);
<link linkend="guint">guint</link>       <link linkend="gdk-keymap-lookup-key">gdk_keymap_lookup_key</link>           (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             const <link linkend="GdkKeymapKey">GdkKeymapKey</link> *key);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> hardware_keycode,
                                             <link linkend="GdkModifierType">GdkModifierType</link> state,
                                             <link linkend="gint">gint</link> group,
                                             <link linkend="guint">guint</link> *keyval,
                                             <link linkend="gint">gint</link> *effective_group,
                                             <link linkend="gint">gint</link> *level,
                                             <link linkend="GdkModifierType">GdkModifierType</link> *consumed_modifiers);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-keymap-get-entries-for-keyval">gdk_keymap_get_entries_for_keyval</link>
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GdkKeymapKey">GdkKeymapKey</link> **keys,
                                             <link linkend="gint">gint</link> *n_keys);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-keymap-get-entries-for-keycode">gdk_keymap_get_entries_for_keycode</link>
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> hardware_keycode,
                                             <link linkend="GdkKeymapKey">GdkKeymapKey</link> **keys,
                                             <link linkend="guint">guint</link> **keyvals,
                                             <link linkend="gint">gint</link> *n_entries);
<link linkend="PangoDirection">PangoDirection</link> <link linkend="gdk-keymap-get-direction">gdk_keymap_get_direction</link>     (<link linkend="GdkKeymap">GdkKeymap</link> *keymap);

<link linkend="gchar">gchar</link>*      <link linkend="gdk-keyval-name">gdk_keyval_name</link>                 (<link linkend="guint">guint</link> keyval);
<link linkend="guint">guint</link>       <link linkend="gdk-keyval-from-name">gdk_keyval_from_name</link>            (const <link linkend="gchar">gchar</link> *keyval_name);

void        <link linkend="gdk-keyval-convert-case">gdk_keyval_convert_case</link>         (<link linkend="guint">guint</link> symbol,
                                             <link linkend="guint">guint</link> *lower,
                                             <link linkend="guint">guint</link> *upper);
<link linkend="guint">guint</link>       <link linkend="gdk-keyval-to-upper">gdk_keyval_to_upper</link>             (<link linkend="guint">guint</link> keyval);
<link linkend="guint">guint</link>       <link linkend="gdk-keyval-to-lower">gdk_keyval_to_lower</link>             (<link linkend="guint">guint</link> keyval);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-keyval-is-upper">gdk_keyval_is_upper</link>             (<link linkend="guint">guint</link> keyval);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-keyval-is-lower">gdk_keyval_is_lower</link>             (<link linkend="guint">guint</link> keyval);

<link linkend="guint32">guint32</link>     <link linkend="gdk-keyval-to-unicode">gdk_keyval_to_unicode</link>           (<link linkend="guint">guint</link> keyval);
<link linkend="guint">guint</link>       <link linkend="gdk-unicode-to-keyval">gdk_unicode_to_keyval</link>           (<link linkend="guint32">guint32</link> wc);


</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>
Key values are the codes which are sent whenever a key is pressed or released.
They appear in the <structfield>keyval</structfield> field of the
<link linkend="GdkEventKey">GdkEventKey</link> structure, which is passed to signal handlers for the
"key-press-event" and "key-release-event" signals.
The complete list of key values can be found in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file. <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> is not included in <filename>&lt;gtk/gtk.h&gt;</filename>, 
it must be included independently, because the file is quite large.
</para>
<para>
Key values can be converted into a string representation using
<link linkend="gdk-keyval-name">gdk_keyval_name</link>(). The reverse function, converting a string to a key value,
is provided by <link linkend="gdk-keyval-from-name">gdk_keyval_from_name</link>().
</para>
<para>
The case of key values can be determined using <link linkend="gdk-keyval-is-upper">gdk_keyval_is_upper</link>() and
<link linkend="gdk-keyval-is-lower">gdk_keyval_is_lower</link>(). Key values can be converted to upper or lower case
using <link linkend="gdk-keyval-to-upper">gdk_keyval_to_upper</link>() and <link linkend="gdk-keyval-to-lower">gdk_keyval_to_lower</link>().
</para>
<para>
When it makes sense, key values can be converted to and from 
Unicode characters with <link linkend="gdk-keyval-to-unicode">gdk_keyval_to_unicode</link>() and <link linkend="gdk-unicode-to-keyval">gdk_unicode_to_keyval</link>().
</para>

<para>
One <link linkend="GdkKeymap">GdkKeymap</link> object exists for each user display. GTK 2 supports only one
display, so <link linkend="gdk-keymap-get-default">gdk_keymap_get_default</link>() returns the singleton <link linkend="GdkKeymap">GdkKeymap</link>.  A keymap
is a mapping from <link linkend="GdkKeymapKey">GdkKeymapKey</link> to key values. You can think of a <link linkend="GdkKeymapKey">GdkKeymapKey</link>
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
<firstterm>level</firstterm> 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 "1" on it also has the exclamation point ("!") character on
it. The level indicates whether to use the "1" or the "!" 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
<link linkend="GdkKeymapKey">GdkKeymapKey</link> 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.
</para>

<para>
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 <link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>() 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 "unconsumed modifiers." 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.
</para>

<para>
Note that <link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>() 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.  <link linkend="GdkEventKey">GdkEventKey</link> already
contains this keyval, however, so you don't normally need to call
<link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>() just to get the keyval.

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GdkKeymap">struct GdkKeymap</title>
<programlisting>struct GdkKeymap
{
  GObject parent_instance;
};
</programlisting>
<para>
A <structname>GdkKeymap</structname> defines the translation from keyboard state
(including a hardware key, a modifier mask, and active keyboard group)
to a keyval. This translation has two phases. The first phase is
to determine the effective keyboard group and level for the keyboard
state; the second phase is to look up the keycode/group/level triplet
in the keymap and see what keyval it corresponds to.
</para></refsect2>
<refsect2>
<title><anchor id="GdkKeymapKey">struct GdkKeymapKey</title>
<programlisting>struct GdkKeymapKey
{
  guint keycode;
  gint  group;
  gint  level;
};
</programlisting>
<para>
A <structname>GdkKeymapKey</structname> is a hardware key that can 
be mapped to a keyval.
</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="guint">guint</link> <structfield>keycode</structfield></entry>
<entry>the hardware keycode. This is an identifying number for a 
  physical key.
</entry>
</row>
<row>
<entry><link linkend="gint">gint</link> <structfield>group</structfield></entry>
<entry>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.
</entry>
</row>
<row>
<entry><link linkend="gint">gint</link> <structfield>level</structfield></entry>
<entry>indicates which symbol on the key will be used, in a vertical direction.  So on a standard US keyboard, the key with the number "1" on it also has the 
  exclamation point ("!") character on it. The level indicates whether to use 
  the "1" or the "!" 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.

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-get-default">gdk_keymap_get_default ()</title>
<programlisting><link linkend="GdkKeymap">GdkKeymap</link>*  gdk_keymap_get_default          (void);</programlisting>
<para>
Gets the <link linkend="GdkKeymap">GdkKeymap</link> for the default display.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the default keymap
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-lookup-key">gdk_keymap_lookup_key ()</title>
<programlisting><link linkend="guint">guint</link>       gdk_keymap_lookup_key           (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             const <link linkend="GdkKeymapKey">GdkKeymapKey</link> *key);</programlisting>
<para>
Looks up the keyval mapped to a keycode/group/level triplet.
If no keyval is bound to <parameter>key</parameter>, returns 0. For normal user input,
you want to use <link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>() instead of
this function, since the effective group/level may not be
the same as the current keyboard state.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keymap</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkKeymap">GdkKeymap</link> or <literal>NULL</literal> to use the default keymap
</entry></row>
<row><entry align="right"><parameter>key</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkKeymapKey">GdkKeymapKey</link> with keycode, group, and level initialized
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a keyval, or 0 if none was mapped to the given <parameter>key</parameter>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_keymap_translate_keyboard_state
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> hardware_keycode,
                                             <link linkend="GdkModifierType">GdkModifierType</link> state,
                                             <link linkend="gint">gint</link> group,
                                             <link linkend="guint">guint</link> *keyval,
                                             <link linkend="gint">gint</link> *effective_group,
                                             <link linkend="gint">gint</link> *level,
                                             <link linkend="GdkModifierType">GdkModifierType</link> *consumed_modifiers);</programlisting>
<para>
Translates the contents of a <link linkend="GdkEventKey">GdkEventKey</link> into a keyval, effective
group, and level. Modifiers that affected the translation and
are thus unavailable for application use are returned in
<parameter>consumed_modifiers</parameter>.  See <link linkend="gdk-keyval-get-keys">gdk_keyval_get_keys</link>() for an explanation of
groups and levels.  The <parameter>effective_group</parameter> is the group that was
actually used for the translation; some keys such as Enter are not
affected by the active keyboard group. The <parameter>level</parameter> is derived from
<parameter>state</parameter>. For convenience, <link linkend="GdkEventKey">GdkEventKey</link> already contains the translated
keyval, so this function isn't as useful as you might think.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keymap</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkKeymap">GdkKeymap</link>, or <literal>NULL</literal> to use the default
</entry></row>
<row><entry align="right"><parameter>hardware_keycode</parameter>&nbsp;:</entry>
<entry> a keycode
</entry></row>
<row><entry align="right"><parameter>state</parameter>&nbsp;:</entry>
<entry> a modifier state 
</entry></row>
<row><entry align="right"><parameter>group</parameter>&nbsp;:</entry>
<entry> active keyboard group
</entry></row>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> return location for keyval
</entry></row>
<row><entry align="right"><parameter>effective_group</parameter>&nbsp;:</entry>
<entry> return location for effective group
</entry></row>
<row><entry align="right"><parameter>level</parameter>&nbsp;:</entry>
<entry> return location for level
</entry></row>
<row><entry align="right"><parameter>consumed_modifiers</parameter>&nbsp;:</entry>
<entry> return location for modifiers that were used to determine the group or level
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if there was a keyval bound to the keycode/state/group
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-get-entries-for-keyval">gdk_keymap_get_entries_for_keyval ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_keymap_get_entries_for_keyval
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GdkKeymapKey">GdkKeymapKey</link> **keys,
                                             <link linkend="gint">gint</link> *n_keys);</programlisting>
<para>
Obtains a list of keycode/group/level combinations that will
generate <parameter>keyval</parameter>. 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.
<link linkend="GdkEventKey">GdkEventKey</link> contains a <literal>group</literal> field that indicates the active
keyboard group. The level is computed from the modifier mask.
The returned array should be freed
with <link linkend="g-free">g_free</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keymap</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkKeymap">GdkKeymap</link>, or <literal>NULL</literal> to use the default keymap
</entry></row>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> a keyval, such as <literal>GDK_a</literal>, <literal>GDK_Up</literal>, <literal>GDK_Return</literal>, etc.
</entry></row>
<row><entry align="right"><parameter>keys</parameter>&nbsp;:</entry>
<entry> return location for an array of <link linkend="GdkKeymapKey">GdkKeymapKey</link>
</entry></row>
<row><entry align="right"><parameter>n_keys</parameter>&nbsp;:</entry>
<entry> return location for number of elements in returned array
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if keys were found and returned
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-get-entries-for-keycode">gdk_keymap_get_entries_for_keycode ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_keymap_get_entries_for_keycode
                                            (<link linkend="GdkKeymap">GdkKeymap</link> *keymap,
                                             <link linkend="guint">guint</link> hardware_keycode,
                                             <link linkend="GdkKeymapKey">GdkKeymapKey</link> **keys,
                                             <link linkend="guint">guint</link> **keyvals,
                                             <link linkend="gint">gint</link> *n_entries);</programlisting>
<para>
Returns the keyvals bound to <parameter>hardware_keycode</parameter>.
The Nth <link linkend="GdkKeymapKey">GdkKeymapKey</link> in <parameter>keys</parameter> is bound to the Nth
keyval in <parameter>keyvals</parameter>. Free the returned arrays with <link linkend="g-free">g_free</link>().
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 <link linkend="gdk-keymap-translate-keyboard-state">gdk_keymap_translate_keyboard_state</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keymap</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdkKeymap">GdkKeymap</link> or <literal>NULL</literal> to use the default keymap
</entry></row>
<row><entry align="right"><parameter>hardware_keycode</parameter>&nbsp;:</entry>
<entry> a keycode
</entry></row>
<row><entry align="right"><parameter>keys</parameter>&nbsp;:</entry>
<entry> return location for array of <link linkend="GdkKeymapKey">GdkKeymapKey</link>, or NULL
</entry></row>
<row><entry align="right"><parameter>keyvals</parameter>&nbsp;:</entry>
<entry> return location for array of keyvals, or NULL
</entry></row>
<row><entry align="right"><parameter>n_entries</parameter>&nbsp;:</entry>
<entry> length of <parameter>keys</parameter> and <parameter>keyvals</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if there were any entries
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keymap-get-direction">gdk_keymap_get_direction ()</title>
<programlisting><link linkend="PangoDirection">PangoDirection</link> gdk_keymap_get_direction     (<link linkend="GdkKeymap">GdkKeymap</link> *keymap);</programlisting>
<para>
Returns the direction of the keymap. 
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keymap</parameter>&nbsp;:</entry>
<entry>a <link linkend="GdkKeymap">GdkKeymap</link> or <literal>NULL</literal> to use the default keymap.
Returns: <literal>PANGO_DIRECTION_LTR</literal> or <literal>PANGO_DIRECTION_RTL</literal>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-name">gdk_keyval_name ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gdk_keyval_name                 (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Converts a key value into a symbolic name.
The names are the same as those in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
but without the leading "GDK_".
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry>a key value.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a string containing the name of the key, or <literal>NULL</literal> if <parameter>keyval</parameter> is not
a valid key. The string should not be modified.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-from-name">gdk_keyval_from_name ()</title>
<programlisting><link linkend="guint">guint</link>       gdk_keyval_from_name            (const <link linkend="gchar">gchar</link> *keyval_name);</programlisting>
<para>
Converts a key name to a key value.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval_name</parameter>&nbsp;:</entry>
<entry>a key name.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the corresponding key value, or <literal>GDK_VoidSymbol</literal> if the key name is
not a valid key.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-convert-case">gdk_keyval_convert_case ()</title>
<programlisting>void        gdk_keyval_convert_case         (<link linkend="guint">guint</link> symbol,
                                             <link linkend="guint">guint</link> *lower,
                                             <link linkend="guint">guint</link> *upper);</programlisting>
<para>
Obtains the upper- and lower-case versions of the keyval <parameter>symbol</parameter>.
Examples of keyvals are <link linkend="GDK-a">GDK_a</link>, <link linkend="GDK-Enter">GDK_Enter</link>, <link linkend="GDK-F1-CAPS">GDK_F1</link>, etc.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>symbol</parameter>&nbsp;:</entry>
<entry> a keyval
</entry></row>
<row><entry align="right"><parameter>lower</parameter>&nbsp;:</entry>
<entry> return location for lowercase version of <parameter>symbol</parameter>
</entry></row>
<row><entry align="right"><parameter>upper</parameter>&nbsp;:</entry>
<entry> return location for uppercase version of <parameter>symbol</parameter>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-to-upper">gdk_keyval_to_upper ()</title>
<programlisting><link linkend="guint">guint</link>       gdk_keyval_to_upper             (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Converts a key value to upper case, if applicable.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry>a key value.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the upper case form of <parameter>keyval</parameter>, or <parameter>keyval</parameter> itself if it is already
in upper case or it is not subject to case conversion.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-to-lower">gdk_keyval_to_lower ()</title>
<programlisting><link linkend="guint">guint</link>       gdk_keyval_to_lower             (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Converts a key value to lower case, if applicable.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry>a key value.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the lower case form of <parameter>keyval</parameter>, or <parameter>keyval</parameter> itself if it is already
in lower case or it is not subject to case conversion.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-is-upper">gdk_keyval_is_upper ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_keyval_is_upper             (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Returns <literal>TRUE</literal> if the given key value is in upper case.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry>a key value.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><literal>TRUE</literal> if <parameter>keyval</parameter> is in upper case, or if <parameter>keyval</parameter> is not subject to
case conversion.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-is-lower">gdk_keyval_is_lower ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_keyval_is_lower             (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Returns <literal>TRUE</literal> if the given key value is in lower case.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry>a key value.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><literal>TRUE</literal> if <parameter>keyval</parameter> is in lower case, or if <parameter>keyval</parameter> is not subject to
case conversion.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-keyval-to-unicode">gdk_keyval_to_unicode ()</title>
<programlisting><link linkend="guint32">guint32</link>     gdk_keyval_to_unicode           (<link linkend="guint">guint</link> keyval);</programlisting>
<para>
Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
character.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> a GDK key symbol 
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the corresponding unicode character, or 0 if there
              is no corresponding character.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-unicode-to-keyval">gdk_unicode_to_keyval ()</title>
<programlisting><link linkend="guint">guint</link>       gdk_unicode_to_keyval           (<link linkend="guint32">guint32</link> wc);</programlisting>
<para>
Convert from a ISO10646 character to a key symbol.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>wc</parameter>&nbsp;:</entry>
<entry> a ISO10646 encoded character
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the corresponding GDK key symbol, if one exists.
              or, if there is no corresponding symbol, 
              wc | 0x01000000
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
