Key bindings

From Wurmpedia
Revision as of 11:25, 21 June 2013 by GiuseppeP (talk | contribs) (→‎Table: added toggle_character to toggle paperdoll)
Jump to navigation Jump to search

Main Page / Key bindings

Introduction

Key bindings are defined in the keybindings.txt file, which is automatically updated if you rebind keys while playing. Binds in autorun.txt will be executed on startup and these will overwrite any in keybindings.txt. These files can be found in the Wurm game directory under configs. e.g. C:\Games\Wurm\configs\default

Additionally, key binds can be combined with the Exec console command to enable a player to perform a wide range of tasks with only a few keys, swapping keybinds on the fly. See quickswitch hotkeys for more information and examples.

To access the console, press F1 (by default). You can also press ESC and then click on "Console."

Key binds

Key binds allow quick "hotkey" access to common commands and actions. The bind command requires special values as input.

bind <key> <action>
bind <key> "<console command>"

<key> is based on Java key constants. Letters and numbers represent themselves. For other keys, if you can't guess the correct name search the full KeyEvent list. Meta keys can also be specified, e.g. shift-tab or ctrl-alt-w. Available meta keys are Ctrl, Shift, and Alt. The Alt Gr key is treated as Alt (if your keyboard has one). The non-meta key must always be the last key in the combination. It is not possible to bind only meta keys.

(The numpad keys can be tricky, as they duplicate other keys on the main keyboard. They are: numpad[0-9], add, subtract, multiply, divide and decimal.)

It is also possible to bind an action to the middle mouse button, Mouse2.

NB: It's reported that mouse3 and mouse4 work for the "forward/back" buttons on a 5 button mouse.

<action> is a bindable action as listed in the table below.

bind M MINE_FORWARD

<console command> can be any console command. The console command has to be in quotes.

bind F2 "toggle inventory"

To see the current key bind you can issue the command with only the key name

bind <key>

To remove a key bind assign an empty command

bind <key> ""

You can bind keys to say things, in local chat and in other available chats.

bind <key> "say guards!"
bind <key> "say /shout Hello kingdom people!"
bind <key> "say /vil Hello village people!"
bind <key> "say /t <name> Enemies in local run awayyyy!"

You may also choose to change certain chat-function-based bindings like /sleep to different keys

bind <key> "say /sleep"

You can view a list of most "say" bindings by saying /help in game.

To list all key binds use the console command

dump binds

Keys bound to actions are sensitive to the mouse cursor's hover location/position and object highlight. So, if the cursor is hovering over an item in an inventory or highlighting an item on the ground (or a tile itself for other binds), and the TAKE bind key is pressed, that item will be taken. It is not necessary to left-click the mouse button in order to select an item first either; just hovering the mouse over something will allow the key bind to affect it.

Table

This table lists actions only. For commands check the console and chat commands pages.

