Re: [orca-list] orca customizations


Have you considered using the application-specific preferences dialogs to accomplish this? you could set the general preferences for what you want most of the time, and use the application specific preferences (Orca-control-space bar) to change the behavior in the application where you write code to set punctuation to all and speak indentation.


aerospace1028 hotmail com wrote:
I'm having a little trouble modifying my file.

I want to create a function so when I press orcaKey+c I turn the punctuation up to all and turn on speak 
indentation support.  I prefer these features when working with computer code or modifying settings files, 
but like them turned off for most other situations.  I thought, it'd be more convenient to have a 
key-combination defined in instead of going through the preffrences dialog every time.

I read through in the orca directory and found the definitions I need, I think.  I had previous 
successfully implimented a time and date capacity based off the instruction on  I tried 
modifying the templet from my time function to include the below, but it doesn't seam to work.

# setup custom key bindings.
import orca.input_event
import orca.keybindings
import orca.orca
import orca.speech
import orca.braille
import re

# define keybindings object
myKeyBindings = orca.keybindings.KeyBindings()

## the time function from

# define a function to change verbosity and punctuation
# more compatible for coding.
def setCoding(script, inputEvent=None)
import orca.settings
# increase punctuation level to all
  orca.settings.verbalizePunctuationStyle = orca.settings.PUNCTUATION_STYLE_ALL
# speak indentations
  orca.settings.enableSpeechIndentation = True
  return True

setCodingHandler =orca.input_event.InputEventHandler(setCoding, "resets orca for typing computer code.")

# assign orca key + c to our setCode script
myKeyBindings.add(orca.keybindings.KeyBinding("c", 1<<  orca.settings.MODIFIER_ORCA, 1<<  
orca.settings.MODIFIER_ORCA, setCodingHandler))

# add our new keybindings to orca
orca.settings.keyBindingsMap["default"] = myKeyBindings

Does anyone have any suggestions how to fix the above to obtain the functionality for which I am looking?

Thank you:-)

E-mail for the greater good. Join the i’m Initiative from Microsoft. GreaterGood
Orca-list mailing list
Orca-list gnome org
Visit for more information on Orca

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