Question: how to use xev command?
Answer: Open the terminal window from Applications>Accessories>Terminal. Type in the command $xev. Experiment with it and get a feel of how events are generated. Close it and type again in terminal $xev > xev.log. This time all the events will be redirected to xev. ...  Type an identifier(say a) from the keyboard.