Of course, soon as I feel things are stable enough to merge to master bugs come crawling out of the woodwork. Fix for being sure Fenrir switches out of its modal mode completely when leaving speech history.

This commit is contained in:
Storm Dragon
2026-05-21 01:07:01 -04:00
parent 29a6c3eb42
commit f84167a7fb
2 changed files with 44 additions and 0 deletions
@@ -172,6 +172,7 @@ class SpeechHistoryManager:
str([1, ["KEY_KPENTER"]]): [1, ["KEY_KPENTER"]],
str([1, ["KEY_ESC"]]): [1, ["KEY_ESC"]],
}
self._refresh_input_bindings()
def _restore_bindings(self):
if self.bindings_backup is not None:
@@ -180,3 +181,21 @@ class SpeechHistoryManager:
self.env["rawBindings"] = self.raw_bindings_backup
self.bindings_backup = None
self.raw_bindings_backup = None
self._reset_input_state()
self._refresh_input_bindings()
def _reset_input_state(self):
try:
self.env["runtime"]["InputManager"].reset_input_state()
except Exception:
pass
def _refresh_input_bindings(self):
try:
refresh_grabs = getattr(
self.env["runtime"]["InputDriver"], "refresh_grabs", None
)
if refresh_grabs:
refresh_grabs(force=True)
except Exception:
pass