Re: [gtk-list] dead keys and key_press_event reporting




On Mon, 4 Oct 1999, Oskar Liljeblad wrote:
> 
> Is there anything I can do so that key presses in a GtkWindow are reported
> like those in GtkEntry?
> 
> (Does this have anything to do with what event types a certain
> X window listens for?)
> 

The difference is that a GdkEventKey contains two fields:
 event->keyval is the keysym that was pressed
 event->string is the "text" corresponding to the keyval

GtkEntry uses event->string to get the text to place in the entry. If you
press a key with an empty event->string (such as a modifier key) then no 
text is inserted and there's no "changed" signal from the entry.

Accelerators are based on event->keyval instead of event->string.

This is from memory, I could be wrong.

Havoc




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