Using the Key Combo or Keycode Event Types, you can control the applications running on your computer with OSC messages1.

These events respond to OSC message like triggers, when the received value is 1, the key is pressed, and when the value falls back to 0, the key is depressed.

There are two kinds of keyboard events:

  • Key Combo is used to generate key shortcuts, that is a key along with modifiers2.
  • Keycode is used to generate the stroke of a single key. Each keycode is mapped to a key of your keyboard, and with the special event, you can generate event for special keys that could not be created with Key Combo events.

1.  Key Combos

You need to declare which key combos you want to use before assigning them to an event. To do this, you must use the Parameters Window3.

1.1  Parameters Window

The Parameters Window with the first tab selected, shows a list of all the user defined keyboard combos, and their properties:

  • A name, to help memorize its use;
  • A target application: Choose a running application from the drop down menu.

To add a key combo, click the + sign. You will be prompted with a key combo edit window, like this one:

Type a key combo:

When you're done, close the window. The keyboard shortcut is now displayed in the list. You can remove it by clicking the - button or hitting the Backspace key.

To confirm your changes, click the OK button. The changes you made will be saved the next time you save the document.

1.2  To which application are Key Combo events sent?

The key combos are sent to the frontmost application by default.

If you select an application in the bottom drop-down list, the key combos will be sent to that selected application, unless it is not launched, hence reverting to the frontmost application.

If the key combo has an application configured specifically for it, then OSCulator tried to send the keyboard combo to this application first, unless it is not launched, hence reverting to the default target, and if it is not launched either, reverting to the frontmost app.

1.3  How to find back your combos ...

A document with many key combos makes it difficult to find the right key combo in the Values list. To solve that problem, you can sort this list by clicking in the table headers of the Parameters Window.

For example, if you click on the "Name" header, the keyboard combos will be sorted in the ascending or descending order, depending on the status of the sort triangle, like pictured here:

You can also sort by any other key you want, just click the header and you changes will be reflected in the Values list of the Main Window.

2.  Keycodes

To use the Keycode Event Type, you must choose the right keycode from a list of 128 keycodes. All these keycodes correspond to a single key on your Macintosh keyboard.

The Values list displays the keycodes and the key associated with it, if it can be graphically represented by a glyph (some special keys can't be displayed).

It is sometimes faster to search the keycode with a helper application, the Keycode Helper.

2.1  Keycode Helper Window

To find what keycode to which key on the Mac keyboard, open the Keycode Helper (in the menu Window -> Keycode Helper, ⌘K), then type the key you want to assign to the routing. Next, select the corresponding keycode in the Keycode list of the routing window.

Remember that keycodes refer to a key location on the real keyboard, not an actual character. This means that if you change the layout of your keyboard, the same keycode will be used, but the generated character could change. For example, keycode 12 represents character ‘q’ on a US keyboard, whereas it matches the character ‘a’ on a French keyboard.

You can strike multiple keys at the same time, like you would do on a normal keyboard, thus you can do keyboard shortcuts as well.

2.2  Lemur Virtual Keyboard

Bundled with OSCulator is a Lemur patch that displays a virtual QWERTY keyboard (kindly offered by Edmund Eagan). You can use it as a standard keyboard

 

1 and because the OSC protocol is running on the network, you make another computer on the network send keyboard events

2 modifiers are Command (⌘), Option (⌥), Control (⌃) and Shift (⇧)

3 open the Parameters Window by clicking on the toolbar icon, or by selecting the menu item "Parameters Window" in the View application menu

<< OSC Routing | UsersManual | Mouse >>