For my first 15 years of using UNIX on PC keyboards, I had to use xmodmap to remap the ~` key back to the correction location the right side of the keyboard... and move ESC to the key labeled ~`. Similarly with swapping Control/CapsLock. I finally gave it up nearly 15 years ago in an attempt to simplify my setup on new systems.