you need an error message. :) probably just `invariant(false, "Unexpected keyboard event type %s", event.type);` will do.