Re: IME and GTK Input Method Contexts

aniket ray wrote:
Is there a way to find out if an IME is active or not, within a gtk application.
I tried sending key events to the GtkIMContext using
gtk_im_context_filter_keypress. This seems to be returning true, even
if no ime is active.

What i want to achieve is that if no IME is active, i want to handle
the keypress following my logic, else i want the ime to handle it.
In key press call back itself you can catch the events. Return TRUE after handling those events (value will be stored in event->keyval). If you return FALSE, default event handlers will handle those events. It means user defined callback will get the priority.

So i did a
if(gtk_im_context_filter_keypress(sIMContext, event))
  //do minor logic, remaining logic in the commit and preedit_changed callback
  //process event

The problem i am facing is that gtk_im_context_filter_keypress is
always returning true.

gtk-i18n-list mailing list
gtk-i18n-list gnome org


Girish A J
Software-Engineer,		  		Ph: (80) 6655 1000   Ext 121
Geodesic Information Systems Ltd.	Fax:(80) 6655 1029
Nagashetty Halli.
Bangalore - 560 094

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