Continue documentation of key binds
authorWuzzy
Tue, 24 Nov 2015 19:14:52 +0000
changeset 672 11a785201118
parent 671 f99b16de1060
child 673 88dbc26b8edf
Continue documentation of key binds
ConfigurationFiles.wiki
--- a/ConfigurationFiles.wiki	Tue Nov 24 17:58:01 2015 +0000
+++ b/ConfigurationFiles.wiki	Tue Nov 24 19:14:52 2015 +0000
@@ -73,6 +73,150 @@
 || *Setting* || *Type* || *Description* ||
 || Default=93919...11101 || Integer || Which weapons are allowed in the default mode ||
 
+= `settings.ini` =
+Various Hedgewars settings.
+
+== `[Binds]` ==
+This section defines the global key bindings. They can be overwritten by teams.
+
+Each key binding is written in the form `action=keycode`, e.g. “`ammomenu=b`” for opening the ammo menu with the B key.
+
+=== Actions ===
+|| *Setting* || *Description* ||
+|| %2Bup || Up ||
+|| %2Bleft || Left ||
+|| %2Bright || Right ||
+|| %2Bdown || Down ||
+|| %2Bprecise || Precise ||
+|| ljump || Long jump ||
+|| hjump || High jump ||
+|| switch || Switch hog ||
+|| ammomenu || Ammo menu ||
+|| slot%201 || Slot 1 ||
+|| slot%202 || Slot 2 ||
+|| slot%203 || Slot 3 ||
+|| slot%204 || Slot 4 ||
+|| slot%205 || Slot 5 ||
+|| slot%206 || Slot 6 ||
+|| slot%207 || Slot 7 ||
+|| slot%208 || Slot 8 ||
+|| slot%209 || Slot 9 ||
+|| slot%20%3A || Slot 10 ||
+|| timer%201 || Timer: 1 second ||
+|| timer%202 || Timer: 2 seconds ||
+|| timer%203 || Timer: 3 seconds ||
+|| timer%204 || Timer: 4 seconds ||
+|| timer%205 || Timer: 5 seconds ||
+|| %2Battack || Attack ||
+|| put || Place hedgehog or select target ||
+|| findhh || Automatic camera / find hedgehog ||
+|| %2Bcur_u || Move camera or cursor up ||
+|| %2Bcur_l || Move camera or cursor left ||
+|| %2Bcur_r || Move camera or cursor right ||
+|| %2Bcur_d || Move camera or cursor down ||
+|| zoomin || Zoom in ||
+|| zoomout || Zoom out ||
+|| zoomreset || Reset zoom ||
+|| chat || Open chat input ||
+|| history || Toggle chat history ||
+|| pause || Toggle pause ||
+|| quit || Quit ||
+|| confirm || Confirm ||
+|| %2Bvoldown || Raise volume ||
+|| %2Bvolup || Lower volume ||
+|| mute || Mute ||
+|| fullscr || Toggle window mode (window/fullscreen) ||
+|| capture || Take screenshot ||
+|| %2Bspeedup || Increase demo replay speed ||
+|| rotmask || Cycle tags above hedgehogs ||
+|| record || Record video ||
+
+=== Key codes ===
+==== Keyboard ====
+Keyboard names are based on the [https://wiki.libsdl.org/SDL_Scancode SDL scancode].
+
+The key name is constructed as follows:
+
+* Take the name from the “Key Name” column of the aforementioned webpage
+* Convert it to lower-case
+* Replace spaces with underscores
+
+Examples:
+
+|| *Code* || Description ||
+|| `a` || A ||
+|| `f1` || F1 ||
+|| `shift_left` || Left shift key ||
+|| `space` || Space bar ||
+|| `tab` || Tabulator ||
+
+
+==== Mouse ====
+The codes for the mouse are as follows:
+
+|| *Code* || Description ||
+|| `mousel` || Left mouse button ||
+|| `mousem` || Middle mouse button ||
+|| `mouser` || Right mouse button ||
+|| `wheelup` || Mouse wheel up ||
+|| `wheeldown` || Mouse wheel down ||
+
+==== Controller/Gamepad/Joystick ====
+Controllers, gamepads and joysticks are written in a somewhat cryptic syntax.
+
+===== Buttons =====
+
+Syntax: `jJbB`
+
+* `J`: Controller ID beginning with 0
+* `A`: Button ID beginning with 0
+
+Examples:
+|| *Code* || Description ||
+|| `j0b0` || First controller, first button ||
+|| `j0b1` || First controller, second button ||
+|| `j1b2` || Second controller, third button ||
+
+===== Axis =====
+
+Syntax: `jJaAD`
+
+* `J`: Controller ID beginning with 0
+* `A`: Axis 
+* `D`: Axis direction. One of the following letters:
+    * `u`: positive (“up”)
+    * `d`: negative (“down”)
+
+Examples:
+
+|| *Code* || Description ||
+|| `j0a0u` || First controller, first axis up ||
+|| `j0a1d` || First controller, second axis down ||
+|| `j1a1d` || Second controller, second axis down ||
+
+===== Hat/D-pad =====
+
+Syntax: `jJhHD`
+
+* `J`: Controller ID beginning with 0
+* `A`: D-pad ID 
+* `D`: Direction, it is one of 4 letters:
+    * `u`: up
+    * `r`: right
+    * `d`: down
+    * `l`: left
+
+
+Examples:
+|| *Code* || Description ||
+|| `j0h0u` || First controller, first D-pad up ||
+|| `j0h1l` || First controller, second D-pad left ||
+|| `j1h1r` || Second controller, second D-pad right ||
+
+== (other sections)
+
+_To be written …_
+
 = `schemes.ini` =
 
 == {{{[schemes]}}} ==
@@ -153,56 +297,9 @@
 || Suicides=0 || Integer || Suicides comitted by hog _(Currently unused)_ ||
 
 == {{{[Binds]}}} ==
-_Key bindings of the team._
+Key bindings of the team. Teams can optionally overwrite the global key bindings or leave everything at default.
 
-|| *Setting* || *Description* ||
-|| %2Bup || Up ||
-|| %2Bleft || Left ||
-|| %2Bright || Right ||
-|| %2Bdown || Down ||
-|| %2Bprecise || Precise ||
-|| ljump || Long jump ||
-|| hjump || High jump ||
-|| switch || Switch hog ||
-|| ammomenu || Ammo menu ||
-|| slot%201 || Slot 1 ||
-|| slot%202 || Slot 2 ||
-|| slot%203 || Slot 3 ||
-|| slot%204 || Slot 4 ||
-|| slot%205 || Slot 5 ||
-|| slot%206 || Slot 6 ||
-|| slot%207 || Slot 7 ||
-|| slot%208 || Slot 8 ||
-|| slot%209 || Slot 9 ||
-|| slot%20%3A || Slot 10 ||
-|| timer%201 || Timer: 1 second ||
-|| timer%202 || Timer: 2 seconds ||
-|| timer%203 || Timer: 3 seconds ||
-|| timer%204 || Timer: 4 seconds ||
-|| timer%205 || Timer: 5 seconds ||
-|| %2Battack || Attack ||
-|| put || Place hedgehog or select target ||
-|| findhh || Automatic camera / find hedgehog ||
-|| %2Bcur_u || Move camera or cursor up ||
-|| %2Bcur_l || Move camera or cursor left ||
-|| %2Bcur_r || Move camera or cursor right ||
-|| %2Bcur_d || Move camera or cursor down ||
-|| zoomin || Zoom in ||
-|| zoomout || Zoom out ||
-|| zoomreset || Reset zoom ||
-|| chat || Open chat input ||
-|| history || Toggle chat history ||
-|| pause || Toggle pause ||
-|| quit || Quit ||
-|| confirm || Confirm ||
-|| %2Bvoldown || Raise volume ||
-|| %2Bvolup || Lower volume ||
-|| mute || Mute ||
-|| fullscr || Toggle window mode (window/fullscreen) ||
-|| capture || Take screenshot ||
-|| %2Bspeedup || Increase demo replay speed ||
-|| rotmask || Cycle tags above hedgehogs ||
-|| record || Record video ||
+This section follows the same format as in `settings.ini`, with one addition: The key code `default` is used for using the default (global) key binding.
 
 === Values ===
 The special value “`default`” is for the default keybinding as specified in the game preferences.