Making VoiceOver act more like other screen readers

By Chris Norman, 20 June, 2014

Forum
macOS and Mac Apps

Hi everyone,
For anyone interested, I have made up some VoiceOver keys which make VoiceOver behave more like NVDA / Jaws, by using the Keyboard Commander.

The included link to the Zipm file gives you my exported keyboard command preferences, and all the scripts I use.

To make the scripts work, you'll either have to put them in ~/Dropbox/backups, or just rejig the keys to point them at the right place.

This is a slimmed down version of the scripts I used in the guide I posted yesterday, using single scripts, rather than scripts that call shell scripts.

I hope this helps someone. The link to the zip file is:
http://metropolismoo.co.uk/downloads/VoiceOver.zip

An idea of the keys included is as follows:

(All keys assume your keyboard commander hotkey, right option by default):

h - find next heading
Shift h - Find previous heading
1..6 - find next heading at level 1..6
Shift 1..6 - Find previous heading at level 1..6
7 - Toggle braille cursor
Shift 7 - Toggle contracted braille
9 - Open application chooser
0 - Open window chooser
b - Find next button
Shift b - Find previous button
f - Find next frame
Shift f - Find previous frame
g - Find next image
Shift g - Find previous image
i - Find next italic text
Shift i - Find previous italic text
j - Find next control
Shift j - Find previous control
k - Find next link
Shift k - Find previous link
l - Find next list
Shift l - Find previous list
p - Find next plain text (not all that useful)
Shift p - Find previous plain text (Not all that useful)
q - Find next block quote
Shift q - Find previous block quote
r - Find next radio group
Shift r - Find previous radio group
v - Find next visited link
Shift v - Find previous visited link
x - Find next checkbox
Shift x - Find previous checkbox
` - Read battery status
a - Open the Applications folder in the finder
u - Open the utilities folder in the finder

There are more, but you can go through the list and find them yourself.

Options

Comments

By splyt on Friday, June 27, 2014 - 04:30

......... if quick nav is on then h / b / others will find next elements in web. I am not being rud here but what are the points of all this?
I ask because may be you did not know these keystrokes or may be I did not get the idea here.

By Tree on Friday, June 27, 2014 - 04:30

I was wondering the same thing. We already have h for navigating by heading Etc. It would be understandable for one not to realize this of course. I do have a question relating to this that I have wondered about for a long time and it sounds like you might be just the person to have an answer to this question Chris Norman. I was wondering if there would be some way where one could create voice over keys one could hold down with one's right hand. Such an option would help with keystrokes such as v o, a for applications, v o, d for go to dock. v o, f for find text, v o, g for go to next instance of text, v o, shift c for copy last spoken phrase. It would help for any time one has to do a v o, keystroke that involves the left side of the keyboard. I am not sure exactly how one could make this work, but I was wondering if one possible solution might be to be able to toggle the right command key to act as a control key. Of course this would not be something one would want all of the time since you need a right command key for things such as copy and paste, command c and command v, but being able to have the option of control option keys for one's right hand would be sweet.

Hi,
You're absolutely right, there is quick nav. But it messes me up when I hit text fields, and as a result, usually have it off.

Having these keys allows me to just use the Keyboard commander (which is on on my machine constantly).

Admitedly, quick nag is more convenient, but in the long run, when I calculate the time I'd spend turning it on and off, it's quicker this way.

All this being said, it could just be me being a bit stupid, and having fat fingers! :-)

Hiya mate.

Personally, I use either the little and ring fingers, or the ring and middle fingers of my left hand (depending on which type of keyboard I'm using), and don't have any problem hitting the keys.

If you really want a one handed solution though, the only two things that spring to mind are possibly make more quick nag keys, use the number pad commander (if that is an option), or use control-option lock (VO-;).

Hope some of this helps, if not let me know, and I'll give it some thought.

Have fun.

By Tree on Friday, June 27, 2014 - 04:30

In reply to by Chris Norman

I agree that the keystrokes I am talking about are doable, but for me at least they are not ideal. its not a one handed solution I'm after, I just feel that if macs had full function keys on both sides of the keyboard, as I believe windows keyboards do, it would result in a better experience. I don't have a num pad and I agree locking the v o keys is a work around, but for me its even more cumbersome then moving my right hand over to the left side of the keyboard. I have a very half baked idea, but it probably would not work. I know that I rarely, if ever, use the option key on the right of the keyboard. Could it be possible with keyboard scripts or something, to make it where when one holds down the right handed option key the right command key becomes a control key? This would give you v o keys on your right hand while not compromising the right hand command key when you just want to use it alone. Sorry this might be totally impossible. I know I have dabbled very slightly with keyboard remapping apps only to quickly decide I am in over my head. I am ok with things the way they are. I just think they could be better. weather or not you have any thoughts on this I appreciate your comment Chris.

By dvdmth on Friday, June 27, 2014 - 04:30

The keyboard I have has a full set of modifiers on both sides. It is an extended keyboard, with the number pad, and the arrow keys are separate from the main keyboard. It is an Apple wired keyboard which I have had for a few years now. I know a lot of keyboards from Apple, including the wireless one I use with my iPad, do not have the Control key on the right side in order to make room for the arrow keys below the right Shift key. I assume this is the keyboard design you have.

To be honest, I rarely use the right modifier keys. This is because, when I gre up and learned to use the keyboard, the one we had in our house had only the Shift key on the right side. The Control, Option, and Command keys were all on the left side only. Since I used these keys frequently, I got used to making left-handed keystrokes with the left modifiers, using a pinky or ring finger on the modifier and sliding one of the other left hand fingers over to hit the necessary key. That's how I learned to type, and it stuck with me to this day, even though it's not what you're supposed to do.

In any event, to help out with your problem, the only thing I can suggest is to use the keyboard commander to assign VoiceOver commands to various keys, such as making right Option + f perform the VoiceOver command for find. This is not an ideal solution, and not all commands can be assigned this way, but it would give you at least some functionality without needing a right Control key. I suppose there may be a way to make the right Option key act as both Control and Option when pressed, but then you wouldn't have access to the keyboard commander unless you switch it to the left Option key, which further limits the functionality you would have access to. Long story short, you really need a right Control key to get around this, and that would ultimately require getting a new keyboard, which I would not recommend spending money on just for this.

In general, sighted Mac users don't use the Control key much, except for making right clicks if they have only one mouse button. Most keystrokes on the Mac use Command, Option, and/or Shift, but not Control. This is why I suspect Apple used the Control key as one of the VO keys, as that would reduce the likelihood of a keystroke conflict dramatically. This is also why I suspect Apple does not offer a right Control key on their non-extended keyboards, because of the modifiers on the right side, it is used the least.

By Chris Norman on Friday, June 27, 2014 - 04:30

No idea about other keyboards, but here in my studio, I'm actually using a PC keyboard plugged into a KVM which feeds both my iMac, and my rack-mounted PC.

I have just checked it, and I can use right option and right control to work with VoiceOver.

I know this doesn't help you Tree, but at least you can be avengingly sure that cheap PC keyboards will probably help you if you don't require a mobile solution.

HTH,

By Dave Nason on Friday, June 27, 2014 - 04:30

Member of the AppleVis Editorial Team

Hi. You could achieve some of that with Keyboard Maestro. A user called Keith has even created some Macros and made them available for download to use with Keyboard Maestro. For example with it I can now get to the dock by pressing Command-Option-D, which allows you to use the two keys to the right of the spacebar too. You can get a free trial of Keyboard Maestro at www.keyboardmaestro.com and download Keith's macros at www.insanelypractical.com, or create your own.

By JDawg on Friday, June 27, 2014 - 04:30

where do you put the scpt files? i got the keyboard prefs imported but don't know where to put the applescript files?

I have them in my Dropbox, in a folder called backups. Best thing to do is go through the keys, and find all the ones that say "run apple script script ...", and point them to where your scripts are loaded.

Got me an awesome new one that tells me if my internet is functioning properly! Shell scripting for the win! :-)

By JDawg on Friday, June 27, 2014 - 04:30

can you post a link for the internet script? would be useful i think

It's pretty simple, just make a new apple script, and give it the following code:
do shell script "killall say;
if ping -c1 bbc.co.uk;
then msg=\"up\";
else msg=\"down\";
fi;
say \"Net is $msg\" -r 500"

Could probably expand it to do some diagnosis, but that's beyond my inclination or skill atm.

Perhaps have it read if you're connected via a wired, wireless or bluetooth connection? Speak wireless essid, or which bluetooth device you were connected too.

For now this surfaces.

By Chris Norman on Friday, June 27, 2014 - 04:30

If someone can make this work better, that would be awesome:

It works quite nicely as it goes, but apps don't seem to focus properly when I try and load them.

(Just updated the usage instructions, and made the help dialog a little prettier:)
<code>
set fname to "~/.run_recent"
set last_command to (do shell script "touch " & fname & ";cat " & fname)
display dialog "Enter target:" default answer last_command
set run_string to text returned of result as string
do shell script "echo " & run_string & " > " & fname
if run_string = "help" then
display dialog "Enter either the name of an application or utility, or w:website or e:email_address or s:web search." buttons {"Quit"} default button 1
return
end if

if (offset of "~" in run_string) = 1 then
if run_string = "~" then
set run_string to system attribute "HOME"
else
set run_string to ((system attribute "HOME") & (characters 2 through (length of run_string) of run_string)) as string
end if
else
set colon to offset of ":" in run_string
if colon > 0 then
set prefix to characters 1 through (colon - 1) of run_string as string
set run_string to (characters (colon + 1) through the length of the run_string) of run_string as string
if prefix = "e" then
set run_string to "mailto:" & run_string
else if prefix = "w" then
set run_string to "http://" & run_string
else if prefix = "s" then
tell application "Safari"
activate
search the web for run_string
set visible of first window to true
end tell
return
else
display dialog "Unrecognised prefix: " & prefix & ". See help for details."
return
end if
else if (offset of "www." in run_string) = 1 then
set run_string to "http://" & run_string
else
activate application run_string
try
tell application run_string to set visible of first window to true
on error error_msg
end try

return
end if
end if
do shell script "open \"" & run_string & "\""
</code>

By chad on Friday, June 27, 2014 - 04:30

hi when i imported the scripts they worked but speech is real fast tried slowing it down but didn't change at all

By mehgcap on Friday, June 27, 2014 - 04:30

Hello, First, if you are filling out a form, you can tab to each field. Doing so with Quick Nav on will let you type normally. This may help a lot of the frustration.

Second, you can easily, and at no cost. remap your keys. There is a podcast on doing this right here. Note that this is to make the caps lock key act like the VO keys, but the principles are th same no matter which keys you want to adjust.

By splyt on Friday, June 27, 2014 - 04:30

Using the quick nav and when reaching a edit field doing shift tat and a tab is the fastest way to fill stuff.

Hiya mate,
You need to open each script file and find the bit that says "-r 500". 500 is the speech rate (it's using the say command, not VoiceOver as I can't get that to respond properly).

HTH.

By Chris Norman on Friday, June 27, 2014 - 04:30

Hiya guys,
First of all, thanks a bunch for the podcast, I'll go read that now.

Secondly, I didn't realise that tabbing interacted with each thing, thus making quicknav quite nice, but hey, I still like my keys! :P

Cheers for the tips guys, glad this thread has got such a lot of useful information bundled into it!

Have fun.

Hi,
Seems my efforts making VoiceOver read stuff were failing before because Applescript Editor reads the word "Run" when you run a script, thus VoiceOver's output gets bypassed, leading me to think nothing was working.

Anyways, I put modified versions of all the scripts to use VoiceOver's output function, rather than piping it through say. This way, your VoiceOver preferences will be respected when speaking. As a bonus, if you have braille enabled, and announcements showing, you'll even get braille output of stuff.

You can find the updated guide here:

http://www.applevis.com/guides/mac-os-x-miscellaneous-programming-os-x-voiceover/making-voiceover-announce-time-and-date