Gdk.KeyEvent¶
- Subclasses:
None
Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
None
Fields¶
None
Class Details¶
- class Gdk.KeyEvent¶
- Bases:
- Abstract:
No
An event related to a key-based device.
- get_consumed_modifiers()[source]¶
- Returns:
the consumed modifiers or self
- Return type:
Extracts the consumed modifiers from a key event.
- get_keycode()[source]¶
- Returns:
the keycode of self
- Return type:
Extracts the keycode from a key event.
- get_keyval()[source]¶
- Returns:
the keyval of self
- Return type:
Extracts the keyval from a key event.
- get_layout()[source]¶
- Returns:
the layout of self
- Return type:
Extracts the layout from a key event.
- get_level()[source]¶
- Returns:
the shift level of self
- Return type:
Extracts the shift level from a key event.
- get_match()[source]¶
- Returns:
True
on success- keyval:
return location for a keyval
- modifiers:
return location for modifiers
- Return type:
(
bool
, keyval:int
, modifiers:Gdk.ModifierType
)
Gets a keyval and modifier combination that will match the event.
See [method`Gdk`.KeyEvent.matches].
- matches(keyval, modifiers)[source]¶
- Parameters:
keyval (
int
) – the keyval to matchmodifiers (
Gdk.ModifierType
) – the modifiers to match
- Returns:
a
GdkKeyMatch
value describing whether self matches- Return type:
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.