From 9836070299e0894ac02949561cf32faee2a4764e Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 2 Mar 2026 17:43:34 +0100 Subject: [PATCH] fix(core): clarify and extend comment --- core/src/state.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/state.hpp b/core/src/state.hpp index 1be699f3c5..8e6584b05c 100644 --- a/core/src/state.hpp +++ b/core/src/state.hpp @@ -179,7 +179,15 @@ public: /** * This is used to track whether the backspace key was handled internally * during the keydown event. This is needed so that we can return the same - * value from the keyup event. Only used when processing KM_CORE_VKEY_BKSP. + * value from the keyup event as we did for the keydown event. + * + * Backspace is the only key that we sometimes handle internally (if we + * have enough context) and sometimes not. By the time we get the keyup + * event the context already got updated and so we have no way of knowing + * whether or not the keydown handled it internally. Therefore this + * flag exists. + * + * Only used when processing KM_CORE_VKEY_BKSP. */ void set_backspace_handled_internally(bool handled) { _backspace_handled_internally = handled; } bool backspace_handled_internally() const { return _backspace_handled_internally; }