diff --git a/src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py b/src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py index 429ffe26..4eb2ec0f 100644 --- a/src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py +++ b/src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py @@ -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 diff --git a/src/fenrirscreenreader/fenrirVersion.py b/src/fenrirscreenreader/fenrirVersion.py index 7da2f324..05bc9d62 100644 --- a/src/fenrirscreenreader/fenrirVersion.py +++ b/src/fenrirscreenreader/fenrirVersion.py @@ -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"