[orca] Do a better job of consume key presses in learn mode
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Do a better job of consume key presses in learn mode
- Date: Thu, 2 Feb 2012 00:40:51 +0000 (UTC)
commit e95be5b1e0fc18d365368541842ad61cdf07bf77
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Feb 1 19:40:11 2012 -0500
Do a better job of consume key presses in learn mode
src/orca/input_event.py | 8 +++-----
src/orca/orca.py | 5 +----
2 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index a37019e..0c17ed5 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -389,11 +389,9 @@ class KeyboardEvent(InputEvent):
if we presented the event. False if there was some reason the event
was not worthy of presentation."""
- if self.shouldEcho == False and not settings.learnModeEnabled:
- return False
-
- if self.isOrcaModified():
- return False
+ if not settings.learnModeEnabled:
+ if self.shouldEcho == False or self.isOrcaModified():
+ return False
try:
role = orca_state.locusOfFocus.getRole()
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 909e58a..080e405 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -807,9 +807,6 @@ def _processKeyboardEvent(event):
return listShortcuts(keyboardEvent)
if notification_messages.listNotificationMessagesModeEnabled:
return notification_messages.listNotificationMessages(keyboardEvent)
- if settings.learnModeEnabled:
- if not _orcaModifierPressed:
- return True
# See if the event manager wants it (i.e. it is bound to a command.
if _eventManager.processKeyboardEvent(keyboardEvent):
@@ -828,7 +825,7 @@ def _processKeyboardEvent(event):
elif not keyboardEvent.isModifierKey():
orca_state.bypassNextCommand = False
- return isOrcaModifier
+ return isOrcaModifier or settings.learnModeEnabled
########################################################################
# #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]