In the Unreal Tournament key bindings (type PREFERENCES to bring up Advanced Options / Advanced / Raw Key Bindings), you can associate console commands and other special input commands with key presses and releases. In the text box next to a key name, you can type in one or more console commands, separated by the "|" character. For example, to bind the "S" key to the "Jump" alias, type this:
Jump
That causes the "Jump" alias to be executed when th user presses the "S" key. For another example, if you want to bind a chat message to a key, use this:
Say "Come get some!"
In addition, you can bind multiple actions to a keypress like this, to make the "S" key both jump and say a message.
Jump | Say "Come get some!"
You can also bind an action to the release of a key by using the OnRelease keyword. For example, you can make the "S" key fire when it's released:
OnRelease Fire
Or you can make the key jump when pressed, and fire when released:
Jump | OnRelease Fire
Keys can be bound to any of the following kinds of things:
Any console command in the above lists.
Any key alias (explained below).
Any special input command.
"Special input command" refers to console commands which only make sense in conjunction with the press or release of a key, or the movement of the mouse or joystick along an axis. The special input commands are:
BUTTON <UnrealScript boolean variable name>, for example "BUTTON bFire": Maps a button to an UnrealScript variable stored in the Pawn class or any subclass. This tells the input system to automatically set the variable to True when the key is held down, and False when it's not pressed. For example, the Pawn script looks at bFire to tell whether the fire button is being held. The setting of bFire is not some hardcoded behavior of the engine, rather it is propagated into UnrealScript code by the input system, as a result of binding a key to "BUTTON bFire".
TOGGLE <UnrealScript boolean variable name>, for example "TOGGLE bLook": Like the BUTTON command, but simply tells the input system to toggle the boolean variable's value when the key is pressed.
AXIS <UnrealScript floating point variable name> <SPEED=some number>, for example "Axis aStrafe Speed=-300.0". Maps an analog input axis movement to an UnrealScript variable, scaling it by some factor. The current axis keys listed in the Advanced Options menu are: MouseX, MouseY, MouseW (Intellimouse wheel), JoyX, JoyY, JoyZ, JoyR (joystick rudder), JoyU, JoyV (joystick alternate axis for example the Panther XL trackball). Supported PlayerPawn axes are aBaseX, aBaseY (base movements which are translated to rotating, strafing, looking, and forward movement based on context), aMouseX, aMouseY, aForward, aTurn, aStrafe, aUp (not used), aLookUp, aExtra0-aExtra4 (not used). To see how the game code processes movement, see the PlayerPawn class's PlayerInput and PlayerTick functions.
In addition to the Advance Options menu, you can also bind keys from the console using the following command:
SET INPUT <keyname> <binding>
For example:
SET INPUT X Fire
SET INPUT Enter Fire