Documentation



Contents



Adding ibus-typing-booster to your desktop

This section assumes that you have already installed ibus-typing-booster either using binary packages or from source and now want to add an ibus-typing-booster input method to your desktop.

The procedure to add an ibus-typing-booster input method differs slightly depending on which type of desktop you use, the following sections show the procedure for popular desktop choices.



When using the Gnome3 desktop


Open the Gnome3 control center

First click on the panel menu in the top right corner of the desktop and then click on the “screwdriver and wrench” icon to open the Gnome3 control center.


Open the “Region & Language” settings

Now the Gnome3 control center has opened. Click on the icon for the “Region & Language” settings.


The Gnome3 “Region & Language” settings

Now the Gnome3 “Region & Language” settings dialogue has opened.

At the bottom you see a list of input sources which have already been added to the desktop before. In this case there are already: “English (US, with euro on 5)” and “Japanese (Kana Kanji)”. This is just an example of course, the list of already added input methods could look different for you. The first entry, “English (US, with euro on 5)”, is not really an input engine, it is just a keyboard layout. One can see that an entry in the list of input sources is a keyboard layout if it does not have the icon showing two tooth-wheels at the right side.

It is recommended to use a keyboard layout with ibus-typing-booster which has a real “AltGr” key and does not just make the “AltGr” or “Alt” key on the right side of the space bar basically a duplicate of the left “Alt” key. For details, see The “AltGr” key.

The second entry, “Japanese (Kana Kanji)” is an input engine, it has the icon showing two tooth wheels at the right side.

Now click on the “+” button at the lower left to add another input source.


The Gnome3 “Add an Input Source” dialouge

Then click on the three vertical dots “⋮” to open the search entry field.


The Gnome3 “Add an Input Source” search entry

Type the word “booster” into the search entry field. All languages which are supported by ibus-typing-booster are listed now.


The Gnome3 “Add an Input Source” “Add” button

Scroll to the main language you want to use and select it. You may see typing booster engines for several variants of that language listed, in this example for three variants of German.

Select the variant of typing booster you want and click the “Add” button at the top right.


An ibus-typing-booster engine has been added in Gnome3

Now you you see an ibus-typing-booster engine listed in the “Region & Language” dialogue of Gnome3.

If you select it, a tooth wheel appears at the bottom right of the dialogue, clicking that opens the setup tool of that ibus-typing-booster engine.


The ibus-typing-booster setup tool

Here you see the setup tool of that ibus-typing-booster engine where you can customize ibus-typing-booster according to your preferences.


Selecting an ibus-typing-booster engine in the Gnome panel

Now open some programs where you could type something, for example “gedit” or “gnome-terminal”. And activate the ibus-typing-booster engine you want to use in the input source menu of the Gnome panel as shown in this screenshot.

When the input source menu of the Gnome panel is open and an ibus-typing-booster engine is selected, there is a menu entry “Setup” which is an quicker way to open the setup tool than going to the “Region & Language” settings dialogue.

Some options are also directly available in the input source menu of the gnome panel to have quicker access to these often used options than having to open the setup tool. There are also key bindings and mouse bindings for these frequently used options which are shown in the input source menu of the gnome panel as well as a reminder.


Typing with ibus-typing-booster into gedit

Now type something, for example into gedit and you should see some suggestions for completions.

At the beginning, the suggestions only come from the hunspell dictionaries and are thus not very good yet. But ibus-typing-booster learns from your typing, it remembers which words you use often in which context. Therefore, the suggestions become much better over time.

To switch between ibus-typing-booster and other input methods or a simple keyboard layout, you can use the input sources menu in the Gnome panel or the keyboard shortcut, which is Super+Space by default (can be changed in the gnome-control-center).



When using other desktops than Gnome3

This chapter shows how to add an ibus-typing-booster input method on most desktops except Gnome3 and Unity. The screenshots in this chapter are using XFCE, but it is the same procedure on most other desktops and window managers as well, only Gnome3 and Unity are a bit special.

