Fix major oversight in handling of key events