:right-sidebar: True KeyvalTrigger =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: KeyvalTrigger(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.ShortcutTrigger`, :class:`~gi.repository.GObject.Object` A ``GtkShortcutTrigger`` that triggers when a specific keyval and modifiers are pressed. Constructors ------------ .. rst-class:: interim-class .. class:: KeyvalTrigger :no-index: .. classmethod:: new(keyval: int, modifiers: ~gi.repository.Gdk.ModifierType) -> ~gi.repository.Gtk.ShortcutTrigger Creates a ``GtkShortcutTrigger`` that will trigger whenever the key with the given ``keyval`` and ``modifiers`` is pressed. :param keyval: The keyval to trigger for :param modifiers: the modifiers that need to be present Methods ------- .. rst-class:: interim-class .. class:: KeyvalTrigger :no-index: .. method:: get_keyval() -> int Gets the keyval that must be pressed to succeed triggering ``self``. .. method:: get_modifiers() -> ~gi.repository.Gdk.ModifierType Gets the modifiers that must be present to succeed triggering ``self``. Properties ---------- .. rst-class:: interim-class .. class:: KeyvalTrigger :no-index: .. attribute:: props.keyval :type: int The key value for the trigger. .. attribute:: props.modifiers :type: ~gi.repository.Gdk.ModifierType The key modifiers for the trigger.