Bindable actions
Bind Category Notes
CENTER_VIEW Camera
GLANCE_LEFT Camera
GLANCE_RIGHT Camera
TURN_DOWN Camera
TURN_UP Camera
AUTORUN Player movement
TURN_LEFT Player movement
TURN_RIGHT Player movement
MOVE_FORWARD Player movement
MOVE_BACK Player movement
MOVE_LEFT Player movement
MOVE_RIGHT Player movement
STRAFE Player movement
CLIMB_UP Player movement For ladders in multi-floor houses
CLIMB_DOWN Player movement For ladders in multi-floor houses
FIGHT_DEFENSIVE Fighting
FIGHT_NORMAL Fighting
FIGHT_AGGRESSIVELY Fighting
NO_TARGET Fighting
TARGET Fighting
AIM_LOWER_LEFT Fighting
AIM_LOWER_MIDDLE Fighting
AIM_LOWER_RIGHT Fighting
AIM_LEFT Fighting
AIM_MIDDLE Fighting
AIM_RIGHT Fighting
AIM_UPPER_LEFT Fighting
AIM_UPPER_MIDDLE Fighting
AIM_UPPER_RIGHT Fighting
FOCUS Fighting
SHIELD_BASH Fighting
DEFEND_LEFT Fighting
DEFEND_UPPER Fighting
DEFEND_LOWER Fighting
DEFEND_RIGHT Fighting
special_move1 Fighting
special_move2 Fighting
special_move3 Fighting
special_move4 Fighting
special_move5 Fighting
NEXT_TAB Interface
PREVIOUS_TAB Interface
NEXT_WINDOW Interface
PREVIOUS_WINDOW Interface
TOGGLE_CHAT Interface
TOGGLE_CHARACTER Interface
TOGGLE_CHARACTER_WINDOW Interface
TOGGLE_CLIMB Climbing
TOGGLE_FAITHFUL Religion
TOGGLE_LAWFUL Morality
ACTIVATE_TOOL1 Toolbelt
ACTIVATE_TOOL2 Toolbelt
ACTIVATE_TOOL3 Toolbelt
ACTIVATE_TOOL4 Toolbelt
ACTIVATE_TOOL5 Toolbelt
ACTIVATE_TOOL6 Toolbelt
ACTIVATE_TOOL7 Toolbelt
ACTIVATE_TOOL8 Toolbelt
ACTIVATE_TOOL9 Toolbelt
ACTIVATE_TOOL10 Toolbelt
TOGGLE_FIGHT_SPAM Spam mode
DRAG Item movement
STOP_DRAGGING Item movement
PUSH Item movement
TURN_CLOCKWISE Item movement
TURN_COUNTERCLOCKWISE Item movement
PULL Item movement
EXAMINE Item manipulation
ACTIVATE Item manipulation
TAKE Item manipulation
DROP Item manipulation This also pours liquids.
COMBINE Item manipulation
REPAIR Item manipulation
IMPROVE Item manipulation Used when 'imping' items. Activate relevant tool, then use this command.
FINISH Item manipulation Used when finishing 'unfinished' hammers, spindles, minedoors, etc. Activate relevant tool, then use this command.
CONTINUE Item manipulation Used when attaching additional items to i.e. unfinished bsb's, ships, etc. Activate the needed item, then use this command. Does not work with house walls or fences where the item to be attached isn't activated.
DIG Digging
DREDGE Digging
FLATTEN Digging
LEVEL Digging
PACK Digging
CULTIVATE Digging
BURY Digging
SOW Farming
HARVEST Farming Also works for cutting grass, reed, and kelp
FARM Farming
MINE_FORWARD Mining Also works for MINE_SURFACE
MINE_UP Mining
MINE_DOWN Mining
MINE_SURFACE Mining
MINE_TUNNEL Mining
PROSPECT Mining
PICK_SPROUT Forestry This also works for PICK_FLOWERS
PRUNE Forestry
CUT_DOWN Woodcutting
CHOP_UP Woodcutting
TAME Animal taming
LEAD Animals
STOP_LEADING Animals
FEED Animals
ABSORB Mycelium
BREED Animal husbandry
GROOM Animal husbandry
FORAGE Foraging also works for Rummaging on rock tiles
FORAGE_VEG Foraging foraging filter for vegetables
FORAGE_RESOURCE Foraging foraging filter for resource items
FORAGE_BERRIES Foraging foraging filter for berries
BOTANIZE Botanizing
BOTANIZE_SEEDS Botanizing botanizing filter for seeds
BOTANIZE_HERBS Botanizing botanizing filter for herbs
BOTANIZE_RESOURCE Botanizing botanizing filter for resource items
PICK_FLOWERS Gardening This also works for PICK_SPROUT
FISH Fishing
TRACK Tracking
OPEN Container
CLOSE Container
STOP_OR_MAIN_MENU Actions
STOP Actions Much more effective at stopping certain actions than STOP_OR_MAIN_MENU
MAIN_MENU Actions
PRAY Praying


A note specifically about the in-game wiki. This command is bound by default to the H key. If you've managed to unbind it, you can put it back by using the bind command in your console with "toggle wikisearch" as your bound action. So if you wanted to bind

H to the wiki search, you would open your console and type in exactly as below:

bind h "toggle wikisearch"

Key names

In case you want to bind more keys than the regular keys

-->
<key> Name standard german keyboard
slash / #
apostrophe ' ä
period . .
semicolon ; ü
equals = *
comma , ,
minus - -
plus + ; (or numpad +)
grave ` ö
RBRACKET ] ´
LBRACKET [ ß
backslash \ ^
decimal (numpad) , (numpad) ,
divide (numpad) / (numpad) /
multiply (numpad) * (numpad) *
mouse2
at @
colon :
circumflex ^


Examples

For examples of how key bindings can help you, see quickswitch hotkeys and this forum thread.

Additional autorun.txt uses

autorun.txt can be used in several other useful ways.

The following opens windows when the client loads:

toggle skills
toggle inventory
toggle stats

This stops kingdom chat from loading when the game starts, but sometimes someone gets in a message before it takes effect. Placing it at the top of the file may help.

say /kchat

You could add this to know how much sleep bonus you have when you log in. This works best at the bottom of the file.

say /sleep

You could add this to know how long the server has been up. This works best at the bottom of the file.

say /uptime

Defaults

If you want to reset your key bindings to their default state simply delete the keybindings file. A new one will be created with the default values.