First start the ibus-setup program (For example by typing ibus-setup & into a terminal.


ibus-setup asks to start ibus-daemon

If ibus-daemon is not yet running, ibus-setup may ask whether you want to start it. In that case click on “Yes”.

If ibus-daemon was not already running, you probably also want to make it run automatically every time when you log into your desktop. If you are using Fedora you can do that for most desktops and window managers using imsettings-switch like this:

imsettings-switch ibus

This will change some settings so that when you log in next time, ibus-daemon will be running and the following environment variables will be set:

export QT_IM_MODULE=ibus

export XMODIFIERS=@im=ibus

export GTK_IM_MODULE=ibus

If you don’t use Fedora and do not have the imsettings-switch, there may be some other way to start ibus-daemon on your system automatically and to set the above environment variables.

Or you can put the above environment variables into your ~/.bashrc file and start ibus-daemon from some X11 startup file or make your windowmanager start it. I am using the “i3” windowmanager at the moment and have added the line exec ibus-daemon -drx to my ~/.config/i3/config file.


ibus-setup user interface, “General” tab

In the “General” tab of ibus-setup you see that the default shortcut key to switch between input methods is “Super+Space” and you can change this and some other options if you like.

Personally I like the extra property panel. Therefore, I set the “Show property panel” option to “Always” here.

You probably also want the option “Show icon on system tray” switched on.

And I usually choose a somewhat bigger font to be able to see the details in the emoji better.


ibus-setup user interface, “Input Method” tab

Now use the “Input Method” tab of ibus-setup to add an ibus-typing-booster engine.

You see a list of input sources which have already been added to the desktop before. In this case there are already: “English - English (international AltGr dead keys)” and “Japanese (Kana Kanji)”. This is just an example of course, the list of already added input methods could look different for you. The first entry, “English - English (international AltGr dead keys)”, is not really an input engine, it is just a keyboard layout.

It is recommended to use a keyboard layout with ibus-typing-booster which has a real “AltGr” key and does not just make the “AltGr” or “Alt” key on the right side of the space bar basically a duplicate of the left “Alt” key. For details, see The “AltGr” key. By the way, in the “Advanced” tab of ibus-setup there is an option “Use system keyboard layout”, if this option is selected, ibus-typing-booster will always use the system keyboard layout, otherwise it will use the keyboard layout from the list of input methods which was used last before switching to ibus-typing-booster.

The second entry which is already there in the list of input methods, “Japanese (Kana Kanji)”, is a real input engine, not a keyboard layout.

Now click on the “Add” button at top right to add another input source.


ibus-setup user interface, “Select an input method”

If you do not see the main language you want to use listed already, click on the three vertical dots “⋮” to open the search entry field.


ibus-setup user interface “Select an input method” search entry

Now either scroll through the list or type the name of your language.


ibus-setup user interface “Select an input method” searched for “german”

For example, when searching for “german”, it looks as in this screenshot.


ibus-setup user interface “Select an input method”, German input methods

Select your langauge, in this case “German” and scroll through the list of German input methods shown until you find one with “Typing Booster” in the name. There maybe more than one for variants of the language. Select the typing booster engine for your preferred language variant.

Click the “Add” button.


ibus-setup user interface “Select an input method”, typing booster added

Now an ibus-typing-booster engine has been added to the list of input methods configured and it looks as in this screenshot.

If you select that typing-booster engine, you can click the “Preferences” button to open the setup tool of that typing-booster-engine.


The ibus-typing-booster setup tool

Here you see the setup tool of that ibus-typing-booster engine where you can customize ibus-typing-booster according to your preferences.


Selecting an ibus-typing-booster engine in the system tray

Now open some programs where you could type something, for example “gedit” or “gnome-terminal”. And activate the ibus-typing-booster engine you want to use by clicking on the icon for the input methods in the system tray and selecting the ibus-typing-booster engine in the menu which opens.

When the input method menu of system tray icon is open and an ibus-typing-booster engine is selected, there is a menu entry “Setup” which is a quicker way to open the setup tool of that ibus-typing-booster engine than doing it with ibus-setup.

Some options are also directly available in the input method menu of the system tray icon to have quicker access to these often used options than having to open the setup tool of the ibus-typing-booster engine. There are also key bindings and mouse bindings for these frequently used options which are shown in the input method menu of the system tray icon as well as a reminder.

On the top left of this screenshot you see the “property panel” which shows the current status of some frequently used options which can also be changed by clicking on the “property panel”. The “property panel” also offers a button to open the setup tool of the ibus-typing-booster engine. You can move that “property panel” to around on your desktop to a convenient place.


Typing with ibus-typing-booster into gedit

Now type something, for example into gedit and you should see some suggestions for completions.

At the beginning, the suggestions only come from the hunspell dictionaries and are thus not very good yet. But ibus-typing-booster learns from your typing, it remembers which words you use often in which context. Therefore, the suggestions become much better over time.

To switch between ibus-typing-booster and other input methods or a simple keyboard layout, you can use the input methods menu you get by clicking on the system tray icon or you can use the keyboard shortcut, which is Super+Space by default (can be changed using ibus-setup).



When using the Unity desktop on Ubuntu

This section shows the setup of ibus-typing-booster on the “Unity” desktop of ubuntu-16.04.


Open the System Settings Language Support

Open the system settings by clicking on the icon showing a tooth-wheel and a wrench a the left side of the screen. Then click on the “Language Support” icon there. In the dialog which opens, make sure that “Keyboard input method system” is set to “IBus”.

Close that “Language Support” dialogue again and click on the “Text Entry” icon in the system settings.


Text Entry dialog in the System Settings

Some input sources may be already be listed at the left side of this dialogue. In this example we see “English (US, with euro on 5)” which is not really an input engine, it is just a keyboard layout.

It is recommended to use a keyboard layout with ibus-typing-booster which has a real “AltGr” key and does not just make the “AltGr” or “Alt” key on the right side of the space bar basically a duplicate of the left “Alt” key. For details, see The “AltGr” key.

Now click on the “+” button at the lower left to add another input source.


Choose an input source dialogue

Type the word “booster” into the search entry and you see the currently available language variants of ibus-typing-booster. Select the variant of ibus-typing-booster you want to use and click on “Add”.


Typing booster added

Now you see that an ibus-typing-booster engine has been added to the list of input sources to use.

If you select it, a n icon showing a wrench and a screwdriver appears at the bottom right of the list, to the left of the icon showing a keyboard. Click the “wrench and screwdriver” icon to open the setup tool of ibus-typing-booster.


Typing booster setup tool

Here you see the setup tool of that ibus-typing-booster engine where you can customize ibus-typing-booster according to your preferences.


Selecting an ibus-typing-booster engine in the panel menu

Now open some programs where you could type something, for example “gedit” or “gnome-terminal”. And activate the ibus-typing-booster engine you want to use in the input source menu of the panel as shown in this screenshot.

When the input source menu of the panel is open and an ibus-typing-booster engine is selected, there is a menu entry “Setup” which is an quicker way to open the setup tool ibus-typing-booster setup tool than going via the system settings.

Some options of ibus-typing-booster are also directly available in the input source menu of the panel to have quicker access to these often used options than having to open the setup tool. For example the option to switch emoji mode on or off is available in the panel menu. There are also key bindings and mouse bindings for these frequently used options which are shown in the input source menu of the panel as well as a reminder.


Typing with ibus-typing-booster into gedit

Now type something, for example into gedit and you should see some suggestions for completions.

At the beginning, the suggestions only come from the hunspell dictionaries and are thus not very good yet. But ibus-typing-booster learns from your typing, it remembers which words you use often in which context. Therefore, the suggestions become much better over time.

To switch between ibus-typing-booster and other input methods or a simple keyboard layout, you can use the input sources menu in the panel or the keyboard shortcut, which is Super+Space by default (can be changed in the “Text Entry” dialogue of the system settings).


Enabling the property panel and changing the font size

If you want to enable the ibus property panel or change the font size for the list of candidates, you can do that by starting the ibus-setup program.

To show the property panel set “Show property panel” to “Always” in ibus-setup.

The property panel is seen in this screenshot at the top right, just below the Unity panel. You can move the property panel anywhere you like by dragging its left edge. The property panel shows the current value of some options of ibus-typing-booster and allows to change them quickly.

The screenshot also shows how a much bigger font was chosen for the candidate list with the “Use custom font” option in ibus-setup.



Key bindings



The “AltGr” key

Ibus-typing-booster does not change your keyboard layout, it just uses the keyboard layout which was selected last.

As some of the key bindings in the table below use key combinations starting with “AltGr”, it is recommended to use a keyboard layout where the right “Alt” key is really an “AltGr” key and not just a duplicate of the left “Alt” key. If you do not have a real “AltGr” key, you can still use most of the key bindings in the table below but of course not those which start with “AltGr”.

The standard “English (US)” keyboard layout makes the “AltGr” key on the right side of the space bar basically behave as a duplicate of the left “Alt” key. So if you like the US English layout, better use the keyboard layout “English (US, with euro on 5)” instead of the standard one. “English (US, with euro on 5)” is very similar to the standard “English (US)” layout but has a real “AltGr” key.

Many (but not all) keyboard layouts for other languages different from US English already have a real “AltGr” key.

You can check whether your keyboard layout has a real “AltGr” key with “xev”, “xev” should show you the keysym “ISO_Level3_Shift” when pressing the “AltGr” (right “Alt”) key and not the keysym “Alt_R”.



Table of key bindings


Key combination Effect
Space Commit the preëdit (or the selected candidate, if any) and send a space to the application, i.e. commit the typed string followed by a space.
Return Commit the preëdit (or the selected candidate, if any) and send a Return to the application.
Enter Commit the preëdit (or the selected candidate, if any) and send a Enter to the application.
Tab
  • If the option “☐ Enable suggestions by Tab key” is not set: “Tab” behaves like the other “commit keys”, i.e. it commits the preëdit (or the selected candidate, if any) and sends a Tab to the appplication.
  • If the option “☑ Enable suggestions by Tab key” is set, no candidate list is shown by default:
    • If Tab has not yet been typed: Request to show the candidate list (nothing might be shown if no candidates can be found).
    • If Tab has been typed already, i.e. the candidate list has already been requested: Commit selected candidate (or preëdit if no candidate is selected), then pass the Tab to the application. *And* hide the candidate list again after each commit! That means that when typing continues after each commit, no candidate list is shown until one types Tab to request it.
Escape
  • When a candidate is selected (no matter whether this is a normal lookup table or a “related” lookup table): Show the first page of that lookup table again with no candidate selected.
  • When no candidate is selected:
    • When a lookup table with related candidates is shown: go back to the original lookup table.
    • When a normal lookup table is shown: close it and clear the preëdit.
Left (Arrow left) Move cursor one typed key left in the preëdit text. May trigger a commit if the left end of the preëdit is reached.
Control+Left Move cursor to the left end of the preëdit text. If the cursor is already at the left end of the preëdit text, trigger a commit and send a Control+Left to the application.
Right (Arrow right) Move cursor one typed key right in preëdit text. May trigger a commit if the right end of the preëdit is reached.
Control+Right Move cursor to the right end of the preëdit text. If the cursor is already at the right end of the preëdit text, trigger a commit and send a Control+Right to the application.
Backspace Remove the typed key to the left of the cursor in the preëdit text.
Control+Backspace Remove everything to the left of the cursor in the preëdit text.
Delete Remove the typed key to the right of the cursor in the preëdit text.
Control+Delete Remove everything to the right of the cursor in the preëdit text.
Down (Arrow down) Select the next candidate.
Up (Arrow up) Select the previous candidate.
Page_Up Show next page of candidates.
Page_Down Show previous page of candidates.
F1 Commit the candidate with the label “1” followed by a space
F2 Commit the candidate with the label “2” followed by a space
... ...
F9 Commit the candidate with the label “9” followed by a space
Control+F1 Remove the candidate with the label “1” from the database of learned user input (If possible, if this candidate is not learned from user input, nothing happens).
Control+F2 Remove the candidate with the label “2” from the database of learned user input (If possible, if this candidate is not learned from user input, nothing happens).
Control+F9 Remove the candidate with the label “9” from the database of learned user input (If possible, if this candidate is not learned from user input, nothing happens).
1 … 9 Same as F1 … F9 if the option “Use digits as select keys” is enabled. Enabling that option makes selecting candidates a bit easier because the number keys 1 … 9 are closer to the fingers then F1 … F9 on most keyboards. On the other hand, it makes completing when typing numbers impossible and it makes typing strings which are combinations of letters and numbers like “A4” more difficult. If digits are used as select keys, numbers can only be typed when no candidate list is shown. In most cases this means that numbers can only be typed when nothing else has been typed yet and the preëdit is empty.
Control+1 … Control+9 Same as Control+F1 … Control+F9 if the option “Use digits as select keys” is enabled.
AltGr+F6 Toggle the emoji and Unicode symbol prediction on/off. This has the same result as using the setup tool to change this.
AltGr+F9 Toggle the “Off the record” mode. This has the same result as using the setup tool to change this.
While “Off the record” mode is on, learning from user input is disabled. If learned user input is available, predictions are usually much better than predictions using only dictionaries. Therefore, one should use this option sparingly. Only if one wants to avoid saving secret user input to disk it might make sense to use this option temporarily.
AltGr+F10 Open the setup tool
AltGr+F12 Show related emoji and Unicode symbols or related words
AltGr+Space Insert a literal space into the preëdit.

When more than one input method at the same time is used, the following additional key bindings are available:


Key combination Effect
Control+Down Switch input method used for the preëdit to the next input method
Control+Up Switch input method used for the preëdit to the previous input method.


Mouse bindings


Mouse event Effect
Button 1 click on a candidate Commit the candidate clicked on followed by a space (Same as F1…F9).
Control + Button 1 click on a candidate Remove clicked candidate from database of learned user input (If possible, if this candidate is not learned from user input, nothing happens).
Button 3 click on a candidate Show related emoji and Unicode symbols or related words (Same as AltGr+F12).
Control + Button 3 click anywhere in the candidate list Toggle the emoji and Unicode symbol prediction on/off (Same as AltGr+F6). This has the same result as using the setup tool to change this.
Alt + Button 3 click anywhere in the candidate list Toggle the “Off the record” mode (Same as AltGr+F9). This has the same result as using the setup tool to change this.
While “Off the record” mode is on, learning from user input is disabled. If learned user input is available, predictions are usually much better than predictions using only dictionaries. Therefore, one should use this option sparingly. Only if one wants to avoid saving secret user input to disk it might make sense to use this option temporarily.


Multilingual input

Ibus-typing-booster supports using more than one input method/transliteration and more than one dictionary at the same time.

That makes it possible to write text in more than one language without having to switch do a different language version of ibus-typing-booster when switching to another language. If one writes often in different languages this can save a lot of input method switching.

This works not only when the languages use same script (like using English and Spanish at the same time), it works even when the languages use different scripts. For example when using English (Latin script) and Hindi (Devanagari script) at the same time. When using languages with different scripts at the same time, it is sometimes necessary to switch the input method for the preëdit (See the Hindi and English example). But even in such a more complicated case, switching is often not necessary, often one can select a suitable candidate without switching and save a lot of input method switches that way.



Example using Hindi and English at the same time

If one uses both Hindi and English often, it is more convenient to setup a single engine of ibus-typing-booster to use both Hindi and English instead of switching between a Hindi and an English engine. Then one can just type in either Hindi or English and ibus-typing-booster will show suitable candidates automatically.


Setup tool of Hindi typing booster

This screenshot shows how to setup ibus-typing-booster to use Hindi and English at the same time. This is the setup tool for the ibus-typing-booster engine “hi-IN”, i.e. the engine for the Indian language Hindi. One can select one of the Hindi input methods “Enhanced Inscript” (= hi-inscript2), “Inscript” (= hi-inscript), “Phonetic” (= hi-phonetic), “Itrans” (= hi-itrans), “Remington” (= hi-remington), “Typewriter” (= hi-typewriter), and “Vedmata” (= hi-vedmata) in this setup tool.

Let’s choose “Itrans” for this example.

To add English as a second language to use at the same time, one can use the check box option “Add direct input” in the setup tool. If that option is selected, direct keyboard input is added as a second input method and the en_GB (British English) dictionary is added as a second dictionary in addition to the hi_IN dictionary.


Hindi and English example, preëdit in English

If more than one input/transliteration method is enabled, the typed keys will be transliterated with each transliteration method and each transliteration result will be looked up in the enabled dictionaries and in the user database of previous input.

In this screenshot, Hindi with the “hi-itrans” method and English are used at the same time. One can see that the input “guru” has been typed. The candidate list shows both “गुरु” (which is the transliteration of the input “guru” using the “hi-itrans” method) and the English candidates “guru” and “gurus”. This is because both the transliteration “गुरु” and the direct input “guru” are used at the same time to lookup candidates.

Actually it is quite rare to see candidates from both Hindi and English in a candidate list. The English word “guru” is a loanword from Hindi, it is just the transliteration of the original Hindi word into the Latin Alphabet. Therefore, the “Itrans” method transliterates it back to Hindi and one gets a match in Hindi as well. Most English words do not transliterate to anything meaningful in Hindi and most Hindi input does not match anything in English either. The example “guru” is carefully chosen to show how ibus-typing-booster handles multilingual input.

In practice, as soon as one has typed a few characters, one will most of the time see only candidates from either Hindi or English, not both. I.e. the language one is typing in at the moment is automatically detected because one very rarely gets matches in the other language.

This automatic language detection works even better after ibus-typing-booster has learned from user input for a while. Because ibus-typing-booster remembers the context where the user has typed words.


Hindi and English example, preëdit in Hindi

This screenshot uses the same setup, Hindi (“hi-itrans”) and English. The same input “guru” has been typed and the matches shown in the candidate list are the same.

The difference is that the “hi-itrans” transliteration “गुरु” is shown in the preëdit this time (preëdit is the current input, i.e. the underlined text next to the candidate list). And in the status line above the first candidate, one can see “hi-itrans”.

The reason for this difference is that for this screenshot, the input method to be used for the preëdit has been switched to “hi-itrans”.

Switching the input method for the preëdit is sometimes necessary because one may not want to select any of the displayed candidates but commit the preëdit instead by typing a space. For example, if the preëdit is currently in English mode (direct input mode) and one types a Hindi word, it may happen that one does not get any matches in the candidate list, although the word has been typed correctly. This may happen if this word can neither be found in the dictionary nor in the user database because this word has never been typed before by the user. Nevertheless it may be a correct Hindi word of course and the user may want to commit it. But if the preëdit is currently in English mode, typing space would commit the Latin characters. So one has to switch the preëdit to “hi-itrans” first and then commit by typing a space.

The key bindings to switch the input method for the preëdit are “Control+Down” and “Control+up”. With only two input methods as in the current example, both key bindings behave the same. But there can be more than two input methods and then “Control+Down” moves in one direction through the list of input methods and “Control+Up” in the other direction (see key bindings).


Hindi and English example, switching input method in Gnome panel

This screenshot shows the setup tool again and the options for ibus-typing-booster in the input method menu of the gnome panel.

As an alternative to using the “Control+Down” and “Control+Up” key bindings, the input method for the preëdit can also be switched using the menu in the gnome panel. This menu also shows reminders for the key bindings to switch the preëdit input method.

In the setup tool, there is an option “Remember last used preëdit input method”. If that option is disabled, ibus-typing-booster will always use Hindi in the preëdit when you log in to your desktop and use ibus-typing-booster for the first time after the login. If this option is enabled, ibus-typing-booster will remember which input method was used last when you logged out of your desktop and start using that the next time you log in.



Example using Spanish and English at the same time


Spanish and English example, typing Spanish

This example shows using the Spanish engine of ibus-typing-booster with English enabled as an additional language. In the Gnome panel one can see “es-ES” which indicates that the Spanish version of ibus-typing-booster is currently selected. In the setup tool, the option “Add direct input” is enabled which adds support for (British) English.

The input typed is “Yo soy un h” where the last character, the “h” is still in preëdit (marked by the underline) and we see some suggestions how the word starting with “h” might continue.

The suggestions shown are Spanish words, not English. This is because the ibus-typing-booster has already been trained by similar user input before. Therefore, it already knows which word starting with “h” the user usually types following “soy un”. And these are Spanish words.


Spanish and English example, typing English

This screenshot shows how the user continues to type some English after finishing the Spanish sentence. The input engine has not been changed, one can still see the “es-ES” shown in the Gnome panel.

The input typed is now “I am h” and again the last character “h” is still in preëdit and some suggestions for words starting with “h” are shown.

This time, the suggestions for words starting with “h” are English, not Spanish. This is because the words typed before were “I am” and the user apparently types the suggested English words frequently after “I am”.

This automatic suggestion of candidates from the correct language according to the context makes it more efficient to use a single ibus-typing-booster engine for Spanish and English instead of manually switching between a Spanish and an English engine.



Multilingual setup using dconf

Using the setup tool it is currently only possible to add British English as a second language to the main language of an ibus-typing-booster engine.

But internally, ibus-typing-booser already supports any combination of input methods and dictionaries, only the setup tool is not yet able to set this up. It can be done by setting the appropriate dconf keys manually though.

Example:

Setting three input/transliteration methods:

$ dconf write /desktop/ibus/engine/typing-booster/typing-booster-mr-in/inputmethod '"mr-itrans,t-latn-post,NoIme"'

sets the three transliteration methods, “mr-itrans” (Marathi Itrans), “t-latn-post” (A postscript input method to type accented Latin characters, e.g. typing “u"” will produce “ü”), and “NoIme” (direct keyboard input without any transliteration).

Setting 3 dictionaries:

$ dconf write /desktop/ibus/engine/typing-booster/typing-booster-mr-in/dictionary '"mr_IN,en_GB,de_DE"'

sets the Marathi, the British English,and the German dictionary.



Unicode symbols and emoji predictions

ibus-typing-booster supports prediction of emoji and Unicode symbols as well (actually almost all Unicode characters except letters can be typed this way). This can be enabled or disabled with the option “Emoji predictions” in the setup tool which is on by default.

To make all emoji display correctly, you need good fonts which contain all emoji, see Emoji fonts for details about available fonts and font setup.



Emoji input


Emoji example when typing “castle”

When the emoji option is on (it is by default), you get emoji displayed in the candidate list automatically when typing something which matches an emoji.

For example in this screenshot, the user has typed “castle” and the emoji 🏰 (U+1F3F0 EUROPEAN CASTLE) is shown as the last candidate of the first page of the candidate list.

If reasonable matches for emoji are found, the first match is shown as the last candidate of the first page of the candidate list. If more than one emoji has matched the input, the other matches can be found by scrolling down to the next page of candidates. If an emoji is selected and committed, it will be remembered just like ibus-typing-booster remembers other words and will be shown with higher priority next time.

The screen shot shows coloured emoji, to make that work see Showing emoji in colour. By default, emoji will be shown in black and white on current linux distributions.



Emoji input fuzzy matching


Emoji example when typing “casle”

ibus-typing-booster tries to match the emoji names in a fuzzy way, in many cases you will get a match even if your input contains spelling mistakes.

In this example, the typed input is “casle”, i.e. not spelled correctly. Nevertheless, one gets the match 🏰 (U+1F3F0 EUROPEAN CASTLE).



Emoji input using multiple keywords


Emoji example when typing “castle_japanese”

If typing a single word does not give you the emoji you are looking for, you can type as many keywords as you like and concatenate them with underscores “_” (Or spaces “ ”. Typing space usually commits the preëdit, but you can insert literal spaces into the preëdit by typing AltGr+Space).

In a previous example, typing “castle” gave us the match 🏰 (U+1F3F0 EUROPEAN CASTLE). If this is not what we wanted we can type “castle_japanese” (or “japanese_castle”) to get 🏯 (U+1F3EF JAPANESE CASTLE). Even “castlejapanese” and “japanesecastle” work in this case, but separating the search words with underscores or spaces makes it easier for the matching algorithm.



Looking up related Emoji


Looking up related emoji for the “Japanese castle”

It is also possible to look up related emoji which may not have matched the typed text well but are related to the emoji shown because they share keywords or categories.

To show related emoji, click an emoji shown in the candidate list with the right mouse button (see Mouse bindings).

Or, if you prefer to use a key binding instead of the mouse: select an emoji in the candidate list by moving up or down in the candidate list using the arrow-up/arrow-down keys or the page-up/page-down keys until the desired emoji is highlighted, then press AltGr+F12.

AltGr+F12 is the key binding to “lookup related stuff”. If you press this while no candidate is selected, a lookup of related stuff for the preëdit is tried. In this case, the preëdit contains the text “castle” which is not an emoji. So no related emoji will be found. But if NLTK is used, related words for “castle” may be shown, see Using NLTK to find related words.

As seen in the screen shot, looking up related emoji for the “Japanese castle” gives us emoji for other types of castles or buildings. The lists of words shown in square brackets are the keywords the shown emoji have in common with the originally selected emoji. By typing the “Escape” key, one can go back to the original list.



Multilingual emoji input



Emoji input using German and English


Emoji example when typing “Schloss_europa”

In this example, the German typing booster is used with English as a second language. Therefore, one can use both the English word “castle” or the German word for castle “Schloss” to find castle emoji.

In the screen shot, the input typed is “Schloss_europa” and the emoji matches shown are 🏰 (U+1F3F0 EUROPEAN CASTLE), 🔒 (U+1F512 LOCK), and 🏯 (U+1F3EF JAPANESE CASTLE).

The German word “Schloss” can mean “castle” as well as “lock”. Therefore, the padlock emoji 🔒 (U+1F512 LOCK) matches as well.


Example for looking up related emoji for “Geschlossenes Schloss”

Let’s look up related emoji by clicking the candidate number 5, “Geschlossenes Schloss” 🔒 (U+1F512 LOCK) with the right mouse button (See Looking up related Emoji).

We get several variants of padlock emoji, the European castle and some closed mailboxes because “geschlossen” in German can also mean “closed”.

By the way, the related emoji shown in the screen shot have German names and keywords. That’s because this example uses German as the main language for ibus-typing-booster with English as a second language (See Multilingual input). When looking up related emoji, they are shown in all languages ibus-typing-booster is setup to use, but they are sorted in the order of preference of the languages. So German is on top because it is the main language. To see emoji whose English keywords are related to the emoji 🔒 (U+1F512 LOCK), one can scroll further down in the candidate list. These are of course labelled in English.



Emoji input using Hindi and English


Emoji example when typing “namaste”

This screenshot shows another example using Hindi as the main language and English as a second language.

The input typed is “namaste”, with the transliteration method “hi-itrans” this is transliterated to “नमस्ते” which is currently shown in the preëdit (For details about multilingual input and how to switch the script shown in the preëdit, see Multilingual input).

Both “namaste” and “नमस्ते” are used to search for matching words and emoji. Only “नमस्ते” matches an emoji which can be seen in the candidate list (🙏 U+1F64F PERSON WITH FOLDED HANDS).


Example for looking up related emoji for “namaste”

Of course one can lookup related emoji here as well.

Here we have clicked with the right mouse button on the 🙏 U+1F64F PERSON WITH FOLDED HANDS emoji and get emoji which are related because they share keywords in Hindi.

And of course, because of the multilingual Hindi+English setup there will be emoji which are related because they share keywords in English further down in the candidate list.



Emoji input using Japanese

To be able to input emoji using their Japanese names, one first needs to install the packages m17n-db-extras, m17n-lib-anthy and anthy on Fedora. On Fedora one can do this using the command:

sudo dnf install m17n-db-extras m17n-lib-anthy

This should work on other distributions as well, but the package names may be different. You need the package which contains the /usr/share/m17n/ja-anthy.mim file and other packages which are required to make the ja-anthy input method of the m17n library work.

Then one needs to add the ja-anthy input method and the Japanese dictionary to the setup of ibus typing booster. For details see Multilingual setup using dconf.

Which language version version of ibus-typing-booster is used does not matter here. Let’s assume we are using the American English typing booster. You may first want to check which dictionaries and input methods are already setup:

dconf dump /desktop/ibus/engine/typing-booster/typing-booster-en-us/

Look at the contents of the inputmethod and dictionary keys. Then add ja-anthy and ja_JP in addition to what was already there. For example like this:

dconf write /desktop/ibus/engine/typing-booster/typing-booster-en-us/inputmethod '"NoIme,ja-anthy"'

“NoIme” means “no input method”, which means direct keyboard input.

dconf write /desktop/ibus/engine/typing-booster/typing-booster-en-us/dictionary '"ja_JP,en_US"'

Here I did put the ja-anthy input method at second priority and the ja_JP dictionary at first priority.


Emoji example when typing “katatsumuri”

Now one can type emoji keywords using Japanese. For example when typing “katasumuri” (which means “snail”), one gets the emoji 🐌 (U+1F40C SNAIL) listed as a candidate.

It is labelled in the candidate list in Japanese hiragan syllables, i.e. “かたつむり”. The Latin “katatsumuri” was transliterated by the ja-anthy input method to “かたつむり” and this was then looked up in the dictionaries. The Latin text “katatsumuri” was of course looked up as well but of course produced no match.


Emoji example when typing “katatsumuri”

Here we have switched the input method used in the preëdit to ja-anthy with “Control+Down” or “Control+Up”.

That makes no difference for the matches, still both “katatsumuri” and “かたつむり” are looked up in the dictionaries. Only when committing the preëdit now by typing a space, we would commit the hiragana “かたつむり”.


Example for looking up related emoji for “katatsumuri”

Of course we can lookup related emoji here as well.

Here we have clicked with the right mouse button on the 🐌 (U+1F40C SNAIL) emoji and get emoji which are related because they share keywords in hiragana (They share the keyword “むし” = “mushi” which means insect.

And of course, because of the multilingual Japanese+English setup there will be emoji which are related because they share keywords in English further down in the candidate list.



Unicode symbol input

Using the emoji input mode of ibus-typing-booster, one cannot only input emoji but other Unicode symbols as well. Actually almost all Unicode characters can be typed this way (Except most letters, because letters can usually typed much faster directly).


Using emoji mode to input mathematical symbols

This screenshot shows how the emoji mode can be used to input mathematical symbols. You can also combine keywords using “_”, i.e. type something like “volume_integral” to get more specific matches (see Emoji input using multiple keywords).


Using emoji mode to input special formatting characters

Here the emoji mode is used to input something like U+202C POP DIRECTIONAL FORMATTING or U+2069 POP DIRECTIONAL ISOLATE. These are formatting characters used in scripts which use right-to-left direction.


Using emoji mode to input CJK radicals

Here the emoji mode is used to input the CJK radical “turtle”.

Anything in Unicode except letters is possible.



Unicode code point input


Using emoji mode to input characters by Unicode code point

The emoji mode of ibus-typing-booster can also be used to input any character using hexadezimal Unicode code points.

To be able to input hexadecimal numbers without problems, the option “Use digits as select keys” should be switched off in the setup tool. If this option were switched on, typing a digit like “1” would select the candidate with the number one instead of inserting the digit “1” into the preëdit.

If the option “Use digits as select keys” is switched off, one can still use the F1-F9 keys to select candidates (and of course one can select candidates with the mouse).

In this example, “100” has been typed and one gets the matches 💯 U+1F4AF HUNDRED POINTS SYMBOL which is an emoji which has been matched because of its alternative name “100” and Ā U+0100 LATIN CAPITAL LETTER A WITH MACRON which has been matched because it has the Unicode code point 100 (hexadezimal).

It is quite rare that typing a Unicode code point matches an emoji as well. There will never be many candidates when typing Unicode code points.



Quickly toggling emoji mode on and off


Triggering emoji mode using a trailing “_”

When emoji mode is on, finding the matching candidates can be considerably slower compared to when emoji mode is switched off. Especially if the emoji lookup is done in multiple languages at the same time. In this case, there may be a noticeable delay until the candidate list pops up.

Therefore, one may want to switch emoji mode off for maximum speed.

Always opening the setup tool to switch emoji mode on if one occasionally wants to input an emoji would be inconvenient. Therefore, emoji mode can also be toggled with a mouse binding (Control+Button3 anywhere in the candidate list toogles emoji mode between on and off) or with a key binding (AltGr+F6 toggles emoji mode between on and off).

But there is an even faster way to temporarily switch on emoji mode just for the current lookup.

In this screenshot we can see that emoji mode is off because the box to the left of the smiley above the candidate list is not checked (and one can see that “Unicode symbols and emoji predictions” is not checked in the setup tool either).

Nevertheless we get matches for two camel emoji. This is because the input typed is “camel_” which contains a trailing underscore. Trailing and leading underscores temporarily turn on emoji mode just for this one lookup.



Emoji picker

ibus-typing-booster contains an “emoji-picker” tool which can be used independently from ibus-typing-booster, i.e. even when ibus-typing-booster is not running.

In Fedora, “emoji-picker” is packaged as sub-package of ibus-typing-booster named “emoji-picker”, so you can install it with:

$ sudo dnf install emoji-picker


Browsing emoji with the emoji picker

Clicking on an emoji shown in “emoji-picker” puts it into the clipboard and you can then paste it somewhere using Control+V or the middle mouse button.

Clicking the right mouse button on an emoji shown in “emoji-picker” shows the emoji much bigger and some extra information about that emoji, like the Unicode code point(s), the name and search keywords of the emoji in all chosen languages, the fonts really used to render this emoji, the Unicode version this emoji first appeared in, and a link to lookup this emoji in emojipedia.

The fonts really used to render an emoji may differ from the font chosen in the user interface of emoji picker because:

“emoji-picker” has some command line options to choose the languages, the font and the fontsize. For example, emoji-picker --languages de:en:fr would enable you to use German, English, and French to browse and search for emoji and display the names of the emoji in all of these languages. If the command line option is not used, the languages are taken from the environment variables. The LANGUAGE variable works as well. For example, LANGUAGE=de:en:fr emoji-picker also chooses German, English, and French. And, LANG=de_DE.UTF-8 emoji-picker would choose only German (English is always implicitly added though.)

The command line options to choose a different font or font size can be used like this: emoji-picker --font "Noto Color Emoji" --fontsize 32 The command line font optionis override the font options in the graphical user interface.

For more about emoji fonts and colour, see Emoji fonts.


Searching emoji with the emoji picker

“emoji-picker” also has a “Search” feature where you can type a search string and get matching emoji listed.

Again you can click on one of the matches to put it into the clipboard and paste it elsewhere.

And hovering with the mouse over a match shows the emoji bigger and some extra information.

The search string can be in any of the languages specified by the environment variables or on the command line.


Skin tone selection

Emoji can also be selected with different skin tones. If the mouse hovers over an emoji for which different skin tones are available, a tooltip says “Long press or middle click for skin tones”. Long pressing such an emoji with the left mouse button or clicking it with the middle mouse button pops up a menu showing all the skin tone variants. One can then click on any variant with the left mouse button to put it into the clipboard and paste it elsewhere.

Which skin tone was last used is remembered, i.e. the emoji shown before opening the menu for the skin tones is the emoji with the skin tone variant used last for this emoji.

Clearing the recently used characters resets all emoji to neutral skin tone by default.



Emoji fonts


“Noto Color Emoji” font in grayscale

The font which currently works best for emoji on Linux is the “Noto Color Emoji” font. On Fedora, this font is in the “google-noto-emoji-fonts” package, on openSUSE in the “noto-coloremoji-fonts” package. If the version packaged for your distribution is not up-to-date, you can get the most recent version here: https://www.google.com/get/noto/. (Search for “Noto Color Emoji”).

Without the experimental Cairo patch (See Showing emoji in colour), the “Noto Color Emoji” font will render in grayscale, but even that looks much better already than fonts wich render only in black and white.

“emoji-picker” will use the “Noto Color Emoji” font by default, if it is installed. To make sure that “Noto Color Emoji” is also your preferred font for emoji in other programs and not only in “emoji-picker”, you can use a fontconfig setup as in this example fonts.conf file. file and store the file at ~/.config/fontconfig/fonts.conf.

If you do not yet have a ~/.config/fontconfig/fonts.conf file, create one with the contents as above. If you already have such a file but no “alias” settings exist, add the part defining the aliases. Or if you already have “alias” settings in your ~/.config/fontconfig/fonts.conf file, edit them.

“DejaVu Serif”, “DejaVu Sans”, and “DejaVu Sans Mono”, are just examples, put your favorite fonts for Latin and other scripts below the fonts for emoji in the ~/.config/fontconfig/fonts.conf setup file.

If you don’t give a good emoji font like “Noto Color Emoji” the highest priority in the fontconfig setup, the highest priority font may be a font which already has some emoji. For example, “DejaVu Sans” already has many emoji, but not all. I.e. when “DejaVu Sans” has highest priority and is tried first, all emoji which are available in “DejaVu Sans” are shown using that font and only those which are missing in “DejaVu Sans” are shown using the “Noto Color Emoji” font. That means you will see the some emoji displayed using the “DejaVu Sans” font and some using the “Noto Color Emoji” font which will look very inconsistent. It looks nicer using “Noto Color Emoji” for all emoji which can be achieved by giving “Noto Color Emoji” the highest priority.

The Latin characters in some emoji fonts may not be really suitable to be used as a default Latin font. For example, the “Symbola” font has Latin glyphs with serifs. Nevertheless, putting an emoji font like “Noto Color Emoji”, “Emoji One”, or “Symbola” with top priority into the ~/.config/fontconfig/fonts.conf setup file does usually not cause any problems.

Your desktop, editor, terminal, … will most likely set some other font anyway. For example, the Gnome3 desktop usually sets the “Cantarell” font, i.e. Gnome3 will still use “Cantarell” even if you give the “Symbola” font highest priority in ~/.config/fontconfig/fonts.conf (You can change the font used for the Gnome3 desktop with gnome-tweak-tool. The same is true for most other desktops and programs.


“Emoji One” font in grayscale

Another good emoji font is the “Emoji One” font which you can get from here: https://github.com/Ranks/emojione/blob/master/assets/fonts/emojione-android.ttf

The “Emoji One” font also looks very nice but currently supports fewer emoji sequences than the latest version of “Noto Color Emoji”. For example, the emoji sequence 👷‍♀ (👷 U+1F477 CONSTRUCTION WORKER, U+200D ZERO WIDTH JOINER, ZERO WIDTH JOINER, ♀ U+2640 FEMALE SIGN) will display as several glyphs and not as a single glyph showing a female construction worker. But many emoji sequences do work with this font. And many (but not all) skin tone modifiers work as well with the “Emoji One” font.

If you want to make “Emoji One” your preferred font for emoji in all programs and not only in “emoji-picker”, you can edit the fontconfig setup from this example example fonts.conf file and move the lines containing “Emoji One” above the lines containing “Noto Color Emoji”. And then store the file at ~/.config/fontconfig/fonts.conf.


“Symbola” font, only black and white

A good black and white font for emoji is the Symbola font by George Douros. Best use the latest version, at least the version updated for Unicode 9.0.0. On Fedora and openSUSE, this font is in the “gdouros-symbola-fonts” package. Fedora 25 already has the Unicode 9.0.0 version. If you are using Fedora 24, better update that font.

But even the latest version of the black and white “Symbola” font does not support any emoji which consist of more than one character. That means emoji sequences like 👷‍♀ (👷 U+1F477 CONSTRUCTION WORKER, U+200D ZERO WIDTH JOINER, ZERO WIDTH JOINER, ♀ U+2640 FEMALE SIGN) will display as several glyphs and not as a single glyph showing a female construction worker. The same problem occurs for the flag sequences, the family emoji and all other emoji sequences. And the skin tones modifiers are shown as seperate characters following the emoji they are modifying as well.

If you want to make “Symbola” your preferred font for emoji in all programs and not only in “emoji-picker”, you can edit the fontconfig setup from this example example fonts.conf file and move the lines containing “Symbola” above the lines containing “Noto Color Emoji”. And then store the file at ~/.config/fontconfig/fonts.conf.



Showing emoji in colour

To show emoji in colour, an experimental patch for cairo and a suitable font is needed.

Cairo packages for Fedora containing that experimental patch are available here.


“Noto Color Emoji” font in colour

One font which can be used to show emoji in colour is “Noto Color Emoji” (“NotoColorEmoji.ttf”). On Fedora, this font is in the “google-noto-emoji-fonts” package. Or you can get it here.


“Emoji One” font in colour

Another font which has emoji in colour is the “Emoji One” font (“emojione-android.ttf”). It is available here. If you want a Fedora package you can also get this font from here.

To make the colour emoji fonts your default emoji fonts, you can use a fontconfig setup file ~/.config/fontconfig/fonts.conf as in this example fonts.conf file and edit it a bit.

This example fonts.conf file gives “Noto Color Emoji” the highest priority. emoji font. If you prefer the “Emoji One” font, edit that file and put “Emoji One” at the topmost priority. Store the file as ~/.config/fontconfig/fonts.conf.

Without the hacks to show emoji in colour, the emoji support in ibus-typing-booster will still work but the emoji will be displayed in grayscale (when using “Noto Color Emoji” or “Emoji One”) or black and white (when using other fonts).



Using NLTK to find related words


Example for looking up related words for “castle”

ibus-typing-booster can also find words which are related to any of the candidates displayed. To show related words for a candidate, move up or down in the candidate list using the arrow-up/arrow-down keys or the page-up/page-down keys until the desired emoji is highlighted, then press AltGr+F12 (When AltGr+F12 is pressed before moving in the candidate list, i.e. when no candidate at all is highlighted in the candidate list, the word from the preëdit is used to lookup related words). In the screen shot shown, “castle” was typed followed by AltGr+F12 and synonyms for “castle” are displayed. hypernyms or hyponyms may also be displayed.

Looking up related words like this currently only works for English. When trying to find related words for non-English words, nothing will happen.

The lookup of related words uses NLTK and will only work when NLTK for Python3 and the wordnet corpus for NLTK are installed. On Fedora, you can install it like this:


      sudo dnf install python3-nltk
      python3
      import nltk
      nltk.download()

A download tool for NLTK data as seen in the next screen shot opens, select the wordnet corpus and click the “Download” button:


wordnet corpus download for NLTK
wordnet corpus download for NLTK