Method

GdkDisplaymap_keyval

Declaration [src]

gboolean
gdk_display_map_keyval (
  GdkDisplay* display,
  guint keyval,
  GdkKeymapKey** keys,
  int* n_keys
)

Description [src]

Obtains a list of keycode/group/level combinations that will generate keyval.

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.

GdkEventKey contains a %group field that indicates the active keyboard group. The level is computed from the modifier mask.

The returned array should be freed with g_free().

Parameters

keyval

Type: guint

A keyval, such as %GDK_KEY_a, %GDK_KEY_Up, %GDK_KEY_Return, etc.

keys

Type: An array of GdkKeymapKey*

Return location for an array of GdkKeymapKey.

The argument will be set by the function.
The length of the array is specified in the n_keys argument.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
n_keys

Type: int*

Return location for number of elements in returned array.

The argument will be set by the function.

Return value

Type: gboolean

TRUE if keys were found and returned.