Another shot at fixing multiple numpads.

This commit is contained in:
Storm Dragon
2025-07-25 14:17:17 -04:00
parent 94a1acbaca
commit 84293db6dc
2 changed files with 14 additions and 9 deletions

View File

@ -24,14 +24,19 @@ class command:
def run(self):
if self.env["input"]["oldNumLock"] == self.env["input"]["newNumLock"]:
return
if self.env["input"]["newNumLock"]:
self.env["runtime"]["OutputManager"].present_text(
_("Numlock on"), interrupt=True
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("Numlock off"), interrupt=True
)
# Only announce numlock changes if an actual numlock key was pressed
# This prevents spurious announcements from external numpad automatic state changes
current_input = self.env["input"]["currInput"]
if current_input and "KEY_NUMLOCK" in current_input:
if self.env["input"]["newNumLock"]:
self.env["runtime"]["OutputManager"].present_text(
_("Numlock on"), interrupt=True
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("Numlock off"), interrupt=True
)
def set_callback(self, callback):
pass

View File

@ -4,6 +4,6 @@
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributors.
version = "2025.07.24"
version = "2025.07.25"
codeName = "testing"
code_name = "testing"