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?
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:
sudo loadkeys ru
. Alternatively, find any line that hasu
ands
in it.us
. Press Enter. (Bash will complain thatcommand not found
.)loadkeys ru
line.yank-last-arg
in bash, which is the command that inserts the last argument from the previous command. In this case, it will beus
that we've assembled in the previous step.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.
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: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.
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.