1

I want to remap my caps lock to shift and my left shift to control, but I want to leave my current left control untouched and also working as a control.

Following the advice in this question Use setxkbmap to swap the Left Shift and Left Control

I used xkb to make this script

partial modifier_keys
xkb_symbols "my_key_remap" {
    replace key <LFSH> { [ Control_L ] };
    replace key <CAPS>  { [ Shift_L ] };
};

This sort of works, but my new shift control doesn't seem to work. When I test with xev, I see that it left shift is mapped to control. However, when I press normal control, xev responds once and then waits for a keyup. but when I use my new shift control, it shows up as left control (although it is still keycode 50) but the key press event fires many times instead of just once like it did for the regular control key.

However, if I add the line replace key <LCTL> { [ Shift_L ] }; (removing the original control key) that that the new shift-control is the only left control, then it works as expected and xev reports that it fires only a single key press event even if I hold the key.

Any ideas?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Erotemic
  • 123

0 Answers0