Document all mappable actions

This commit is contained in:
Kovid Goyal
2021-06-30 14:33:28 +05:30
parent e6a17f78b6
commit 2ec0d94c31
6 changed files with 124 additions and 6 deletions

15
docs/actions.rst Normal file
View File

@@ -0,0 +1,15 @@
:tocdepth: 2
Mappable actions
===================
.. highlight:: conf
The actions described below can be mapped to any key press or mouse action
using the ``map`` and ``mouse_map`` directives in :file:`kitty.conf`.
.. contents::
:local:
:depth: 1
.. include:: /generated/actions.rst

View File

@@ -102,6 +102,9 @@ the currently active window::
Other keyboard shortcuts
----------------------------------
The full list of actions that can be mapped to key presses is available
:doc:`here </actions>`.
================================== =======================
Action Shortcut
================================== =======================

View File

@@ -510,6 +510,10 @@ def write_conf_docs(app: Any, all_kitten_names: Iterable[str]) -> None:
definition = get_kitten_conf_docs(kitten)
if definition:
generate_default_config(definition, f'kitten-{kitten}')
from kitty.actions import as_rst
with open(f'generated/actions.rst', 'w', encoding='utf-8') as f:
f.write(as_rst())
# }}}