Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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'm on ubuntu 12.04.

Recently I bought a cheap apple style bluetooth keyboard. It pairs OK. I paired it with the current 102 key still attached.

Anyway I noticed that the character mapping is incorrect. Most keys do not type anything - some keys on the right (k, l, ;') etc give numbers, but that's about it.

So I rebooted, with 102 kbd unattached, and the bluetooth keyboard on, ready to connect.

After boot at the login screen, the bluetooth keyboard had paired. I typed my password, and it logged in fine!! However after the user login was complete it reverted to the broken behaviour. A glance at the layout chart shows ubuntu thinks I still have the 102 layout, even though it remained disconnected.

Any ideas?

Thanks, Dave

share|improve this question

Keyboard layouts are not automatically changed when you start using a new keyboard, there is a chance that the key mappings are different, specially if we are talking about a Apple keyboard.

To change the mappings of the keyboard used in your system you need to:

  • Open the system settings

    enter image description here

  • Select Keyboard

    enter image description here

  • Select Layout Settings

    enter image description here

  • Right bellow the list of keyboard mappings active there is a little + button, press it and you will be able to add and select a new keyboard mapping

    enter image description here

When selecting a new keyboard mapping from the list you will be able to press the Preview button to have a look at the look and key distribution of the keyboard that will be a in use, try to match as close as you can to yours.

share|improve this answer
Thanks for your reply. I found that dialog but can't really find any layout similar to the mini layout used by this keyboard. (Just to clarify - it's a copy, not an actual apple keyboard. It's this one, just to give you an idea of the layout – swedishhh Jul 29 '12 at 20:59
It seems unfortunate that ubuntu was able to use the keyboard to enable me to type my password, but not after completing login. Is there some way to find out what layout setting it has at that point, and apply that to my login? – swedishhh Jul 29 '12 at 21:00
@swedishhh that looks like a standard US, international keyboard layout, make sure that you are running only with 1 layout for now (remove the others, you can add them later) – Bruno Pereira Jul 29 '12 at 21:00
Thanks @bruno - played around with most of the english layouts now - no luck with any though. – swedishhh Jul 29 '12 at 21:33
See here numlock is on by default after logging into X. I can turn it off with another keyboard but not the apple kbd. Also function keys don't work yet. I'll post more if I make progress. – swedishhh Jul 29 '12 at 22:30

The numlock issue seemed to go away.

To fix the functions keys I just followed this:

  1. Append the configuration line to the file /etc/modprobe.d/hid_apple.conf creating it if necessary:

    echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
  2. Notify the hid_apple module to reload its configuration

    sudo update-initramfs -u
  3. Reboot

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.