This document contains an example of exchanging the behavior of the backslash and backspace keys on a Linux system.
Install xmodmap
and xev
in my NixOS
$ nix-shell -p xorg.xmodmap
$ nix-shell -p xorg.xev
$ touch .xmodmaprc
$ emacs .xmodmaprc
Add keycode to exchange. To exchange the actions of the backslash key and the backspace key, use keycodes 22 and 51 as shown below.
!.xmodmaprc
keycode 22 = backslash bar
keycode 51 = BackSpace
Re-login or Reboot your X-window system.