How to see keypress codes in Linux

#linux #x11 #wayland

  1. X11/Xorg
xev
  1. Wayland
wev

Note: wev is more useful on wayland, because you can also see the keycodes