Edit:
As this is related to addon coding I've moved the thread to the lua/XML forum.
A good start is the ESOUI WIKI, to find examples, tutorials and code snippets, or the threads that Wookiefriseur linked above (it contains the info about the WIKI too).
https://wiki.esoui.com/Main_Page
Just search for keybind there andyou will find some tutorials using keybinds in their addons:
https://wiki.esoui.com/w/index.php?t...=keybind&go=Go
https://wiki.esoui.com/Keybindings
https://wiki.esoui.com/How_to_add_bu..._keybind_strip