In addition to the standard characters, there are several special
characters that can be programmed. These cause the Control Manager to
execute special functions, send mouse messages, etc. This section
covers the special characters and what they do.
Using the special characters is easy. These are treated
like any other named character that you would use in non-DirectX
programming such as "LSHF", "RCTL", etc. They don't actually send
characters when they're encountered but initiate their designated.
The special characters only take action when they're pressed.
They do nothing on release. If you use them in a KEYS macro,
they're always considered to be a press (preceded with a "+")
regardless of what the preceding character is or even if it's
missing entirely. "+CHARDLY", "-CHARDLY" and just plain "CHARDLY"
all result in exactly the same actions when used in a KEYS macro.
Mouse Functions Characters
The first four special characters are used to execute mouse functions.
The "characters" are:
Key Name
Action
LCLICK
Sends a Left Mouse Click
RCLICK
Sends a Right Mouse Click
MCLICK
Sends a Middle Mouse Click
DBLCLICK
Sends a Left Mouse Double-Click
Programming a button to send one of these "characters" initiates
the indicated mouse action Note that this is not the same as assigning
a DX button to a Mouse button. If you do that, you're actually controlling
the mouse button with a joystick button. In the case of the special
characters, you're telling the Control Manager to send the indicated mouse
clicks for you. Once the character is sent, it all happens automatically.
This means that to "drag" with the mouse, you have to implement it as a
DX mouse button. There is no special character that can initiate a held
mouse button. The LCLICK for example presses and immediately releases
the left mouse button regardless of how long the button that's sending
the LCLICK is depressed.
The CHARDLY Character
The next special character that's available is the "CHARDLY" character.
This character really causes nothing visible to happen. What it does
do is to insert a 1 character-time delay between two other
characters. Normally the Control Manager will close as many
characters as it can on any particular scan. Likewise it will release
as many as possible. This is generally the correct thing to do but there
are situations that occur in some games where this doesn't give the
expected result and it's necessary to force a brief delay to let the
game respond.
One of the more common of examples of this is where you need to
use a right-shifted character. You can't just use SHF because
that's a left-shift. The normal solution is to use something like
"HOLD RSHF a", but in some games that doesn't work either because
the "RSHF" and the "a" are sent at exactly the same time. In this case
you need to be able to control the timing a little to be sure
that the RSHF closes before the "a" and that the "a" opens before
the RSHF. Using the CHARDLY function, this can be accomplished
with a KEYS macro:
KEYS +RSHF CHARDLY +a -a CHARDLY -RSHF
This would hold the RSHF across the entire press of the "a" with
one character delays between the time that RSHF was pressed
and the time that "a" was pressed, and then a second delay
between the time that "a" was released and the time that RSHF was
released.
If the game were a little less fussy about the ordering, you might
get by with a standard macro (not KEYS) that looked like this:
HOLD RSHF CHARDLY a
This is not as controlled, though, as the "a" and the RSHF are
still likely to be released at the same time and in some games
that doesn't work correctly.
The DIRMODE Character
The second special character is called "DIRMODE". When sent, this
character causes the Control Manager to switch from Mapped Mode
to Direct Mode. This can be useful by itself, and it's also used
for a full implementation of the ClickStart function
described later.
The DIRMODE character provides a handy way to switch the Control
Manager back into Direct Mode when you're done playing and want
to shut the map down. This is generally desirable since leaving the
mapped active lets the controllers send characters if they're moved,
usually at a very inopportune moment. It shouldn't be "easy" to send
DIRMODE by mistake, though. Generally you'd use CMS scripting to
create a logic statement that required you to hit some awkward
combination of buttons to send the DIRMODE character. On a
FlightStick, for example, you might use buttons 2 and 3 since
they're normally both activated with your thumb and it's difficult
to hit them both simultaneously by accident. In the CMS script, a
simple logic statement:
CMS.B1 = JS1.B2 AND JS1.B3;
would generate the logic. Then, in the GUI you'd program CMS.B1
to send DIRMODE.
DIRMODE can also be useful during debugging. Sometimes
script that aren't working right do odd things, sending the mouse
into the upper left corner, etc. In these cases, it can be
difficult to get control back for the map. If you program a
button to send DIRMODE, it will usually send you back to Direct
Mode in these situations. That's not guaranteed as it's hard to know
what all might go wrong with the script, but it should work most
of the time.