Package: gdk

Function gdk:display-translate-key

Lambda List

gdk:display-translate-key (display keycode state group)

Arguments

display -- a gdk:display object
keycode -- an unsigned integer with the keycoce
state -- a gdk:modifier-type state
group -- an integer with the active keyboard group

Return Value

keyval - an unsigned integer with the keyval
effective - an integer with the effective group
level - an integer with the level
consumend - a gdk:modifier-type value with the modifiers that were used to determine the group or level

Details

Translates a keycode into a keyval, effective group, and level. Modifiers that affected the translation and are thus unavailable for application use are returned in consumed.

The effective value is the group that was actually used for the translation. Some keys such as Enter are not affected by the active keyboard group. The level value is derived from state.

The consumed value gives modifiers that should be masked out from state when comparing this key press to a keyboard shortcut. For instance, on a US keyboard, the plus symbol is shifted, so when comparing a key press to a <Control>plus accelerator <Shift> should be masked out.
 

See also

2023-7-25