I used to use the method suggested in this answer for swapping minus and underscore on Ubuntu 16, namely:
xmodmap -e "keycode 20 = underscore minus underscore minus"
This is not working for me on Debian 11. Is there another method that works?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ echo $XDG_CURRENT_DESKTOP
GNOME
