[orca] Fix for bug 617833 - Orca should indicate state of NumLock key



commit ae70724588ad7e2d643b9cc376ca216f5e1c6a2b
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Wed Sep 14 19:06:39 2011 -0400

    Fix for bug 617833 - Orca should indicate state of NumLock key
    
    Please note: You will presently need at-spi2-core from master for
    this to work; otherwise, Orca will suggest the state is always
    locked.

 src/orca/input_event.py |    4 ----
 src/orca/orca.py        |   14 ++++----------
 2 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index 1ee3268..f08b4fb 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -101,10 +101,6 @@ class KeyboardEvent(InputEvent):
             if value < 32:
                 self.event_string = chr(value + 0x40)
 
-        # Filter out the NUMLOCK modifier -- it always causes problems.
-        #
-        self.modifiers = self.modifiers \
-                          & settings.ALL_BUT_NUMLOCK_MODIFIER_MASK
 
     def toString(self):
         return ("KEYBOARDEVENT: type=%d\n" % self.type) \
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 0b1760d..05033fb 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -1050,16 +1050,10 @@ def keyEcho(event):
                                      + " " + _("on")
 
             elif event_string == "Num_Lock":
-                # [[[TODO: richb - we are not getting a correct modifier
-                # state value returned when Num Lock is turned off.
-                # Commenting out the speaking of the bogus on/off state
-                # until this can be fixed.]]]
-                #
-                #if modifiers & (1 << pyatspi.MODIFIER_NUMLOCK):
-                #    eventType = KeyEventType.LOCKING_UNLOCKED
-                #else:
-                #    eventType = KeyEventType.LOCKING_LOCKED
-                pass
+                if modifiers & (1 << pyatspi.MODIFIER_NUMLOCK):
+                    eventType = KeyEventType.LOCKING_UNLOCKED
+                else:
+                    eventType = KeyEventType.LOCKING_LOCKED
 
             if brailleMessage:
                 braille.displayMessage(brailleMessage,



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