Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using a German keyboard in Ubuntu. As we need the slash on the console quite often and it is somewhat awkward to type on a German keyboard, I'd like to assign the / key to the unused Caps Lock key.

Does anyone know how to do this?

share|improve this question

migrated from Aug 3 '11 at 13:04

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Here are the exact commands:

cd ~
xmodmap -e "keycode 66 = slash"
`xmodmap -pke > .Xmodmap`
echo "xmodmap .Xmodmap" >> .xinitrc
share|improve this answer

You can always do it with 'xmodmap'.

Hope these links are useful,


Caps Lock: keycode 66

Slash : keycode 61

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Tom Wijsman Jul 13 '12 at 15:09

Your Answer


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