Ubuntu: Change keyboard back to English in command line from Cyrillic



Question:

I switched to Russian keyboard via loadkeys ru command and now cannot switch back.

A directory and subsequent files I have are titled in Cyrillic characters and I am trying to get to them by a combination of commands in Latin characters and Cyrillic ones. So far I've been stuck on Cyrillic.

Does anyone know how to switch back if I have only Cyrillic characters available?


Solution:1

I feel there must be a much more logical/sane solution compared to what I'm about to propose, such as running sudo loadkeys us from the graphical terminal whose layout is independent, or restarting the machine (as already suggested).

If none of those are an option, however, you could use the following pants-on-the-head technique:

  1. Find the original line in shell history with the â†' key. It should be sudo loadkeys ru. Alternatively, find any line that has u and s in it.
  2. Remove all characters except for us. Press Enter. (Bash will complain that command not found.)
  3. Now go back to your loadkeys ru line.
  4. Press Alt+/. In the Russian layout / is mapped to .. And Alt+. is mapped yank-last-arg in bash, which is the command that inserts the last argument from the previous command. In this case, it will be us that we've assembled in the previous step.
  5. This should leave you loadkeys us. All it takes now is to press Enter.

If it happens that there are no commands with both u and s in them, you could do steps 2 and 3 twice, and pick those characters from 2 different commands.


Solution:2

The Russian keymap probably has a modifier key for Latin text.

Some likely suspects are the Caps Lock key (Latin lock), the right Alt (AltGr) key, or possibly the combination of Alt and Shift together.

If you could look at the keymap file (or run dumpkeys) then you'd know for sure. But it might be difficult to find information while your keyboard is stuck in an unfamiliar mapping!

The keymap file

The comment at the top of /usr/share/keymaps/i386/qwerty/ru.kmap.gz in Ubuntu 16.04 LTS (Xenial Xerus) says:

"Cyrillic" mode is toggled by Right_Ctrl key and shifted by AltGr key.

I hope your keyboard has a right-Ctrl key! If it doesn't, you'll need to hold down right-Alt (AltGr) while you switch.


Solution:3

Have you tried the standard(ish) shortcut that is ctrl+space ?

If, when installing a new keyboard you didn't suppress the English one, this shortcut should switch between one and the other.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »