Keypress listener and example