Class: Gdk::KeyEvent
Overview
An event related to a key-based device.
Instance Method Summary collapse
-
#consumed_modifiers ⇒ Gdk::ModifierType
Extracts the consumed modifiers from a key event.
-
#get_match(keyval, modifiers) ⇒ Boolean
Gets a keyval and modifier combination that will match the event.
-
#is_modifier ⇒ Boolean
Extracts whether the key event is for a modifier key.
-
#keycode ⇒ Integer
Extracts the keycode from a key event.
-
#keyval ⇒ Integer
Extracts the keyval from a key event.
-
#layout ⇒ Integer
Extracts the layout from a key event.
-
#level ⇒ Integer
Extracts the shift level from a key event.
-
#matches(keyval, modifiers) ⇒ Gdk::KeyMatch
Matches a key event against a keyval and modifiers.
Methods inherited from Event
#_get_angle, #_get_center, #_get_distance, #device, #device_tool, #display, #event_sequence, #event_type, #get_axes, #get_axis, #get_history, #get_position, #modifier_state, #pointer_emulated, #ref, #seat, #surface, #time, #triggers_context_menu, #unref
Instance Method Details
#consumed_modifiers ⇒ Gdk::ModifierType
Extracts the consumed modifiers from a key event.
#get_match(keyval, modifiers) ⇒ Boolean
Gets a keyval and modifier combination that will match the event.
See [methodGdk.KeyEvent.matches].
#is_modifier ⇒ Boolean
Extracts whether the key event is for a modifier key.
#keycode ⇒ Integer
Extracts the keycode from a key event.
#keyval ⇒ Integer
Extracts the keyval from a key event.
#layout ⇒ Integer
Extracts the layout from a key event.
#level ⇒ Integer
Extracts the shift level from a key event.
#matches(keyval, modifiers) ⇒ Gdk::KeyMatch
Matches a key event against a keyval and modifiers.
This is typically used to trigger keyboard shortcuts such as Ctrl-C.
Partial matches are possible where the combination matches if the currently active group is ignored.
Note that we ignore Caps Lock for matching.