I do this setxkbmap il on my xterm and then do my stuff in my local language layout. When done, I want to switch back to English layout with setxkbmap us but I cannot type English in my xterm. What should I do?

  • 1
    If you're actually using xterm, you could make a function-key definition that sends the command for switching back. Commented Jul 6, 2016 at 9:08

2 Answers 2


With xterm, you could use the translations resource to assign a string (such as "setxkbmap us") to a function-key. Doing that bypasses most of the keyboard problems, as well as issues with compose and special characters.

Something like this in your $HOME/.Xdefaults would assign the command to controlshiftF1:

*VT100*translations:    #override \n\
        Ctrl Shift <Key>F1: string("setxkbmap us") string(0xa) \n

Further reading: Key Bindings in the xterm manual.


You can also use alias for that. Well, I tried it in terminator, not in xterm, but it may work there as well.

I use Cyrillic and Greek fonts in this example, but you can find solution in whatever keyboard map you use.

alias сша="setxkbmap us"
alias ηπα="setxkbmap us"

Putting it to the ~/.bashrc file makes it available later.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .