[orca] Stop using speechdispatcher's KEY command for printable key echo
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Stop using speechdispatcher's KEY command for printable key echo
- Date: Fri, 6 Jun 2014 15:02:45 +0000 (UTC)
commit 529d310a6c077bd4009522c61a5c801a8a18875a
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Jun 6 10:56:09 2014 -0400
Stop using speechdispatcher's KEY command for printable key echo
It causes Orca to say one thing when a key is pressed and a different
thing when you arrow to the character. Presentation should be consistent.
src/orca/speechdispatcherfactory.py | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index 8305fab..1bf59a8 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -71,13 +71,6 @@ class SpeechServer(speechserver.SpeechServer):
DEFAULT_SERVER_ID = 'default'
_SERVER_NAMES = {DEFAULT_SERVER_ID: guilabels.DEFAULT_SYNTHESIZER}
-
- KEY_NAMES = {
- '_': 'underscore',
- ' ': 'space',
- 'space': 'space',
- '"': 'double-quote',
- }
def getFactoryName():
return guilabels.SPEECH_DISPATCHER
@@ -433,18 +426,10 @@ class SpeechServer(speechserver.SpeechServer):
self.speak(name, acss)
def speakKeyEvent(self, event):
- acss = ACSS(settings.voices[settings.DEFAULT_VOICE])
- if event.isPrintableKey():
- # We currently only handle printable characters by Speech
- # Dispatcher's KEY command. For other keys, such as Ctrl, Shift
- # etc. we prefer Orca's verbalization.
- if event.event_string.isupper():
- acss = settings.voices[settings.UPPERCASE_VOICE]
-
- key = self.KEY_NAMES.get(event.event_string, event.event_string)
- self._apply_acss(acss)
- self._send_command(self._client.key, key)
- return
+ if event.isPrintableKey() and event.event_string.isupper():
+ acss = settings.voices[settings.UPPERCASE_VOICE]
+ else:
+ acss = ACSS(settings.voices[settings.DEFAULT_VOICE])
event_string = event.getKeyName()
if orca_state.activeScript:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]