Gtk2::AccelMap(3)
π NAME π
Gtk2::AccelMap β bestie, it's a wrapper for GtkAccelMap β¨
Like, this is the thing that keeps track of all ur keyboard shortcuts (accelerators) in a GTK app. That's it, that's the whole vibe. π
π¦ HIERARCHY π¦
ok so here's the family tree, and yes she's an only child:
Glib::Object
+----Gtk2::AccelMap
One ancestor, zero drama. π
β¨ METHODS β¨
Gtk2::AccelMap->add_entry ($accel_path, $accel_key, $accel_mods)
Adds an entry, obviously. Take these:
$accel_path(string) πΈ$accel_key(integer) π₯$accel_mods(Gtk2::Gdk::ModifierType) β¨
Gtk2::AccelMap->add_filter ($filter_pattern)
$filter_pattern(string) π¦
boolean = Gtk2::AccelMap->change_entry ($accel_path, $accel_key, $accel_mods, $replace)
Gives u back a boolean, bestie. The deets:
$accel_path(string) πΈ$accel_key(integer) π₯$accel_mods(Gtk2::Gdk::ModifierType) β¨$replace(boolean) π
Gtk2::AccelMap->foreach ($data, $foreach_func)
$data(scalar) π$foreach_func(scalar) π§
Gtk2::AccelMap->foreach_unfiltered ($data, $foreach_func)
$data(scalar) π$foreach_func(scalar) π§
accelmap = Gtk2::AccelMap->get
Returns u an accelmap. Since: gtk+ 2.4 β
Gtk2::AccelMap->load ($file_name)
$file_name(string) π
Gtk2::AccelMap->load_fd ($fd)
$fd(integer) π’
Gtk2::AccelMap->lock_path ($accel_path)
$accel_path(string) πΈ
Since: gtk+ 2.4 β
(accel_key, accel_mods, accel_flags) = Gtk2::AccelMap->lookup_entry ($accel_path)
$accel_path(string) πΈ
Heads up: it returns empty if there's no accelerator found for the path u gave it. But if there is one? U get back accel_key (integer), accel_mods (Gtk2::Gdk::ModifierType), and accel_flags (integer). Iconic behaviour honestly. π
Gtk2::AccelMap->save ($file_name)
$file_name(string) π
Gtk2::AccelMap->save_fd ($fd)
$fd(integer) π’
Gtk2::AccelMap->unlock_path ($accel_path)
$accel_path(string) πΈ
Since: gtk+ 2.4 β
π FOREACH CALLBACK π
ok so listen: the foreach callbacks ignore any returned values, and the parameters below get passed to the callback β and any modifications are ignored. Periodt. π
accel_path (string)
accel_key (integer)
GdkModifierType accel_mods (Gtk2::Gdk::ModifierType)
changed (boolean)
user_date (scalar)
π₯ SIGNALS π₯
changed(Gtk2::AccelMap, string, Glib::UInt, Gtk2::Gdk::ModifierType) π
π ENUMS AND FLAGS π
flags Gtk2::Gdk::ModifierType
All of them, no skips, no cap:
'shift-mask'/'GDK_SHIFT_MASK'π'lock-mask'/'GDK_LOCK_MASK'π'control-mask'/'GDK_CONTROL_MASK'π'mod1-mask'/'GDK_MOD1_MASK'π'mod2-mask'/'GDK_MOD2_MASK'π'mod3-mask'/'GDK_MOD3_MASK'π'mod4-mask'/'GDK_MOD4_MASK'π'mod5-mask'/'GDK_MOD5_MASK'π'button1-mask'/'GDK_BUTTON1_MASK'π'button2-mask'/'GDK_BUTTON2_MASK'π'button3-mask'/'GDK_BUTTON3_MASK'π'button4-mask'/'GDK_BUTTON4_MASK'π'button5-mask'/'GDK_BUTTON5_MASK'π'super-mask'/'GDK_SUPER_MASK'π'hyper-mask'/'GDK_HYPER_MASK'π'meta-mask'/'GDK_META_MASK'π'release-mask'/'GDK_RELEASE_MASK'π'modifier-mask'/'GDK_MODIFIER_MASK'π
π SEE ALSO π
- Gtk2 π«Ά
- Glib::Object π«Ά
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team. πΈ
This software is licensed under the LGPL. See Gtk2 for a full notice. π
and that's the whole page bestie, go forth and bind ur accelerators π β¨
this one came from perl v5.42.0, dated 2025-07-25 β yeah it's giving vintage but she still slays ππ¦
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms