Module ...

Handles key binds to "virtual" actions

Functions

_M:addBind (virtual, fct, sym, mods) Adds a key/command combinaison
_M:addBinds (t, sym, mods, fct) Adds a key/command combinaison
_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:saveRemap (file) Saves a keybinds remap


Functions

_M:addBind (virtual, fct, sym, mods)
Adds a key/command combinaison

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 combinaison

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:saveRemap (file)
Saves a keybinds remap

Parameters

  • file:

Valid XHTML 1.0!