Xev is a program that creates an x window, records any input from the x server within that window and then displays it in the terminal. It is an important tool used for debugging purposes and for deciphering the misconfiguation of input devices such as keyboards.
When xev has been invoked in the terminal and, say the f key is pressed, the following useful information is presented about the configuration of the key. This can be helpful for developers or for when a user's keys are responding in an unexpected manner.
KeyRelease event, serial 33, synthetic NO, window 0x2800001,
root 0x142, subw 0x0, time 33302102, (138,433), root:(141,484),
state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
XLookupString gives 1 bytes: (66) "f"
XFilterEvent returns: False
The full description of xev is found by entering man xev in the terminal or by visiting the Ubuntu manpages.