Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

as many others I don't need CapsLock. I want to reassign it such that it has the function of AltGr. I use Kubuntu 9.10 but I think there must be a solution which is distribution independent.

I already tried to use setxkbmap or xmodmap. Using xmodmap at least I managed that CapsLock to behaves like Del by following this description.

But I could not achieve assigning the AltGr behavior to CapsLock.

share|improve this question
add comment

3 Answers

I know this question is old, but if anyone stumbles across it again, there is an alternative solution:

setxkbmap -option "lv3:caps_switch"

For a full list of options, read the "OPTIONS" section of

man xkeyboard-config
share|improve this answer
add comment
up vote 2 down vote accepted

Based on Dennis' answer and by playing around with xev I found out that the magic phrase seems to be ISO_Level3_Shift.

At least this works for me:

xmodmap -e "keycode 66 = ISO_Level3_Shift"

Now I dont' run into danger to break my fingers while typing [, ], {, } and co on my german keyboard layout.

Edit: now using the -e option of xmodmap

share|improve this answer
add comment

Try one of these (substitute the keysim or keycode of your caps-lock key if it's different):

xmodmap -e "keysym 0xffe5 = Mode_switch"

or

xmodmap -e "keycode 66 = Mode_switch"
share|improve this answer
    
Thanks. Your line did not work directly for two reasons: 1. xmodmap wants a file so I have to pipe the string and read from stdin. 2. Mode_switch was successfully assigned but did not result in the 3rd level modifier. Then I played with xev again. When I realized that the string "Mode_switch" showes up there it was easy to press AltGr and look what one could read instead in the corresponding place. -> ISO_Level3_Shift. –  basweber May 7 '10 at 14:38
    
@basweber: I forgot the -e option. I've edited my answer. –  Dennis Williamson May 7 '10 at 15:13
    
Yes. Thats much cleaner than the piping approach. –  basweber May 8 '10 at 20:20
add comment

Your Answer

 
discard

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.