Skip to content

Gtk.MnemonicTrigger

class — extends ShortcutTrigger

Triggers when a specific mnemonic is pressed.

Mnemonics require a mnemonic modifier (typically <kbd>Alt</kbd>) to be pressed together with the mnemonic key.

Constructors

new

@classmethod
def new(cls, keyval: int) -> MnemonicTrigger

Creates a GtkShortcutTrigger that will trigger whenever the key with the given keyval is pressed and mnemonics have been activated.

Mnemonics are activated by calling code when a key event with the right modifiers is detected.

Parameters:

  • keyval — The keyval to trigger for

Methods

get_keyval

def get_keyval(self) -> int

Gets the keyval that must be pressed to succeed triggering self.

Properties

keyval

keyval: int  # read/write

The key value for the trigger.