Copyright 2002-2013 Rick Mohr
 

Most commands you need to control a computer by voice are simple keystroke commands—"When I say this, send these keystrokes." These are easy to write in Vocola. For example, the following command types the word "Greetings" when you say "Hello World":

Vocola: Hello World = Greetings;

Say: Hello World  Sent: Greetings

In most cases the keystrokes you want to send will use modifier key sequences to control a particular application. For example, most Windows applications perform a "Copy" operation when you hold down the "Control" key and type the letter "c". The next command uses the phrase "Copy That" to invoke such a "Copy" operation:

Vocola: Copy That = {Ctrl+c};

Say: Copy That  Sent: {Ctrl+c}

You can use multiple modifier keys for a keystroke, and also specify a repeat count. For example:

Vocola: Select Two Words = {Ctrl+Shift+Right_2};

Say: Select Two Words  Sent: {Ctrl+Shift+Right_2}

This holds down both the "Control" and "Shift" keys and presses the right arrow key twice to select the two words following the insertion point.

Finally, you can specify that a key be held down and later specify that it be released. For example:

Touch Hold = {LeftButton_Hold};

Touch Release = {LeftButton_Release};

Saying "Touch Hold" presses and holds the left pointer button, and saying "Touch Release" releases it. In between saying these commands you would move the pointer to the desired location, but would not need to hold down the button yourself.

Note that when creating commands by voice you can use built-in commands to insert keystrokes in the proper syntax. Saying "Insert Control Shift Right Two" works for the above example and saying "Insert Control c" works for the example before that.

The Keystroke Syntax page describes formally how to specify Vocola keystrokes, including tables of key names.

Each Vocola command contains a series of terms (indicating what is said) and a series of actions (indicating what is done), separated by '=' and terminated by ';'. In this section the terms are words and the actions are keystrokes; later sections introduce other possibilities.

More examples

Because Windows applications allow keyboard control of almost everything you can usually write a keystroke command to do what you want. The next example tells Windows Explorer to copy the name of the currently-selected file:

Vocola: Copy Filename = {F2}{Shift+End}{Ctrl+c}{Esc};

Say: Copy Filename  Sent: {F2}{Shift+End}{Ctrl+c}{Esc}

Here's how it works:

{F2}Enter "rename" mode, which opens a small edit field on the file name
{Shift+End}Select the entire file name
{Ctrl+c}Copy the selection
{Esc}Cancel "rename" mode

Some useful commands can be written concisely using special keystrokes, for example:

Show Desktop = {Win+d};

Volume Mute = {VolumeMute};

Go Back = {BrowserBack};

The first command clears or restores the desktop by holding down the Windows key and pressing d. The second command turns the volume mute on or off by pressing the VolumeMute key. (This and the next command work regardless of whether your keyboard actually has the key in question.) The third command is equivalent to hitting a Web browser's "Back" button, with the advantage of working on non-HTML pages like PDFs which swallow up the standard shortcut {Alt+Left}.

You may find it helpful to browse Microsoft's pages of Keyboard Shortcuts.

Special keystrokes like VolumeMute are listed in the tables of Vocola Key Names.