hints kitten: Document how to choose the empty hint for multi key hints

This commit is contained in:
Kovid Goyal 2022-01-15 15:17:30 +05:30
parent 06ff685f8e
commit b32edf54f8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,12 @@ that has been marked as such by the program running in the terminal,
for example, by ``ls --hyperlink=auto``. You can also :doc:`customize what actions are for example, by ``ls --hyperlink=auto``. You can also :doc:`customize what actions are
taken for different types of URLs <../open_actions>`. taken for different types of URLs <../open_actions>`.
.. note:: If there are more hints than letters, hints will use multiple
letters. In this case, when you press the first letter, only hints
starting with that letter are displayed. Pressing the second letter will
select that hint or press :kbd:`Enter` or :kbd:`Space` to select the empty
hint.
The hints kitten is very powerful to see more detailed help on its various The hints kitten is very powerful to see more detailed help on its various
options and modes of operation, see below. You can use these options to options and modes of operation, see below. You can use these options to
create mappings in :file:`kitty.conf` to select various different text create mappings in :file:`kitty.conf` to select various different text

View File

@ -186,7 +186,7 @@ class Hints(Handler):
self.current_input = self.current_input[:-1] self.current_input = self.current_input[:-1]
self.current_text = None self.current_text = None
self.draw_screen() self.draw_screen()
elif key_event.matches('enter') and self.current_input: elif (key_event.matches('enter') or key_event.matches('space')) and self.current_input:
try: try:
idx = decode_hint(self.current_input, self.alphabet) idx = decode_hint(self.current_input, self.alphabet)
self.chosen.append(self.index_map[idx]) self.chosen.append(self.index_map[idx])