Adding key listener.