xbd - keyboard

Remap keys using xkb

well first of all good luck. As of writing I am on Ubuntu 20.4 and using KDE (with wayland). Apparently xmodmap does not work with wayland. I could not find the most correct way(which is think should work using .config). Special thanks to this migration blog by Val and this xkb guide by Damiano Venturin. Saved me a lot of time.

So what I ended up doing was:

  1. Whatever was said in the blog by Val. Adding .lst to the evdev file. But still it did not work.

  2. Ended up adding keybinds in the usr/share/x11/xkb/symbols/us file. This is the file which contains the keybinds for the US keyboard. I added the following lines to the file.

    default partial alphanumeric_keys modifier_keys
    xkb_symbols "basic" {
     name[Group1]= "English (US)";
     key <TLDE> {	[     Control_L	]	};
     .
     .
     .
     key <LCTL> { [ quoteleft, asciitilde ] };
     key <RCTL> { [ Control_R ] };
     };