Re: [orca-list] Couple of questions



Hi,

Re: the second question:

pyatspi has a function for generating keyboard events.

import pyatspi

pyatspi.Registry.GenerateKeyboardEvent(38,None,pyatspi.KEY_PRESSRELEASE)

Will generate an "a" keypress for example (the 38 in the above code is the keycode for an "a").

Keycodes exist for all keys including the arrows, enter, tab etc.

I found this with a quick google on "python simulate keypress", I think looking at the pyatspi documentation would be a good place to find out more.

Paul


On 14/05/10 16:50, Michael Whapples wrote:
Hello,
I have a couple of questions.

1. How do I get orca to bind presses of the keys on a Braille display to a function? I notice in Storm's customizations.py script for date/weather/etc that keybindings are added to orca.settings.keyBindingsMap (to the "default" value of the dictionary). I notice that in orca.settings there is also a brailleBindingsMap, so is it the same idea? 2. If I want to get orca to emit a keypress, does it have a way of doing this built in or do I need to use something like virtkey (http://launchpad.net/virtkey)?

OK, may be it would be good for me to express what I am trying to do as if there is a better way to do it then someone could actually say.

I want it that I can do certain keyboard actions from my Braille display eg. tab/shift+tab/cursor up and down/etc. My thought was, if I can get orca to emit a keypress then I can map a function I create to a Braille key press. As far as I know orca doesn't have such actions defined internally so that's why I thought simply emit the key press and let gnome/the application pick up the event and perform its action.

Michael Whapples
_______________________________________________
orca-list mailing list
orca-list gnome org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Netiquette Guidelines are at http://live.gnome.org/Orca/FrequentlyAskedQuestions/NetiquetteGuidelines
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp






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