After setting the keyboard layouts and switching with this command

setxkbmap -option grp:switch,grp:lwin_toggle,grp_led:scroll us,it

everything works fine (2 layouts us and it, toggle between them with left super key) but when I have us layout and keep pressed the right Alt the layout switches to it until I release it, anyone knows why it is like this and how to fix?


I realize that the option "grp:switch" caused the problem. The correct command is

setxkbmap -option grp:lwin_toggle us,it

I don't know how to do it in the terminal, but if you right click on your keyboard layout icon, or go to settings. there is a setting that says "switch while alt is pressed" maybe you have that toggled instead of what you want.

Settings > keyboard Layout > Options > Key(s) to change Layout

  • I think you are talking about Unity (ubuntu), I'm using LXDE (Lubuntu) so I don't have this graphical interface and just set the options from command line – giuspen Aug 26 '12 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.