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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user