From baca6acdc71e04f05ed033bca29af7cdc00bc088 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 Mar 2026 15:34:10 +0530 Subject: [PATCH] Document the new command palette --- docs/actions.rst | 3 +++ docs/changelog.rst | 3 +++ kitty/options/definition.py | 8 ++++++-- kitty/options/types.py | 2 ++ kitty/options/utils.py | 1 - 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/actions.rst b/docs/actions.rst index f0594f878..2366d769b 100644 --- a/docs/actions.rst +++ b/docs/actions.rst @@ -8,4 +8,7 @@ using the ``map`` and ``mouse_map`` directives in :file:`kitty.conf`. For configuration examples, see the default shortcut links for each action. To read about keyboard mapping in more detail, see :doc:`mapping`. +You can also browse and trigger these actions by pressing :sc:`command_palette` +to run the command palette. + .. include:: /generated/actions.rst diff --git a/docs/changelog.rst b/docs/changelog.rst index 40c804e5d..ef5a4201d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -167,6 +167,9 @@ Detailed list of changes - Allow dragging window borders to resize kitty windows in all the different layouts, controlled by :opt:`window_drag_tolerance` (:pull:`9447`) +- A command palette to browse and trigger all mapped and unmapped actions + (:pull:`9545`) + - choose-files kitten: Fix JXL image preview not working (:iss:`9323`) - Fix tab bar rendering glitches when using :opt:`tab_bar_filter` in some diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 0c24ca30a..9c285a5bf 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -3836,8 +3836,9 @@ Some quick examples to illustrate common tasks:: # multi-key shortcuts map ctrl+x>ctrl+y>z action -The full list of actions that can be mapped to key presses is available -:doc:`here `. +You can browse and trigger these actions by pressing :sc:`command_palette` to +run the command palette. The full list of actions that can be mapped to +key presses is available :doc:`here `. ''') opt('kitty_mod', 'ctrl+shift', @@ -4532,6 +4533,9 @@ agr('shortcuts.misc', 'Miscellaneous') map('Show documentation', 'show_kitty_doc kitty_mod+f1 show_kitty_doc overview') +map('Command palette', + 'command_palette kitty_mod+f3 command_palette') + map('Toggle fullscreen', 'toggle_fullscreen kitty_mod+f11 toggle_fullscreen', ) diff --git a/kitty/options/types.py b/kitty/options/types.py index 8272f0c70..f0fa4b89e 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -959,6 +959,8 @@ defaults.map = [ KeyDefinition(is_sequence=True, trigger=SingleKey(mods=256, key=112), rest=(SingleKey(key=121),), definition='kitten hints --type hyperlink'), # show_kitty_doc KeyDefinition(trigger=SingleKey(mods=256, key=57364), definition='show_kitty_doc overview'), + # command_palette + KeyDefinition(trigger=SingleKey(mods=256, key=57366), definition='command_palette'), # toggle_fullscreen KeyDefinition(trigger=SingleKey(mods=256, key=57374), definition='toggle_fullscreen'), # toggle_maximized diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 0b7ecdd54..ec777282d 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -167,7 +167,6 @@ def detach_tab_parse(func: str, rest: str) -> FuncArgsType: @func_with_args( 'set_background_opacity', 'goto_layout', 'toggle_layout', 'toggle_tab', 'kitty_shell', 'show_kitty_doc', 'set_tab_title', 'push_keyboard_mode', 'dump_lines_with_attrs', 'set_window_title', 'simulate_color_scheme_preference_change', - 'command_palette', ) def simple_parse(func: str, rest: str) -> FuncArgsType: return func, (rest,)