Add listener for keypresses in the window