Ubuntu – How to check which key is pressed

keyboard-layout

On my keyboard-layout the left CTRL-Key is not working (the right works normal).

How can I check if another key is ordered to that key?

I once had a commandline tool that i could start and there it showed me every input that came whatever key I pressed, but I cannot find it anymore.

If I find out, that it works, I want to remap the correct key to my left CTRL-Key

Best Answer

Would that be xev?

Here's a command for simplified output:

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

I found it here: https://wiki.archlinux.org/index.php/Extra_Keyboard_Keys#In_Xorg