Documente Academic
Documente Profesional
Documente Cultură
When using ControllerMate, most work is done using the Editor window:
The Editor window is divided into three areas. The upper-left portion of the window
contains the three buttons used to select the current topic of the Editor window:
Programming, Controller Types, or Virtual Controllers.
Below the three buttons is a Directory panel which displays the contents of the current
topic. When the “Programming” topic is selected, this panel will show the current
controller configurations and hierarchy of Groups and Pages. When the “Controller
Types” topic is selected, the controller type entries will be shown. When the “Virtual
Controllers” topic is selected, the current virtual mouse, tablet, and joystick controllers
will be shown.
The right portion of the Editor window contains the workspace. This area shows the
details of the item which is selected in the Directory panel.
Between the Topic Buttons and the Directory panel is the Master Enable button. When
the Master Enable is turned off, ControllerMate has no function — the internal
keyboard and mouse will be reset, and any virtual devices will be disconnected.
Turning the Master Enable back on will reconnect any existing virtual devices.
ControllerMate :: Controller Configurations
Controller Configurations
Controller Configurations are used to change the default behavior of keyboard and
mouse devices. They can be used to:
Controller Configurations can be created only for devices that do not use
manufacturer-supplied drivers. The behavior of devices that use custom drivers will
be determined by those drivers. Devices that can be customized with a Controller
Configuration will be designated by a in the lower-left corner of the device’s icon in
the Palette window.
To create a Controller Configuration, drag a device from the Palette window to the
Directory panel of the Editor window. Controller Configurations may be enabled or
disabled by turning on or off the checkbox next to the configuration’s name in the
Directory panel.
If desired, multiple configurations can be created for each controller. If more than one
Controller Configuration for a particular device is enabled at any given time, then the
settings of the two configurations will be combined as much as possible. If the settings
in multiple configurations for the same device conflict, the settings of the configuration
lower in the Directory panel will override those higher in the list.
ControllerMate :: Building Blocks
Building Block Basics
Building blocks are the basic unit of programming in ControllerMate. Each type of
building block performs a small function. Any number of building blocks can be
connected together to form complex actions.
Every building block has common features. Each block which can accept a value from
another building block has one or more inputs (a block may have no inputs). Each
block which can send a value to another building block has one output (a block may
have no output).
Also in the image above, the block on the left has an ON/OFF output value. The block
on the right has a number output value. ON/OFF outputs are always green, number
outputs are always blue. Each type of output has a shape that is similar to the type of
input that it attaches to.
Building blocks may be connected together either by positioning them such that an
output overlaps an input, or by dragging an output value to an empty input.
The output of a building block may be attached to multiple other building blocks
simply by dragging the output to an unconnected input.
Building blocks are arranged on Pages. To create building blocks, first select a Page (or
create a new Page). Then, in the Palette window locate the particular type of building
block that you want to create. Drag the icon of the building block that you want to
create from the Palette window to the workspace in the Editor window.
To customize a building block, select the block and adjust the settings in the Inspector
window. Each type of building block has its own settings.
Explore the various types of building blocks that are available and the examples to
find out what types of functions you can build.
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
ControllerMate Basics
A Detailed Tutorial
Programming Examples
Windows
Pages & Groups
Building Block Guide
Virtual Controllers
Controller Configurations
Controller Types
Apple’s Keyboard Viewer
A Detailed Tutorial
This tutorial walks you through all of the steps necessary to create basic ControllerMate programming. It assumes that you are
starting up ControllerMate for the first time and are not familiar with the interface. After you have completed this tutorial, you
should be familiar with the basic concept that ControllerMate uses to program controllers. You can then explore the help
pages further to learn more details about ControllerMate’s capabilities.
The Commands
For this tutorial, keyboard functions that may typically be found in first-person shooter games will be assigned to the controls
on a gamepad. These functions are general examples and not from a particular application. The following are the commands
to be programmed:
Key Function
W — Move Forward
A — Move Left
D — Move Right
S — Move Backward
Q — Lean Left
E — Lean Right
Keypad 8— Look Forward
Keypad 4— Look Left
Keypad 6— Look Right
Keypad 2— Look Backward
The Controller
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 1 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
This tutorial uses the Logitech RumblePad 2 USB to perform the functions described above. The RumblePad has four buttons
under the right thumb (Button #1-4), one button on the right-front (Button #6), and a hatswitch under the left thumb that will
be used. Buttons #1-4 will be used for the movement and leaning and the hatswitch will be used for looking. Button #6 will
be a modifier called “Alpha”. It will be used in combination with Buttons #1 and #3 to alter their behavior.
Buttons #1 and #3 will each have two functions: a “normal” function and an “Alpha” function.
If you are using a different controller to follow through this tutorial step-by-step, then it will work out best if you use a
controller that has at least five buttons and one hatswitch.
The Preparation
Building blocks are placed onto pages. The first step in this tutorial is to create a new, blank page. In ControllerMate’s Editor
window, select “Programming” in the upper-left corner then click on the button with the icon in the lower-left. A new,
blank page “New Page 1” should appear as in the image below.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 2 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
In the Inspector window, change the name of the new page to “Lean / Move”. If the Inspector window is not open, Select
“Show Inspector” from the Windows > Properties Inspector menu, or use Command-I to open the Inspector window.
In the same manner, create another new page and give it the name “View”.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 3 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
To create a button with two functions, we will create a modifier called “Alpha” and connect it to Button #6. The state of this
modifier (ON or OFF) will then be combined with Buttons #1 and #3 to indicate which function these buttons should perform.
First, we locate the Logitech RumblePad 2 USB in the Palette window. If the Palette window is not open, Select “Show
Palette” from the Windows > Palette menu, or use Command-E to open the Palette window.
Clicking on the RumblePad in the Palette window will cause the Palette window to show a list of controls on the RumblePad.
Pressing Button #6 on the RumblePad will cause the Palette window to automatically scroll Button #6 into view.
In the Editor window, select the “Lean / Move” page by clicking on its name in the panel in the left side of the window.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 4 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Create a Button building block which represents Button #6 by dragging it from the Palette window to the workspace portion
of the Editor window.
Next, we will create a Modifier building block which represents the “Alpha” modifier. Select “Extras” from the popup menu
at the top of the Palette window. The “Modifier” building block is in the middle of the list of “Extra” building blocks.
Create a Modifier building block by dragging it from the Palette window to the Editor window and drop it immediately below
the Button building block. When dragging the new modifier, the outline will “snap” into place when it gets close to the Button
building block.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 5 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
With the Modifier building block still selected, change the “Name” parameter in the Inspector window to “Alpha”.
Now, the Alpha modifier is complete. When Button #6 is pressed on the RumblePad, the modifier will be turned ON. When
Button #6 is not pressed, the modifier will be OFF. In the next section, we will use this modifier to alter the behavior of
Button building blocks.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 6 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
The “Lean Left” and “Lean Right” functions will be assigned to Buttons #1 and #3 respectively. In the same manner that a
building block was created for Button #6 above, create building blocks for Buttons #1 and #3 by dragging them from the
Palette window to the Editor window.
Since the “Lean Left” and “Lean Right” functions are each performed with one keyboard key (“Q” and “E” respectively), we
will use the Single Key building block to simulate these keys. Select “Outputs” from the popup menu in the Palette window.
The “Single Key” building block is the second item in the list of “Output” building blocks. Drag two Single Key building
blocks to the workspace portion of the Editor window, drop one below each of the two new Button building blocks.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 7 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Select the Single Key building block that is attached to the Button #1 building block. In the Inspector window, click on the
“Keystrokes Palette” button. Drag the “Q” key from the Keystrokes Palette window to the image well in the Inspector
window.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 8 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Select the Single Key building block that is attached to the Button #3 building block. Drag the “E” key from the Keystrokes
Palette window to the image well in the Inspector window.
At this point, if Button #1 is pressed on the RumblePad, the letter “q” will appear in the Output window just as though the Q
key had been pressed on the keyboard. If Button #1 is pressed and held, then several “q” letters will appear in the Output
window until the button is released — just as though the Q key had been pressed and held on the keyboard. The same will
happen with the letter “e” if Button #3 is pressed on the RumblePad.
The last step for the lean functions is to combine Buttons #1 and #3 with the “Alpha” modifier. Select the building block for
Button #1. In the Inspector window, change the popup menu next to “Alpha” to “ON”. After this change is made, this Button
block for Button #1 will not turn ON unless both the RumblePad’s Button #1 is pressed and the Alpha modifier is turned ON.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 9 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
After the Button building blocks’ modifier settings are changed, notice that the indicator on the left end of the building block
changed from black to red.
A red indicator indicates that the building block cannot turn ON because the modifiers for that building block do not have the
correct value. A green indicator indcates that the building block can turn ON (if its button is pressed) because the modifiers
for that building block do have the correct value. A black indicator simply indicates that there are no definite modifier
requirements for the building block. When Button #6 on the RumblePad is pressed, the indicators for the Button building
blocks change from red to green to indicate that they each now can turn ON because the Alpha modifier has the correct value.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 10 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
At this point, if Button #1 is pressed on the RumblePad, nothing will appear in the Output window. If Buttons #6 and #1 are
pressed at the same time, then the letter “q” will appear in the Output window. The same is true for Button #3 and the “e” key.
The “Move” functions will be assigned to Buttons #1 - #4 on the RumblePad. In the same manner that was done for the
“Lean” functions above, create building blocks for Buttons #1 - #4. Next, create a Single Key building block below each of
the Button building blocks. Then, configure each Single Key building block with the keyboard key that corresponds to its
function.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 11 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
The “Move Left” and “Move Right” buttons need to be setup so that they do not perform their function when the “Lean”
functions on those buttons are being used. Therefore, select building block for Button #1. In the Inspector window, change the
popup menu next to “Alpha” to “OFF”. After this change is made, this Button block for Button #1 will not turn ON unless
both the RumblePad’s Button #1 is pressed and the Alpha modifier is turned OFF.
After the building blocks’ modifier settings are changed, notice that the indicator on the left end of the building blocks
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 12 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
changed from black to green. As described above, this indicates that these building blocks can turn ON when the Alpha
modifier is OFF. When the Alpha modifier turns ON, the indicators on these building blocks will change to red and these
blocks will not be able to turn ON.
The “View” functions will be assigned to the hatswitch on the RumblePad. Select the “View” page in the Editor window and
drag two RumblePad Hatswitch building blocks from the Palette window to the View page.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 13 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
By moving the hatswtich around and observing the values that are shown on the building blocks, we find that the hatswitch
uses the following values:
Hatswitches on other devices may use different values. It is not uncommon to find a hatswitch that uses “0” as its center value
and 1-8 to indicate various directions.
To simulate the keypad keys, Single Key building blocks will be used in the same manner that they were used for the Lean
and Move functions. Single Key building blocks cannot be directly connected to Hatswitch blocks — Single Key blocks
require an ON/OFF value but the Hatswtich provides a Number value. The Value Selector building block is used to convert
the Number value to an ON/OFF value.
In the Inspector window, select “Calculations” from the popup menu. The “Value Selector” building block is toward the
bottom of the list of “Calculations” building blocks. Drag four Value Selector building blocks to the workspace portion of the
Editor window, drop two below each of the two Hatswitch building blocks.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 14 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Connect the Value Selector building blocks to the Hatswitch building blocks by dragging the output value from each
Hatswitch to each of the two Value Selector blocks below it.
When all four are connected, the Editor window should appear as below.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 15 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Next, the four Value Selector blocks need to be configured. One will be configured for each of the four view directions:
forward, left, right, and backward. We will configure to top-left Value Selector to look forward. From the experiment earlier,
we found that the hatswitch has a value of “0” when pushed up. We also want to take advantage of the hatswitch’s corner
values, so we will also use “7” and “1” to look forward.
Select the top-left Value Selector. In the Inspector window, check the boxes next to “0”, “1”, and “7”.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 16 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Now, when the hatswitch is pushed up, the top-left Value Selector will turn ON.
Next, we setup the remaining three Value Selectors with the values for each of the other three hatswitch directions. Notice that
the hatswitch corner values each appear in two different Value Selector blocks.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 17 of 18
ControllerMate Example :: A Detailed Tutorial 4/29/11 6:13 PM
Finally, using the same procedure that was used for the Lean and Move functions above, add a Single Key block to each of
the Value Selector blocks. Configure the Single Key blocks for the forward/left/right/backward view keypad keys.
Now, when the hatswitch is pushed in a particular direction, the corresponding keypad number will appear in the Output
window. When using the corner hatswitch positions, the corresponding number may or may not appear in the Output window.
This is a limitation of the simple text box in the Output window. To get a more accurate look at the keys that ControllerMate
is simulating, open Apple’s Keyboard Viewer to see exactly which keys are being pressed.
http://www.orderedbytes.com/controllermate/help/?show=tutorial Page 18 of 18
OrderedBytes :: ControllerMate Programming
Building blocks and controller configurations allow you to customize the behavior of
your devices in an endless variety of ways.
AppleScript building blocks run AppleScripts. Some AppleScript blocks use the value
that is created by the AppleScript to pass to other building blocks.
When building blocks are created, they are placed on pages. A page can
contain any number of building blocks and can either beenabled or
disabled. When a page is disabled, none of its building blocks are active. In order to
keep things organized, it is sometimes helpful to divide the building blocks among
different pages. By doing this, at any given time certain groups of building blocks may
be active while others are inactive.
Pages and Groups are used for organizing building blocks. When the “Programming”
button is selected in the Editor window, the Directory panel will show the current
collection of groups and pages. When a group or page is selected, the Editor window’s
workspace will display the contents of the selected item.
Pages
Pages are the primary means for organizing building blocks. A single page may
contain any number of buidling blocks. However, if the number of building blocks
grows large, it may be more convenient to distribute them among different pages.
A Page is created by clicking the button below the Directory panel in the Editor
window.
When one page is selected in the Directory panel, its contents will be shown in the
workspace.
Groups
Groups are used to organize pages (and other groups). A group may contain any
number of pages or other groups.
A Group is created by clicking the button below the Directory panel in the Editor
window.
To change the application requirements of a group, change the popup menu based on
the desired behavior:
If application requirements have been added to a group, then the contents of the
group may not be active when running ControllerMate. Instead of requiring
ControllerMate to be added to all groups that have application requirements, a group
may be temporarily activated by clicking on the Debug icon ( ) immediately to the
right of the Group’s enable checkbox in the Directory panel. When the Debug icon is
turned on, the Group’s application requirements will be temporarily ignored.