Added a key listener.