Skip to content

Keybinds

If you want to trigger an action by pressing keys, use yabe.keybind. For example, if you want to launch Chromium by pressing Ctrl+Alt+B, write like this:

yabe.keybind({ "Ctrl", "Alt", "B" }, yabe.dispatchers.exec("chromium"))

The first argument ({ "Ctrl", "Alt", "B" }) is a table of keys. When all keys in it are pressed, the Dispatcher, specified by the second argument (as a DispatcherID), is fired.

Keys are expressed as key names in libxkbcommon. See xkbcommon-keysyms.h to check the full list of keysyms; remove XKB_KEY_ prefix from keysym to get key name.

Register a keybind

parameters:
  1. keys: string[]
  2. dispatcher: YabeDispatcherID