#!/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" "$@"
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;