2

Because CapsLock has the keycode 66 on my English_US keyboard layout, the command

xmodmap -e "clear Lock" -e "keycode 66 shift = Delete BackSpace"

turns CapsLock into the Delete key and Shift+CapsLock into BackSpace.

If I want to swap the mappings of CapsLock and Shift+CapsLock by

xmodmap -e "clear Lock" -e "keycode 66 shift = BackSpace Delete"

then Shift+CapsLock does not delete the character under the cursor but gives an error bell. Albeit xev shows that the correct keysymbol Delete is passed to X. Why?

1 Answer 1

0

If

 key <CAPS> { [ NoSymbol, Delete ] };

is in ~/.Xkbmap, then <Shift-CAPS> sends <SHIFT-DELE>.

Instead, if

 key <CAPS> { actions = [ NoAction(), Redirect(key=<DELE>,clearmods=all) ] };

then <Shift-CAPS> sends <DELE>.

The necessity of the Redirect(...) action in this case rests a mystery to me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .