When you press a key while the xev window is in focus, the terminal will output a detailed log of that event. This log contains the "keycode"—the raw numerical value the kernel assigns to that physical key. How to Use xev to Find Keycodes To find a specific keycode, follow these steps: : Launch your preferred terminal emulator.
xmodmap ~/.Xmodmap
Turn Caps Lock into an additional Ctrl key. xev keycodes