command: add the ability to set comment for keybind command

This allows the keybind to have a comment field which can be
read from input-bindings, and displayed by e.g. stats.lua.
This commit is contained in:
nanahi
2024-10-23 02:01:40 -04:00
committed by Kacper Michajłow
parent affa953dd4
commit 56e2689894
4 changed files with 15 additions and 8 deletions

View File

@@ -924,11 +924,12 @@ Remember to quote string arguments in input.conf (see `Flat command syntax`_).
empty string, ``KEYUP`` will be set on all keys. Otherwise, ``KEYUP`` will
only be set on the key specified by ``name``.
``keybind <name> <cmd>``
``keybind <name> <cmd> [<comment>]``
Binds a key to an input command. ``cmd`` must be a complete command
containing all the desired arguments and flags. Both ``name`` and
``cmd`` use the ``input.conf`` naming scheme. This is primarily
useful for the client API.
``cmd`` use the ``input.conf`` naming scheme. ``comment`` is an optional
string which can be read as the ``comment`` entry of ``input-bindings``.
This is primarily useful for the client API.
``audio-add <url> [<flags> [<title> [<lang>]]]``
Load the given audio file. See ``sub-add`` command.