Keymap
Object Hierarchy:
Description:
public class Keymap :
Object
A Keymap 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.
Content:
Static methods:
Creation methods:
Methods:
- public void add_virtual_modifiers (ModifierType state)
Maps the non-virtual modifiers (i.
- public bool get_caps_lock_state ()
Returns whether the Caps Lock modifer is locked.
- public Direction get_direction ()
Returns the direction of effective layout of the keymap.
- public bool get_entries_for_keycode (uint hardware_keycode, out KeymapKey[] keys, out uint[] keyvals, out int n_entries)
Returns the keyvals bound to hardware_keycode.
- public bool get_entries_for_keyval (uint keyval, out unowned KeymapKey[] keys)
Obtains a list of keycode/group/level combinations that will generate
keyval.
- public bool have_bidi_layouts ()
Determines if keyboard layouts for both right-to-left and
left-to-right languages are in use.
- public uint lookup_key (KeymapKey key)
Looks up the keyval mapped to a keycode/group/level triplet.
- public bool map_virtual_modifiers (ModifierType state)
Maps the virtual modifiers (i.
- public bool translate_keyboard_state (uint hardware_keycode, ModifierType state, int group, uint keyval, int effective_group, int level, ModifierType consumed_modifiers)
Translates the contents of a
EventKey into a keyval, effective group, and level.
Signals:
- public virtual signal void direction_changed ()
The direction_changed signal gets emitted
when the direction of the keymap changes.
- public virtual signal void keys_changed ()
The keys_changed signal is emitted when
the mapping represented by keymap changes.
- public virtual signal void state_changed ()
The state_changed signal is emitted when
the state of the keyboard changes, e.
Fields:
Inherited Members:
All known members inherited from class GLib.Object