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

I am stuck with that keyboard, unfortunately, the ^ and < are switched. Makes it hard for me to write code.

The < right now is next to 1 and the ^ is next to the Y. I want them switched back to their normal positions. I have picked the German layout and the Apple Aluminum Keyboard in my system prefs. Didn't help.

This problem also exists in Ubuntu 12.04 with an Apple aluminum keyboard (Swiss Layout). There are no options to switch these two keys.

share|improve this question
See also… (see at the end of my answer or… if xmodmap does not work (as soon as my hosting stops acting funny)) – Rmano May 15 '14 at 15:52

2 Answers 2

Can you define a couple of keyboard shortcuts in System -> Preferences -> Keyboard Shortcuts to change the actions of the two keys? That does work in Xubuntu for this situation.

share|improve this answer

There's great documentation on the arch wiki about swapping keys using xmodmap:

xmodmap -

To swap keys with xmodmap you need to know the key's keycode or scancode. You can find out key codes using the program xev in terminal.

finding keycodes with xev-

When you know the key's code you can make temporary changes using xmodmap in terminal:

xmodmap -e "keycode  46 = l L"

(Actually this example from the arch wiki makes me think you can change some keys without knowing the keycode.)

xmodmap -e "keysym a = e E" 

These changes only last till you log out. When you're happy you have determined the changes you want to make, you can save them to a file in your home directory:


The Arch wiki suggest you need to perform additions steps to have this file load on login, but my experience with 13.04 is that the file loads automatically.

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.