Setup a key listener.