Package: gdk

Function gdk-keymap-add-virtual-modifiers

Lambda List

gdk-keymap-add-virtual-modifiers (keymap state)

Arguments

keymap -- a gdk-keymap object
state -- a value of the gdk-modifier-type flags

Return Value

The gdk-modfier-type flags.

Details

Adds virtual modifiers (i.e. Super, Hyper and Meta) which correspond to the real modifiers (i.e. Mod2, Mod3, ...) in modifiers and set the corresponding bits in state.

GDK already does this before delivering key events, but for compatibility reasons, it only sets the first virtual modifier it finds, whereas this function sets all matching virtual modifiers.

This function is useful when matching key events against accelerators.

Example

(gdk-keymap-add-virtual-modifiers keymap :mod4-mask)
=> (:MOD4-MASK :SUPER-MASK :HYPER-MASK)    
 

See also

2021-12-13