Sunteți pe pagina 1din 29

ControllerMate :: Editor Window

ControllerMate Windows — Editor

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:

Make keyboard keys behave like other keyboard keys


Make mouse buttons behave like other mouse buttons
Assign a custom acceleration curve to a mouse
Disable the cursor and/or scroll wheel axes on a mouse

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).

In the image above, the block on the


left has an input which accepts an
ON/OFF value. The block on the right
has an input which accepts a number
value. Note the difference in shape
between the two types of inputs.

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.

When the value of a building block


changes, it sends that new value to
to any blocks attached to its output.
Those blocks may perform some
function, perform a calculation, or
combine the new value with other values to determine their own values. If their
values change, they will pass the new value on to any blocks that are attached to their
outputs.

The output of a building block may be attached to multiple other building blocks
simply by dragging the output to an unconnected input.

The following is an example of a very


basic use of building blocks:

The top block


represents
Button #7 on a
CH Pro Throttle USB joystick. The bottom block simulates typing using
ControllerMate’s internal keyboard. When Button #7 is pressed on the joystick, the
value of the top block will change from “OFF” to “ON”. When the top block turns ON,
it will cause the bottom block to turn ON. Turning on the bottom block will cause it to
type “Hello” using ControllerMate’s internal keyboard. Therefore, each time this
particular joystick button is pressed, “Hello” will appear just as though it had been
typed on a keyboard.

The following is an example of a slightly more complex use of building blocks:

In addition to typing “Hello” as in the previous example, this


example will play the current system alert sound. By
connecting several building blocks together, you can add
complex functions to your HID controllers.

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

Home News ControllerMate Support Forum Home


Introduction
New Features
Screenshots
Programming
Help / Examples
Compatibility
Download / Purchase

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.

Key Function Controller


W — Move Forward — Button #4
A — Move Left — Button #1
D — Move Right — Button #3
S — Move Backward— Button #2
Q — Lean Left — Alpha + Button #1
E — Lean Right — Alpha + Button #3
Keypad 8— Look Forward — Hatswitch (up)
Keypad 4— Look Left — Hatswitch (left)
Keypad 6— Look Right — Hatswitch (right)
Keypad 2— Look Backward — Hatswitch (down)
Shift — Button #6

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”.

The “Alpha” Modifier

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.

The “Lean” Buttons

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

Make the same change for the Button #3 building block.

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.

Now, the “Lean” functions are complete.

The “Move” Buttons

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.

Make the same change for the Button #3 building block.

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.

Now the “Move” functions are complete.

The “View” Hatswitch

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.

Download This Example • About Downloaded Examples


Copyright © 2005 — 2011 OrderedBytes

All rights reserved.

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.

Introduction to building blocks

ControllerMate’s building blocks represent controls on devices


and the actions that those controls can perform. There are building blocks that
simulate keyboard actions, simulate mouse actions, run AppleScripts, perform logic,
perform calculations, perform timing actions, and others. After each building block
performs its particular action, it may create a value which can be used to trigger other
blocks. By linking together several building blocks of different types, complex
sequences of actions can be constructed.

Source building blocks

Source building blocks represent controls on devices. Most


source blocks represent individual controls, Button Group
building blocks represent an arbitrary set of buttons. A building block which
represents a button (or set of buttons) creates an ON/OFF value depending upon the
current state of the button(s). Building blocks which represent axes, sliders, dials,
hatswitches, etc. create a Number value which indicates the position or movement of
the control.

Output building blocks

Output building blocks simulate keyboard or mouse actions.


These are the building blocks which generate events that can
be used by other applications while ControllerMate is in the background. Most output
building blocks can be configured to perform different actions when they are turned
on and when they are turned off.

AppleScript building blocks

AppleScript building blocks run AppleScripts. Some AppleScript blocks use the value
that is created by the AppleScript to pass to other building blocks.

Logic building blocks


Logic building blocks combine ON/OFF values in various
ways. Standard combinational logic functions such as AND,
OR, NOT, and XOR are available. Other building blocks perform higher-level logic
functions such as toggles and latches.

Math building blocks

Math building blocks combine or generate Number values.


Some math building blocks convert ON/OFF values into
Number values; some convert Number values into ON/OFF values; and others
modify Number values into other Number values.

Timing building blocks

Timing building blocks create time delays or perform an action


based on the time between events. The Delay, Dwell, and
Pulse blocks are used to insert time delays in different circumstances. The Auto-
Repeater block creates automatically repeating events. The Pulse Count block is used
to detect events such as double-clicks and triple-clicks.

Organizing building blocks on Pages

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.

Organizing Pages in Groups

In addition to organizing building blocks into different pages, pages may


be split up into different groups. A group may contain pages or other
groups and may be enabled or disabled. When a group is disabled, none of the
building blocks on its pages are active. A group may also be given certain application
requirements. A group can be configured such that it is active only when certain
applications are running, or if certain applications are not running.
Controller configurations

Controller configurations allow you to change the default behavior of


controls on keyboard and mouse devices. Keyboard keys can be configured
to behave like keys, mouse buttons can be configured to act like different mouse
buttons, and mouse devices can be given custom acceleration curves. Controller
configurations can be individually enabled or disabled. When a controller
configuration is disabled, it has no effect on the operation of the device. Multiple
controller configurations can be created for the same device. By enabling and disabling
controller configurations, the operation of a device can be completely changed very
quickly.
ControllerMate :: Pages & Groups
Pages & Groups

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.

To change the name of a page, select that page then


edit its name in the Inspector window.

There are two ways to change the enabled/disabled


state of a page. If the page is selected, its enabled state
will be shown with a checkbox in the Inspector
window. A page may also be enabled or disabled by
changing the checkbox next to its name in the
Directory panel in the Editor window. When a Page is
disabled, none of its building blocks will produce
keyboard output or affect the cursor.

Some building blocks have an initial value or a default


value. To reset these building blocks back to their
initial values, select the page and use the “Reset
Contents Now” button in the Inspector window. The page may also be configured to
automatically reset its building blocks just before it is enabled, just before it is
disabled, or both.

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.

Groups have three properties that may be edited: its


name, its enabled/disable state, and the applications
which affect when the group’s contents are active.
When a Group is disabled, none of the building blocks
on its Pages will produce keyboard output or affect
the cursor.

To change the name of a group, select that page then


edit its name in the Inspector window.

There are two ways to change the enabled/disabled


state of a group. If the group is selected, its enabled
state will be shown with a checkbox in the Inspector
window. A group may also be enabled or disabled by
changing the checkbox next to its name in the left side
of the Editor window.

To change the application requirements of a group, change the popup menu based on
the desired behavior:

always — the group is always active


if the following are running — the group is active if any of the listed applications
are currently running
if the following are not running — the group is active unless any of the listed
applications are currently running
Then, click the “Add...” button and browse to the desired application. When
application requirements have been added to a Group, its icon in the Directory panel
will change to .

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.

See the example Application-Specific for an example of how application-specific


groups are created.

S-ar putea să vă placă și