diff --git a/core/src/km_core_processevent_api.cpp b/core/src/km_core_processevent_api.cpp index 451c93604a..a2bca95ea8 100644 --- a/core/src/km_core_processevent_api.cpp +++ b/core/src/km_core_processevent_api.cpp @@ -53,7 +53,10 @@ km_core_process_event(km_core_state *state, km_core_status status = state->processor().process_event(state, vk, modifier_state, is_key_down, event_flags); if (state_should_invalidate_context(state, vk, modifier_state, is_key_down, event_flags)) { + // clear the context and the app context state->context().clear(); + state->app_context().clear(); + // we are already committed. So we need to un-commit (remove the end of the vector) if (state->actions().back().type == KM_CORE_IT_END) { state->actions().pop_back();