Sending Keys using custom WSRMacros

We’ve received some comments and questions recently from users trying out the new WSR Macros utility we released on about keystroke macros.

Here’s the scoop…

We utilize a very similar syntax for sending keys from macros as compared with other built-in functionality in the OS. However, we’ve extended it in a few ways. Instead of talking about the differences, I’ll try to give you an overview of how we represent keystrokes.

First, what does a macro that sends keys even look like. It looks like this:


    <listenFor>All Select</listenFor>


You can either generate that using our built-in wizard, or you can just type it in yourself, and save it to your Speech Macros directory.

You can see that I have {{CTRL}} preceding the letter a. That basically means, press and hold the CTRL key then press the a key, then release both. That {{CTRL}} is a modifier for the next non-modifier key. We also have {{SHIFT}} and {{ALT}} to support all the normal types of hotkeys you’d run into.

We also have a shortcut syntax for SHIFT, CTRL and ALT. You can use + for SHIFT, ^ for CTRL, and % for ALT. We didn’t make this part up. This is the built-in behavior for other applications that send keys to applications. Now, if you wanted to use a plus sign, you could also escape that by using {+}. Similarly, you can use {^} and {%} to escape those characters.

In addition, you could have  need for actually pressing the CTRL key and then releasing it, not actually using it as a modifier. To do that, just use {CTRL} instead of {{CTRL}}. The simple rule here is that modifiers have two brace characters surrounding them, but can be used as actual keys by only using a single brace character.

There are also many special keys you’d like to send that we’ve also represented. Here’s the full list:


Each of these can also be used as a modifier as well, just enclose them in another set of braces.

There are some other abilities too, such as sending unicode characters, inserting delays, and more… I’ll save those for another post another day.

Remember, if you have questions, send them to us at

Comments (0)

Skip to main content