Re: Editable text accessibility - does it exist?
Re: Editable text accessibility - does it exist?
- Subject: Re: Editable text accessibility - does it exist?
- From: Travis Siegel <email@hidden>
- Date: Thu, 7 Oct 2010 00:34:18 -0500
On Oct 6, 2010, at 11:03 PM, Scott Kovatch wrote:
Hello,
I'm looking into providing the equivalent of IAccessibleEditableText
for the Cocoa version of the SWT. For those not familiar with
IAccessible2, this is a collection of methods for getting text from
and sending it to the clipboard using an assistive technology.
Basically, something would call into our code and invoke copy,
paste, replace text, set attributes, etc. directly, with a string
and insertion point or range of text to modify as opposed to
invoking cut/copy/paste from the menu or via keyboard shortcut and
reading from the clipboard and modifying whatever is currently
selected.
The main caller of such an API would most likely be a voice
recognition engine that could handle a command like "copy word 2" or
"paste at the end of the line", but that seems beyond the
capabilities of either Speakable Items or Dragon Dictation. Both of
those look like they just send a keystroke to the frontmost
application.
I'm not seeing anything in NSAccessibility that would let me
accomplish this -- it's more oriented towards reading and writing
attributes and invoking direct actions as opposed more complicated
things like 'copy characters 3 through 10 to the clipboard, and
don't move the selection' -- I guess I'm looking for something like
a parameter-izable action, much like
accessibilityAttributeValue:forParameter:
Having said all of that, I guess I have two questions:
-- Is there a way to interact with the clipboard that doesn't
involve invoking a menu item or command key?
It sounds like you could build soe apple scripts, (they're very good
at this sort of thing) and just have voice coands that envoked them to
accoplish what you're asking. Copying text is very easily done with
apple scripts, and if it was tied to a comand activated by a voice
coand, it would appear to be part of your app, so it wouldn't even be
noticed that it wasn't done via cocoa/carbon/java coding.
Alternatively, you could probably use copy/paste keystrokes to do what
your after as well.
I have no specific details for you, merely suggestions on what to try.
I have some apple scripts that do take chunks out of data, and the
speed of the script is hardly noticable, as it works almost instantly.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden