0

How do I receive compose-key sequences in Gtk2?

For example, [compose][-][-][-] should produce an em dash, but "key-press-event" just gets called 3 times with a [-].

Is there an "actual-text-input-event" or something like that?

  • Please provide more information. Are these widget signals you are connecting to? – oldtechaa May 20 '16 at 12:56
  • @oldtechaa Yes, I'm using g_signal_connect - but it's just an example - I'm looking for any "proper", high-level way to catch compose input in a GTK window (one that doesn't involve parsing compose key configs manually). Doesn't have to be a GTK function, plain X11 will do. – bydlocoder May 20 '16 at 14:08
  • What I mean is: what is the object emitting these signals? – oldtechaa May 20 '16 at 14:35
  • @oldtechaa The object is a GtkWindow. – bydlocoder May 20 '16 at 15:31
  • You need to use the input method API. For an X11 level example see [this question and answer (shameless plug)](http://stackoverflow.com/questions/18246848/get-utf-8-input-with-x11-display/18288346#18288346). No idea about the Gtk level. – n. m. could be an AI May 21 '16 at 22:43
  • @n.m. Thank you, this is exactly what I was looking for. – bydlocoder May 22 '16 at 11:56

0 Answers0