[orca] Use the gdk default modifier mask when testing modifier keys



commit 38ed0659506260dc5ffdfa5e8099d0afc92c43d9
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jun 30 19:48:19 2020 +0200

    Use the gdk default modifier mask when testing modifier keys
    
    The input events we get when in (at least) gnome-shell are now modified
    with a reserved modifier mask. This can interfere with (at least) learn
    mode functionality. Taking the logical-and of the event's modifiers with
    the default modifier mask ensures we ignore reserved modifiers.
    
    Fixes GNOME/orca#156.

 src/orca/input_event.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index 3776da9e6..d92411ab3 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -231,7 +231,7 @@ class KeyboardEvent(InputEvent):
         self.id = event.id
         self.type = event.type
         self.hw_code = event.hw_code
-        self.modifiers = event.modifiers
+        self.modifiers = event.modifiers & Gdk.ModifierType.MODIFIER_MASK
         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]