[orca] Re-add numlock to the modifiers we store



commit 867bb57c7f085b124d1914bd147e5c5c96ecdab6
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jul 6 14:43:35 2020 +0200

    Re-add numlock to the modifiers we store
    
    Filtering out extraneous/reserved modifiers by side effect caused us to
    stop announcing the state of numlock correctly.

 src/orca/input_event.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index b685f45cd..7f2b32fe9 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -232,6 +232,8 @@ class KeyboardEvent(InputEvent):
         self.type = event.type
         self.hw_code = event.hw_code
         self.modifiers = event.modifiers & Gdk.ModifierType.MODIFIER_MASK
+        if event.modifiers & (1 << pyatspi.MODIFIER_NUMLOCK):
+            self.modifiers |= (1 << pyatspi.MODIFIER_NUMLOCK)
         self.event_string = event.event_string
         self.keyval_name = Gdk.keyval_name(event.id)
         self.timestamp = event.timestamp


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]