Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am encountering a very weird error recently, that I cannot figure out to solve.

I have an Asus S301L with Ubuntu 12.04 and an Italian keyboard; every time I log in, some key on my keyboard does not work properly:

  1. p produces *
  2. 0 produces /
  3. - produces +

But also others, for example, it took quite some time for me to just write this message.

The only way to have things again to work properly is to type from a terminal:

setxkbmap it

That command takes a keyboard layout configuration from the folder


And it starts again to work, just for a (indefinite) duration of time , then, things, again, are wrong.

The output of the locale command is:

share|improve this question
Where are you setting your layout options? What desktop environment are you using? – terdon Apr 13 '14 at 17:35
The layout options are present in the folder /usr/share/X11/xkb/symbols/ and I use the Gnome DE. Thanks – user2368158 Apr 14 '14 at 6:22
I mean where do you set the layout? Do you use a terminal command (if so, which command, which file runs it etc) or do you use the Gnome settings? Please edit your questions and answer that and also include the output of the locale command. – terdon Apr 14 '14 at 13:12
I set my layout using the command setxkbmap it from terminal , this is the only one I use. I tryed to use the gnome settings, but nothing changed... – user2368158 Apr 14 '14 at 23:29
I also edited with the info you asked me... – user2368158 Apr 14 '14 at 23:39

What you describe sounds like the desktop environment (DE), Gnome in your case, is switching back to the default settings every now and then and that's what is screwing with your keyboard layout. The simplest solution would be to set the correct settings from the Gnome settings menu.

Open the System Settings, click on Keyboard, then on "Layout Settings":

enter image description here On the next screen, remove any keyboard layouts that you don't want:

enter image description here

If you still have this problem, you might want to also set the Regional Settings (System Settings => Language and Region) to whatever you prefer as well. However, I have always mixed US English layouts with European style number and regional settings so I doubt this is the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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