+
+ if (!$event->state) {
+ for (my $i=1; $i<5; $i++) {
+ if ($keyval == $Gtk2::Gdk::Keysyms{"F${i}"}) {
+ snom_key("F${i}");
+ return TRUE;
+ }
+ }
+ } else {
+ if ($event->state eq 'mod1-mask') {
+ for (my $i=1; $i<13; $i++) {
+ if ($keyval == $Gtk2::Gdk::Keysyms{"F${i}"}) {
+ snom_key("P${i}");
+ return TRUE;
+ }
+ }
+ }
+ }
+
+ print "Unhandled: Modifier: ".$event->state.", Key: ";
+ foreach my $key (keys(%Gtk2::Gdk::Keysyms)) {
+ if ($keyval == $Gtk2::Gdk::Keysyms{$key}) {
+ print "${key}\n";
+ return TRUE;
+ }
+ }
+ print "ERR\n";
+ return FALSE;