Re: Generating a keypress event



Anuradha Ratnaweera wrote:
Hi all,

I am trying to generate a keypress event for the backspace key from
within a GTK IM.  What's the "standard' way of doing this?

And I can't use gtk_im_delete_surrounding(), as not all the widgets
implement it.  This is for a replacement.

This isn't really the answer you want, but there is no standard
way to do so.

All the widgets included with GTK+ support gtk_im_delete_surrounding().
Applications that don't support it should be fixed.

Or, alternatively, hold off on committing text until you know you don't
need to delete anything earlier. If you want to handle text that
you didn't create yourself, then you need to use get_surrounding(),
and if that works, it's reasonable to assume that the widget has also
implemented delete_surrounding().

Regards,
					Owen



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