docs: Link to fish_key_reader

This commit is contained in:
Fabian Homborg 2021-01-09 13:13:48 +01:00
parent f22fe44c79
commit b489137fa9
2 changed files with 3 additions and 0 deletions

View file

@ -28,6 +28,8 @@ The generic key binding that matches if no other binding does can be set by spec
If the ``-k`` switch is used, the name of a key (such as 'down', 'up' or 'backspace') is used instead of a sequence. The names used are the same as the corresponding curses variables, but without the 'key\_' prefix. (See ``terminfo(5)`` for more information, or use ``bind --key-names`` for a list of all available named keys). Normally this will print an error if the current ``$TERM`` entry doesn't have a given key, unless the ``-s`` switch is given.
To find out what sequence a key combination sends, you can use :ref:`fish_key_reader <cmd-fish_key_reader>`.
``COMMAND`` can be any fish command, but it can also be one of a set of special input functions. These include functions for moving the cursor, operating on the kill-ring, performing tab completion, etc. Use ``bind --function-names`` for a complete list of these input functions.
When ``COMMAND`` is a shellscript command, it is a good practice to put the actual code into a `function <#function>`__ and simply bind to the function name. This way it becomes significantly easier to test the function while editing, and the result is usually more readable as well.

View file

@ -229,6 +229,7 @@ Some characters can not be written directly on the command line. For these chara
- ``\cX``, where *X* is a letter of the alphabet, represents the control sequence generated by pressing the control key and the specified letter. For example, ``\ci`` is the tab character
These sequences are also used with the :ref:`bind <cmd-bind>` builtin to describe key sequences. To see what sequence a key combination sends and how to write it, use :ref:`fish_key_reader <cmd-fish_key_reader>`.
.. _redirects: