.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "build::Keysyms 3pm" .TH build::Keysyms 3pm "2019-09-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::Gdk::Keysyms \- key codes for Gtk2 programs .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& 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\*(Aqt handle it, pass it on... \& return 0; \& } .Ve .SH "DESCRIPTION" .IX Header "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 \f(CW%Gtk2::Gdk::Keysyms\fR 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. .PP 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 \f(CW\*(C`Gtk2::Gdk\->keyval_from_name\*(C'\fR which offers basically the same functionality as the hash. .PP To get a list of all available keys, either dump \f(CW%Gtk2::Gdk::Keysyms\fR, or look at the source of this module with \f(CW\*(C`perldoc \-m Gtk2::Gdk::Keysyms\*(C'\fR. .SH "AUTHOR" .IX Header "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. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003, 2009 by the gtk2\-perl team (see the file \s-1AUTHORS\s0 for the full list) .PP This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 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. .PP This library is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Library General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA\s0 02110\-1301 \s-1USA.\s0 .SH "SEE ALSO" .IX Header "SEE ALSO" perl, Gtk2, Gtk2::Gdk