From: simigern Date: Sun, 21 May 2006 12:42:40 +0000 (+0000) Subject: add support for keypad X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/snom-frontend/commitdiff_plain/824f34a515b11406e826ffa05754610e9df94da3 add support for keypad --- diff --git a/snom.pl b/snom.pl index b2d4a21..be082e5 100755 --- a/snom.pl +++ b/snom.pl @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: snom.pl,v 1.4 2006-05-21 12:29:13 simigern Exp $ +#$Id: snom.pl,v 1.5 2006-05-21 12:42:40 simigern Exp $ PATH=/opt/csw/bin:/opt/local/bin:/usr/bin:/bin exec perl -w -x "$0" "$@" @@ -272,7 +272,14 @@ sub KBDInput my ($widget, $event) = @_; my $keyval = $event->keyval; - foreach my $i (1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 'F1', 'F2', 'F3', 'F4') { + foreach my $i (1, 2, 3, 4, 5, 6, 7, 8, 9, 0) { + if ($keyval == $Gtk2::Gdk::Keysyms{$i} || $keyval == $Gtk2::Gdk::Keysyms{"KP_${i}"}) { + snom_key($i); + return TRUE; + } + } + + foreach my $i ('F1', 'F2', 'F3', 'F4') { if ($keyval == $Gtk2::Gdk::Keysyms{$i}) { snom_key($i); return TRUE;