[accerciser] Fix expand/collapse of node when numlock is on



commit 4684cae4a24df6f5bb75c0162f1f238f5cacf3f2
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Mon Jun 10 17:49:58 2019 +0200

    Fix expand/collapse of node when numlock is on
    
    Only shift/control/alt are typically meant to change shortcut behavior.

 src/lib/accerciser/accessible_treeview.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/lib/accerciser/accessible_treeview.py b/src/lib/accerciser/accessible_treeview.py
index 9e86859..722cb00 100644
--- a/src/lib/accerciser/accessible_treeview.py
+++ b/src/lib/accerciser/accessible_treeview.py
@@ -587,7 +587,10 @@ class AccessibleTreeView(gtk.TreeView, ToolsAccessor):
     '''
     Expand or collapse a row on Left/Right key-press
     '''
-    if event.state == 0:
+    if event.state & \
+        (gdk.ModifierType.SHIFT_MASK
+        |gdk.ModifierType.CONTROL_MASK
+        |gdk.ModifierType.MOD1_MASK) == 0:
       path, col = self.get_cursor()
       if path is not None:
         if event.keyval == gdk.KEY_Left:


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