You have dozens of addons which are very small and contains only 1 keybind.
To create a keybind :
- Add your Keybind definition file to your metafile (Keybinds should always be defined in last in mletafile)
ex :
Code:
## Title: MyAddon
## APIVersion: 100020
## Author: Me
## Description: Do something
## Version: 1
MyAddon.lua
Bindings.xml
- Create your keybind definition file it will link your Keybind to a function defined in your code. The function must be global (no "local keyword front of your function definition) :
Code:
<Bindings>
<Layer name="SI_KEYBINDINGS_LAYER_GENERAL">
<Category name="MyAddon">
<Action name="PUSH_THE_BUTTON">
<Down>MyAddon_SayHello()</Down>
</Action>
</Category>
</Layer>
</Bindings>
- Link your function defiined in your .lua File ( MyAddon.lua ) and add the Binding string to the code
Lua Code:
ZO_CreateStringId("SI_BINDING_NAME_PUSH_THE_BUTTON", "Press to say hello")
function MyAddon_SayHello()
d("Hello")
end
- Set your key and push the button