I tried to remap some keys using xmodmap. For example,
xmodmap -e "keycode 118 = Next"
maps Insert key of my laptop (XPS 13 9360) to PgDn. It works for some applications such as firefox and visual studio code, but does not work for some other applications including gnome-terminal, xfce4-terminal, epiphany, and gedit. I'm running gnome 3.24 / Wayland / Archlinux. I have no idea why some applications don't work properly with xmodmap. Any suggestion?
Edit: Ok, I gave up xmodmap. Instead I decided to touch xkb. Editing some entries of two files pc and altwin under /usr/share/X11/xkb/symbols/ seems to work well.