Identify and work with keycodes on javascript