Changes

Jump to navigation Jump to search

Key bindings

335 bytes added, 07:16, 1 March 2011
→‎Key binds: Added examples how to use key bindings
Key binds allow quick "hotkey" access to common [[command]]s and [[action]]s. The bind command requires special values as input.
bind <key> <action> bind <key> <[[Console#Commands|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 [http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyEvent.html the full KeyEvent list]. Meta keys can also be specified, e.g. <tt>shift-tab</tt> or <tt>ctrl-alt-w</tt>. 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.)
 
'''<action>''' is a bindable action as listed in the table below.
 
bind M MINE_FORWARD
 
'''<console command>''' can be any console command. If the command contains spaces the command has to be in quotes.
 
bind F2 "toggle inventory"
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 <tt>TAKE</tt> 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.
<tr valign=top><td width=50%>
{| cellpadding=2 cellspacing=4 class=sortable
|+ Bindable actions
!Bind !!Category !!Notes
|-
editor
1,247

edits

Navigation menu