Difference between revisions of "cock.getBinded"
(Created page with "Returns input devices binded to the map on the corresponding option. == Function == === Synopsis === <source lang="Lua">device, key, inverse, delta, joystick = cock.getBinded ( s...") |
m (→Returns) |
||
Line 24: | Line 24: | ||
Table is generated as following: | Table is generated as following: | ||
<source lang="Lua">table = { | <source lang="Lua">table = { | ||
− | + | option = { "primary", "secondary", "etc."... }, | |
− | + | device = { 1, 2, 3... }, | |
− | + | key = { "x", 1, 5... }, | |
− | + | inverse = { 2, 1, -2... }, | |
− | + | delta = { 0, 1, -1... }, | |
− | + | joystick = { 1, 1, 3 } | |
}</source> | }</source> | ||
First sub-table contains option names in arbitrary order. Values in all other tables correspond to the options in the first table. | First sub-table contains option names in arbitrary order. Values in all other tables correspond to the options in the first table. | ||
+ | |||
==See also== | ==See also== | ||
*[[cock.bind]] | *[[cock.bind]] |
Latest revision as of 16:37, 2 September 2013
Returns input devices binded to the map on the corresponding option.
Contents
Function
Synopsis
device, key, inverse, delta, joystick = cock.getBinded ( self, map, option )
Arguments
table self
- An object to use.
string map
- Control map to look up.
string option
- Optional. Map option to look up bindings in. Will revert to defaultOption if not provided.
Returns
number device
- Input device number.
number key
- Input key value. May be a string, depending on the input device.
number inverse
- Inverse mode number.
number delta
- Delta mode number.
number joystick
- Internal joystick number. Will be 1 for non-joystick devices.
Function
Synopsis
table = cock.getBinded ( self, map, all )
Arguments
table self
- An object to use.
string map
- Control map to look up.
boolean all
- Value "true" will return a table with bindings on all options for the map.
Returns
table table
- List of all binded controls for the map.
Table is generated as following:
table = {
option = { "primary", "secondary", "etc."... },
device = { 1, 2, 3... },
key = { "x", 1, 5... },
inverse = { 2, 1, -2... },
delta = { 0, 1, -1... },
joystick = { 1, 1, 3 }
}
First sub-table contains option names in arbitrary order. Values in all other tables correspond to the options in the first table.
See also
- cock.bind
- Common Organization of Controls Kit Input devices
- Common Organization of Controls Kit Input keys
- Common Organization of Controls Kit Modes
- Common Organization of Controls Kit Manual
- Common Organization of Controls Kit