[orca-list] orca customizations




Greetings,
I'm having a little trouble modifying my orca-customizations.py 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 orca-customizations.py instead of going through the preffrences dialog every time.

I read through settings.py 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 live.gnome.org/orca/.  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 live.gnome.org/orca/

# 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.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood


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