[orca] Fix regressions from keyboard event refactor
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix regressions from keyboard event refactor
- Date: Tue, 19 Apr 2016 21:40:54 +0000 (UTC)
commit 4026d680f85996f0121a73dbf825bc5bb5821d05
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 19 17:40:26 2016 -0400
Fix regressions from keyboard event refactor
src/orca/input_event.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index f394948..8ffad94 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -484,9 +484,15 @@ class KeyboardEvent(InputEvent):
if not self._script:
return False, 'No active script when received'
+ if self.is_duplicate:
+ return False, 'Is duplicate'
+
if orca_state.capturingKeys:
return False, 'Capturing keys'
+ if orca_state.bypassNextCommand:
+ return False, 'Bypass next command'
+
self._handler = self._getUserHandler() \
or self._script.keyBindings.getInputHandler(self)
@@ -495,9 +501,6 @@ class KeyboardEvent(InputEvent):
# is no handler.
scriptConsumes = self._script.consumesKeyboardEvent(self)
- if self.is_duplicate:
- return scriptConsumes, 'Consuming based on handler'
-
if self._isReleaseForLastNonModifierKeyEvent():
return scriptConsumes, 'Is release for last non-modifier keyevent'
@@ -523,6 +526,7 @@ class KeyboardEvent(InputEvent):
return True, 'Orca modifier'
if orca_state.listNotificationsModeEnabled:
+ self._consumer = self._script.listNotifications
return True, 'Listing notifications'
if not self._handler:
@@ -601,7 +605,7 @@ class KeyboardEvent(InputEvent):
return False, 'No active script'
if self.is_duplicate:
- return self._should_consume, 'Consumed based on handler'
+ return False, 'Is duplicate'
self._present()
@@ -615,7 +619,8 @@ class KeyboardEvent(InputEvent):
return True, 'Orca modifier'
if orca_state.bypassNextCommand:
- orca_state.bypassNextCommand = False
+ if not self.isModifierKey():
+ orca_state.bypassNextCommand = False
return False, 'Bypass next command'
if not self._should_consume:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]