The Keybind module allows you to execute pieces of script when a certain key or mousebutton is pressed.
Overview
Functions
SetKeybind
Creates a keybind using the given variables.
Syntax:
Required arguments
- name: A name to identify the keybind by
- hotkey: A hotkey to bind the keybind to such as "SHIFT+D"
- pressType: When to trigger, on press up or press down ("Up" or "Down")
- function: A LUA function to be called each time the keybind is pressed
Optional arguments
Note: The arguments between [brackets] are optional and you can leave them out.
- params: Paramaters you wish to pass to the function the timer will call on each keypress
Example:
RemoveKeybind
Removes an existing keybind.
Required arguments
- name: The name of the keybind to remove
Example: