Utility tools
Visualizing X events
xev is a command-line tool that setups a toy window and prints all incoming X events. It is a very useful tool to experiment with when trying to determine which events are sent upon which actions.
Keyboard configuration
xmodmap allows one to query information about various input-related keyboard elements. Notably, it lists all the keycodes and corresponding key symbols as interpreted by the X Server.