win xp gtk2.24 keypress event trouble

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm building a comand line input with history funktion.
For input i'm using an entry widget.
To get the arrow up/down key presses i connected to the entry's keypress event.

  g_signal_connect(GTK_OBJECT(Entry),
             "key_press_event",
             G_CALLBACK(main_KeyPressCb),
             (gpointer) 0);


The callback sorts out the up/down key events and  returns true.
In all other cases the callback returns false.

static bool main_KeyPressCb(GtkWidget *widget,GdkEventKey *event,
                   gpointer data)
{
  printf("KeyVal %x KeyCode %x\n",event->keyval,event->hardware_keycode);
  if(event->keyval == 0xff52 || event->keyval == 0xff54) return(true);
  return(false);
}


This works fine on my linux debian box.

But on Win XP and Win7 Arrow key presses don't reach the Entry any more.
The entries text can't be edited but normal charakters can be appended.
Even if i return false allways this happens.

Any idea what i can do ?

Best Regards

Joachim Klaehn
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux