Change the way the keypresses are handled