Difference between revisions of "Input methods"
m (Replaced dead link with link to Wayback Machine archived version) |
(Moved content from uncategorised "IBus" page) |
||
Line 29: | Line 29: | ||
* Run <code>tqtconfig</code> to choose your favorite XIM input style |
* Run <code>tqtconfig</code> to choose your favorite XIM input style |
||
+ | |||
+ | === IBus === |
||
+ | IBus is a multilingual input method commonly used for input in languages like Chinese. |
||
+ | |||
+ | IBus works is confirmed to work with Trinity, with the changes below: |
||
+ | |||
+ | |||
+ | '''1. Applications need this variable in their environment:''' |
||
+ | |||
+ | <syntaxhighlight lang="shell-session"> |
||
+ | $ export XMODIFIERS=@im=ibus |
||
+ | </syntaxhighlight> |
||
+ | |||
+ | You can add it in your ~/.bashrc or in the terminal just before launching the application. |
||
+ | |||
+ | |||
+ | '''2. IBus daemon needs to be in XIM mode''' |
||
+ | |||
+ | <syntaxhighlight lang="shell-session"> |
||
+ | $ ibus-daemon --xim -d |
||
+ | </syntaxhighlight> |
||
+ | |||
+ | |||
+ | '''3. Enable the "Embed preedit text" option.''' |
||
+ | |||
+ | Otherwise it appears at the bottom left corner of the window. |
||
+ | |||
+ | Right-click on the IBus applet, go to <code>Preferences</code> and enable the "Embed preedit text in application window" option. |
||
+ | |||
+ | |||
+ | ====Known pitfalls==== |
||
+ | * If QT_IM_MODULE is defined (even if it is empty), it blocks IBus. Make sure it's not set anywhere. Remove it from any file, like <tt>~/.xprofile</tt> or <tt>~/.bashrc</tt>. |
||
+ | |||
+ | * You need to launch IBus first. |
||
+ | |||
+ | * If IBus is closed while an application is using it, the app will crash. |
||
Latest revision as of 17:50, 1 January 2022
TQt comes with immodule, a modular, extensible input method subsystem. The main goal of immodule is to extend and enhance the input method support in the TQt library, in order to provide a modern and powerful multi-language input system, and is similar to the immodule for GTK+.
Installation
immodule is part of the standard TQt distribution.
immodule provides two additional ./configure options:
Options | Description |
---|---|
$ ./configure -inputmethod
|
Build TQt with 'Binary Compatible' immodule support (default) |
$ ./configure -inputmethod -inputmethod-ext
|
Build TQt without binary compatibility, but supports more advanced immodule extensions.
It cannot be used with ordinary application binaries (i.e. the option is for developers) |
You should choose 'Binary Compatible' for normal use.
How to use
- See users manual of each input method plugins
- Run
tqtconfig
to choose your favorite XIM input style
IBus
IBus is a multilingual input method commonly used for input in languages like Chinese.
IBus works is confirmed to work with Trinity, with the changes below:
1. Applications need this variable in their environment:
$ export XMODIFIERS=@im=ibus
You can add it in your ~/.bashrc or in the terminal just before launching the application.
2. IBus daemon needs to be in XIM mode
$ ibus-daemon --xim -d
3. Enable the "Embed preedit text" option.
Otherwise it appears at the bottom left corner of the window.
Right-click on the IBus applet, go to Preferences
and enable the "Embed preedit text in application window" option.
Known pitfalls
- If QT_IM_MODULE is defined (even if it is empty), it blocks IBus. Make sure it's not set anywhere. Remove it from any file, like ~/.xprofile or ~/.bashrc.
- You need to launch IBus first.
- If IBus is closed while an application is using it, the app will crash.
Environment variables
Some environment variables are available for expert users and system integrators. See following examples to use the variables.
Example | Description |
---|---|
$ export TQT_IM_MODULE=xim
|
Set "xim" input method as default |
$ export TQT_IM_MODULE=simple
|
Set "simple" composing input method as default |
$ export TQT_IM_SWITCHER=imsw-none
$ export TQT_IM_MODULE=xim
|
Set "xim" input method as default, and disable input method selection menu in the context menu* |
$ export TQT_IM_SWITCHER=imsw-multi
$ export TQT_IM_MODULE=xim
|
Set "xim" input method as default, and enable input method selection menu in the context menu* (default configuration) |
$ export TQT_IM_SWITCHER=imsw-none
$ export TQT_IM_MODULE=iiimqcf
|
Set "iiimqcf" that has its own input method switching framework as default, and disable input method selection menu in the context menu.
Such configuration is required by some system integrators to provide unified user interface for global input method switching over the desktop |
* Input method selection menu might not be available in some TDE apps.
Links
- Archived immodule-qt web-site (2004/09/30)
- README.immodule in the TQt source repository (this article was based on this README)