Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gtk2::gdk::keysyms(3) [suse man page]

build::Keysyms(3)					User Contributed Perl Documentation					 build::Keysyms(3)

NAME
Gtk2::Gdk::Keysyms - key codes for Gtk2 programs SYNOPSIS
use Gtk2; use Gtk2::Gdk::Keysyms; # # the most common use is for deciphering keycodes in key events, # like this: # sub key_press_handler { my ($widget, $event) = @_; if ($event->keyval == $Gtk2::Gdk::Keysyms{Escape}) { abort_whatever (); return 1; } elsif ($event->keyval == $Gtk2::Gdk::Keysyms{F1}) { do_help_thing (); return 1; } elsif ($event->keyval == $Gtk2::Gdk::Keysyms{KP_Enter}) { execute_selected_text_as_command (); return 1; } # we didn't handle it, pass it on... return 0; } DESCRIPTION
Gdk defines symbolic names for the codes associated with each key on a keyboard, so that you don't go nuts with numeric values in your programs. The hash %Gtk2::Gdk::Keysyms holds all those keycodes, indexed by the name, for use in your perl programs when you need to do custom key handling. This commonly occurs when you want to bind an action to a key that isn't usable as an accelerator, or when you don't have accelerators, or if you're trying to write an easter egg, or whatever. As the list of keycodes is quite large and rather rarely used in application code, we've put it in a separately-loaded module to save space. As an alternative, you might want to investigate Gtk2::Gdk-keyval_from_name> which offers basically the same functionality as the hash. To get a list of all available keys, either dump %Gtk2::Gdk::Keysyms, or look at the source of this module with "perldoc -m Gtk2::Gdk::Keysyms". AUTHOR
This module was automatically generated by a very simple perl script from gdk/gdkkeysyms.h. Programs that write programs are the happiest programs of all. COPYRIGHT
Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full list) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. SEE ALSO
perl(1), Gtk2(3pm) perl v5.12.1 2010-07-05 build::Keysyms(3)

Check Out this Related Man Page

Gtk2::Accelerator(3pm)					User Contributed Perl Documentation				    Gtk2::Accelerator(3pm)

NAME
Gtk2::Accelerator METHODS
modifiertype = Gtk2::Accelerator->get_default_mod_mask Gtk2::Accelerator->set_default_mod_mask ($default_mod_mask) o $default_mod_mask (Gtk2::Gdk::ModifierType) string = Gtk2::Accelerator->get_label ($accelerator_key, $accelerator_mods) o $accelerator_key (integer) o $accelerator_mods (Gtk2::Gdk::ModifierType) Since: gtk+ 2.6 string = Gtk2::Accelerator->name ($accelerator_key, $accelerator_mods) o $accelerator_key (integer) o $accelerator_mods (Gtk2::Gdk::ModifierType) (accelerator_key, accelerator_mods) = Gtk2::Accelerator->parse ($accelerator) o $accelerator (string) Returns accelerator_key, an unsigned interger and accelerator_mods, a Gtk2::Gdk::ModifierType. boolean = Gtk2::Accelerator->valid ($keyval, $modifiers) o $keyval (integer) o $modifiers (Gtk2::Gdk::ModifierType) ENUMS AND FLAGS
flags Gtk2::Gdk::ModifierType o 'shift-mask' / 'GDK_SHIFT_MASK' o 'lock-mask' / 'GDK_LOCK_MASK' o 'control-mask' / 'GDK_CONTROL_MASK' o 'mod1-mask' / 'GDK_MOD1_MASK' o 'mod2-mask' / 'GDK_MOD2_MASK' o 'mod3-mask' / 'GDK_MOD3_MASK' o 'mod4-mask' / 'GDK_MOD4_MASK' o 'mod5-mask' / 'GDK_MOD5_MASK' o 'button1-mask' / 'GDK_BUTTON1_MASK' o 'button2-mask' / 'GDK_BUTTON2_MASK' o 'button3-mask' / 'GDK_BUTTON3_MASK' o 'button4-mask' / 'GDK_BUTTON4_MASK' o 'button5-mask' / 'GDK_BUTTON5_MASK' o 'super-mask' / 'GDK_SUPER_MASK' o 'hyper-mask' / 'GDK_HYPER_MASK' o 'meta-mask' / 'GDK_META_MASK' o 'release-mask' / 'GDK_RELEASE_MASK' o 'modifier-mask' / 'GDK_MODIFIER_MASK' SEE ALSO
Gtk2 COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::Accelerator(3pm)
Man Page