Module ...
Handles key binds to "virtual" actions
Functions
| _M:addBind (virtual, fct, sym, mods) | Adds a key/command combination | 
| _M:addBinds (t, sym, mods, fct) | Adds a key/command combination | 
| _M:bindKeys () | Binds all virtuals to keys, either defaults or remapped ones | 
| _M:getBindTable (type) | Returns the binding table for the given type | 
| _M:load (str, a) | Loads a list of keybind definitions Keybind definitions are in /data/keybinds/. | 
| _M:loadRemap (file) | Loads a keybinds remap | 
| _M:removeBind (virtual) | Removes a key/command combination | 
| _M:reset () | Reset all binds | 
| _M:saveRemap (file) | Saves a keybinds remap | 
| _M:triggerVirtual (virtual) | Force a key to trigger | 
| _M:unicodeInput (v) | Allow receiving unicode events | 
Functions
- _M:addBind (virtual, fct, sym, mods)
- 
Adds a key/command combination
Parameters- virtual:
- fct: the function to call when the key is pressed
- sym: the key to handle
- mods: a table with the mod keys needed, i.e: {"ctrl", "alt"}
 
- _M:addBinds (t, sym, mods, fct)
- 
Adds a key/command combination
Parameters- t:
- sym: the key to handle
- mods: a table with the mod keys needed, i.e: {"ctrl", "alt"}
- fct: the function to call when the key is pressed
 
- _M:bindKeys ()
- Binds all virtuals to keys, either defaults or remapped ones
- _M:getBindTable (type)
- 
Returns the binding table for the given type
Parameters- type:
 
- _M:load (str, a)
- 
Loads a list of keybind definitions Keybind definitions are in /data/keybinds/. Modules can define new ones.
Parameters- str:
- a: string representing the keybind, separated by commas. I.e: "move,hotkeys,actions,inventory"
 
- _M:loadRemap (file)
- 
Loads a keybinds remap
Parameters- file:
 
- _M:removeBind (virtual)
- 
Removes a key/command combination
Parameters- virtual:
 
- _M:reset ()
- Reset all binds
- _M:saveRemap (file)
- 
Saves a keybinds remap
Parameters- file:
 
- _M:triggerVirtual (virtual)
- 
Force a key to trigger
Parameters- virtual:
 
- _M:unicodeInput (v)
- 
Allow receiving unicode events
Parameters- v: