gdk.keymap
Module for [Keymap] class
Types 3
classKeymap : gobject.object.ObjectWrap
A #GdkKeymap 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.
Methods
KeymapGidBuilder builder()Get builder for [gdk.keymap.Keymap] Returns: New builder objectgdk.keymap.Keymap getDefault()Returns the #GdkKeymap attached to the default display. Returns: the #GdkKeymap attached to the default display.gdk.keymap.Keymap getForDisplay(gdk.display.Display display)Returns the #GdkKeymap attached to display.void addVirtualModifiers(ref gdk.types.ModifierType state)Maps the non-virtual modifiers (i.e Mod2, Mod3, ...) which are set in state to the virtual modifiers (i.e. Super, Hyper and Meta) and set the corresponding bits in state.bool getCapsLockState()Returns whether the Caps Lock modifer is locked. Returns: true if Caps Lock is onpango.types.Direction getDirection()Returns the direction of effective layout of the keymap. Returns: [pango.types.Direction.Ltr] or [pango.types.Direction.Rtl] if it can determine the direction. [pango.types.Direction.Neutral] other...bool getEntriesForKeycode(uint hardwareKeycode, out gdk.types.KeymapKey[] keys, out uint[] keyvals)Returns the keyvals bound to hardware_keycode. The Nth #GdkKeymapKey in keys is bound to the Nth keyval in keyvals. Free the returned arrays with [glib.global.gfree]. When a keycode is pressed by t...bool getEntriesForKeyval(uint keyval, out gdk.types.KeymapKey[] keys)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 ...gdk.types.ModifierType getModifierMask(gdk.types.ModifierIntent intent)Returns the modifier mask the keymap’s windowing system backend uses for a particular purpose.uint getModifierState()Returns the current modifier state. Returns: the current modifier state.bool getNumLockState()Returns whether the Num Lock modifer is locked. Returns: true if Num Lock is onbool getScrollLockState()Returns whether the Scroll Lock modifer is locked. Returns: true if Scroll Lock is onbool haveBidiLayouts()Determines if keyboard layouts for both right-to-left and left-to-right languages are in use. Returns: true if there are layouts in both directions, false otherwiseuint lookupKey(gdk.types.KeymapKey key)Looks up the keyval mapped to a keycode/group/level triplet. If no keyval is bound to key, returns 0. For normal user input, you want to use [gdk.keymap.Keymap.translateKeyboardState] instead of th...bool mapVirtualModifiers(ref gdk.types.ModifierType state)Maps the virtual modifiers (i.e. Super, Hyper and Meta) which are set in state to their non-virtual counterparts (i.e. Mod2, Mod3,...) and set the corresponding bits in state.bool translateKeyboardState(uint hardwareKeycode, gdk.types.ModifierType state, int group, out uint keyval, out int effectiveGroup, out int level, out gdk.types.ModifierType consumedModifiers)Translates the contents of a #GdkEventKey into a keyval, effective group, and level. Modifiers that affected the translation and are thus unavailable for application use are returned in consumedmod...gulong connectDirectionChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.keymap.Keymap)))
&& Parameters!T.length < 2)Connect to `DirectionChanged` signal.gulong connectKeysChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.keymap.Keymap)))
&& Parameters!T.length < 2)Connect to `KeysChanged` signal.gulong connectStateChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.keymap.Keymap)))
&& Parameters!T.length < 2)Connect to `StateChanged` signal.