Is it possible to turn off the IME for most of the interface, and only turn it on when a GtkEntry (or other text input fields) are active? I’m developing an application that has one-letter shortcuts, and on Windows I have to switch the IME to English mode to use the shortcuts, and I’m wondering if there’s a way to do that in Gtk(mm)4.
I think it would be good if you could customize the shorcut keys in either your application or IME in case the shorcut keys are conflicted by each other.
IMEs need to receive the shorcut keys at first in case they need to update the preedit text for example.
If you wish to disable the IME with every input contexts of an application, you could run env GTK_IM_MODULE=gtk-im-context-none your_appliction .
If you wish to set an input-method framework to the specific GtkEntry, I think GtkText has “im-module” prooperty.
1 Like