User Guide
Quick Reference
Modding
Development
User Guide
Quick Reference
Modding
Development
Obsolete|See [[bindings]] for the current behavior.
doomsday uses the concept of event bindings to allow player input controls to be configured freely, to the user's control preferences. The same scheme is used whether you are using keyboard, mouse, joystick or any other (or combination) of input devices.
Events are really “device input events” which Doomsday can respond to. Examples would be a key down event on a keyboard, a mouse wheel scroll event, a joystick trigger down event etc.
Events can be bound to console commands (and aliases) or to special “game actions”.
Binding Classes were introduced in Doomsday1.9.0-beta3 to allow multiple commands/controls to be bound to one input device event. More on those latter in this article.
Binding events to commands/controls is done through the use of various console commands.
Most games that run under Doomsday also offer a graphical interface for configuring the in-game controls. It is recommended that new or novice users should use this interface instead of setting up the controls “manually” via the console.
Here follows a list of the console commands you'll use when setting up event bindings (click the links for information on how to use each command):
Binding classes allow multiple commands/controls to be bound to one event. This is achieved by allowing multiple bindings per event but only one binding per class. Therefore the command/control that is executed when the input event occurs depends on which binding classes are currently active.
Each game that runs under Doomsday will register any binding classes it plans to use on startup, in addition to those created by Doomsday (see the documentation for the game for details of the binding classes it uses).
Currently Doomsday automatically uses the following binding classes for all games:
Any time you must specify a binding class (eg when using the “bind” console command to create a new event binding) you have the option of omitting it, by doing so Doomsday will assume you are referring to the default binding class (“game”).
So for example, to create an event binding which creates a new bias light source when you press F5 you would use the following command:
bind biaseditor +F5 blnew
Notice that the bind class “biaseditor” is specified in the event binding. This means that pressing F5 to create a new bias light source will ONLY work when the “biaseditor” binding class is active.
Normally this is something you don't need to think about as a user.
Typically, it is the game's responsibilty to manage the state of binding classes. For example, if the game creates a binding class for an in-game map (such as the automap in jDoom) it follows that the game will make sure this binding class is only active when required.
However, if you are using the additional binding classes for custom functionality* you will need to manage the custom binding classes manually, via use of the enablebindclass console command (which in turn can be bound to other controls or aliases.
Normally this is something you don't need to think about as a user.
Typically, it is the responsibility of the game to make sure it registers the binding classes it uses in an appropriate order.
Binding classes are arranged into a stack internally by the engine. The binding command/control that is chosen for an input event is ALWAYS that of the binding class which is nearest to the top of the stack, which is both active AND has a binding for the event being processed.
For example, player presses the '1' key on their keyboard: If both of the built-in binding classes “game” and “biaseditor” are active and both have bindings for this class eg:
bind game +1 +weapon1 // Would change to weapon 1 when pressing '1' bind biaseditor +1 blhide // Would hide the bias editor HUD when pressing '1'
The only time that pressing the '1' key would hide the bias editor HUD would be when the “biaseditor” binding class is active. This is because the “biaseditor” binding class is above “game” in the binding class stack.
<references/>