1

I have looked at the answers to the question How do I change keyboards from the command line?, however I have found that even though they indicate how to switch input-sources through Terminal, they do not show how to switch between the modes of the input-sources. For instance I have "Japanese (Anthy)" installed which has several different mode settings section: Input mode, Typing mode, Segment mode, and Dictionary mode. In each of these there are different modes you can set for these settings. Like the Input mode one provides input modes such as Hiragana and Katakana, the Typing mode one allows you to change between Romaji, Kana, and Thumb shift, and the others have other various options you can change between to change the input-source mode.

These are very easy to change through the GUI as there is just a pull-down menu in the AppIndicator bar however as I will be needing to use TTYs for a while and not have access to the normal GUI, I need to know how to switch between these different modes in Terminal. So how can this be done?

At very least I need to know how to switch between the Input mode modes.

I am running Ubuntu GNOME 15.10 with GNOME 3.18.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • Not aware of any command line way to do that. Possibly you'd need to dig into the ibus-anthy source code to find out. Added a couple of tags to increase the chance that somebody who knows sees your question. – Gunnar Hjalmarsson Apr 10 '16 at 20:27
  • Do you have no access to the GUI because of ssh/tty to the target system? If so, I guess you always need to configure the host system. trying to find a way to change the input mode of the host of a ssh session make no sense because it doesnt has the input periphery (the keyboard) connected. – cmks Apr 10 '16 at 20:36
  • @cmks: This is for my own machine and not a remote one. But there are certain reasons why I will be forced to use TTYs instead of the normal GUI for a while... –  Apr 10 '16 at 21:09
  • So, as I understand you, you will use the classic console screen for interacting to your machine? – cmks Apr 10 '16 at 21:17
  • @cmks: Yes, I will. –  Apr 10 '16 at 21:23
  • Doubtful there's a way to do so - you can switch which input method is currently active , but whatever internal settings it has , that's up to that method – Sergiy Kolodyazhnyy Apr 11 '16 at 07:01

1 Answers1

0

I am nearly sure, you will have no success doing such things this way if you use the classic console tty instead of a (gui based) terminal program.

This is in cause of the way input data flows. When you use a progam like xterm it will get its input stream from the X window system. So there is a lot of feature reach software between the key you are pressing on your keyboard and the input stream designated for the X application. Such software does the input modes of your desire - it is not a feature of i.e. xterm.

If you are using a console tty your are near to bare metal. You are working with the binaries of agetty, login and bash and they all get there input nearly straight from the kernel. There are some keyboard mappings between the pressed key and the input stream of bash but there is no feature reach programcode on that way which doing usefull things like you want.

cmks
  • 1,904