Switch Input method global in Ubuntu
When using Ubuntu, switching between input method so uncomfortable. I use English as default and Unikey (fcitx-unikey) for Vietnamese. You can switch between input method by the hotkey (as my setting is Ctrl + Space), the problem is this hotkey is not working if you are not in the input area.
Example in Google Chrome, you need type some Vietnamese text, to archive that, you need click in some input field of web-form or address bar of Chrome, press the hotkey, then you need to look at the icon area to make sure it the right input method you want, the same procedure when you want to switch back to English! A lot of work.
Note: I need switch back to English when not typing Vietnamese because in Vietnamese, the input text does not commit immediately, you need to click somewhere, or press spacebar, or enter, or tab… to commit text. The image below is an example, I want to go to google.com but just type "go" in the address bar of Chrome is not enough when using Vietnamese input, Chrome will search word "go". (I need type "go" –> press tab to select "Google.com" –> press Enter).
With fcitx, it’s support change input method from the terminal, ex:
- Change to Unikey (Vietnamese):
fcitx-remote -s unikey
- Change to English:
fcitx-remote -s fcitx-keyboard-us
You can find IMList in your fcitx configuration file, in my system, it’s:
So, you can setup a global hotkey to set input method anywhere:
- Go to All Settings, Keyboard, switch to tab Shortcuts, click (+) button to add a new shortcut
Setting key combined and input method you want, ex my setting