Gnome::Gtk4::KeyvalTrigger
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
Description
A Gnome::Gtk4::ShortcutTrigger that triggers when a specific keyval and modifiers are pressed.
Uml Diagram =for image :src<asset_files/images/plantuml/KeyvalTrigger.png> :width<70%> :class<inline>
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
#-------------------------------------------------------------------------------
new-keyvaltrigger
Creates a Gnome::Gtk4::ShortcutTrigger that will trigger whenever
the key with the given $keyval and $modifiers is pressed.
method new-keyvaltrigger (
UInt() $keyval, UInt $modifiers
--> Gnome::Gtk4::KeyvalTrigger
)
$keyval; The keyval to trigger for.
$modifiers; the modifiers that need to be present.
Example
Example to initialize the object
my Gnome::Gtk4::KeyvalTrigger $keyvaltrigger;
$keyvaltrigger .= new-keyvaltrigger( GDK_KEY_M, GDK_SHIFT_MASK);
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
Methods
#-------------------------------------------------------------------------------
get-keyval
Gets the keyval that must be pressed to succeed triggering this object.
method get-keyval ( --> UInt )
Return value; the keyval. Note that the key value can be changed. Tests show that uppercase letters are changed to lowercase.
#-------------------------------------------------------------------------------
get-modifiers
Gets the modifiers that must be present to succeed triggering this object.
method get-modifiers ( --> UInt )
Return value; the modifiers.