From 365873b9bbb047deacd2c68c83e0b8b2566030ea Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Thu, 3 Dec 2026 10:21:38 +0100 Subject: [PATCH 1/2] fix(shortcuts): stop the shortcuts panel shadowing show_scrollback The panel was bound to kitty_mod+h, the trigger upstream gives show_scrollback, so the last definition won: Ctrl+Shift+H stopped browsing the scrollback in a pager while the docs and the built-in help still announced that behavior. The panel now uses kitty_mod+alt+h and the documentation follows, with a test that fails when two default actions claim the same trigger. Fixes #46 --- RACCOURCIS-CLAVIER.md | 6 +++--- docs/changelog.rst | 5 +++++ docs/kittens/help.rst | 7 ++++--- kitty/options/definition.py | 6 ++++-- kitty/options/types.py | 2 +- kitty_tests/options.py | 14 ++++++++++++++ 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/RACCOURCIS-CLAVIER.md b/RACCOURCIS-CLAVIER.md index c16d5e7..de6dd63 100644 --- a/RACCOURCIS-CLAVIER.md +++ b/RACCOURCIS-CLAVIER.md @@ -10,7 +10,7 @@ Les tableaux reflètent les valeurs de `kitty/options/definition.py`. La palette de commandes (`Ctrl+Shift+F3`) liste en direct toutes les actions, leur touche et leur catégorie, y compris les actions sans raccourci. -> **Aide rapide** : `Ctrl+Shift+H` (`kitty_mod+H`) ouvre le panneau latéral qui +> **Aide rapide** : `Ctrl+Shift+Alt+H` (`kitty_mod+alt+h`) ouvre le panneau latéral qui > liste tous les raccourcis, avec recherche et catégories. Dans le shell kitty, > `help` fait la même chose. @@ -38,7 +38,7 @@ et leur catégorie, y compris les actions sans raccourci. | `Ctrl+Shift+Alt+V` (`kitty_mod+alt+v`) | Colle une entrée de l'historique du presse-papiers. | | `Ctrl+Shift+Alt+F` (`kitty_mod+alt+f`) | Demande une recherche floue, puis colle l'entrée choisie. | | `Ctrl+Shift+Alt+R` (`kitty_mod+alt+r`) | Restaure la session enregistrée à la dernière fermeture de kitty. | -| `Ctrl+Shift+H` (`kitty_mod+H`) | Ouvre le panneau latéral de tous les raccourcis. | +| `Ctrl+Shift+Alt+H` (`kitty_mod+alt+h`) | Ouvre le panneau latéral de tous les raccourcis. | Deux fonctions FWS ne demandent aucune touche : @@ -286,7 +286,7 @@ avec la syntaxe `map `. Dans le shell kitty (`Ctrl+Shift+Échap`), `help` sans argument ouvre un panneau latéral qui liste tous les raccourcis actifs, classés par catégorie, avec une recherche rapide. Depuis un terminal : `kitty +kitten help` ; le raccourci -par défaut `Ctrl+Shift+H` (`kitty_mod+H`) ouvre le même panneau. +par défaut `Ctrl+Shift+Alt+H` (`kitty_mod+alt+h`) ouvre le même panneau. | Touche | Action | | --- | --- | diff --git a/docs/changelog.rst b/docs/changelog.rst index 57e0696..1ab3673 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -268,6 +268,11 @@ Detailed list of changes (which allows the shifted fallback), so the last definition won and the search never opened. It is now on :kbd:`kitty_mod+alt+s`. +- The keyboard shortcuts panel moved from :kbd:`kitty_mod+h` to + :kbd:`kitty_mod+alt+h`, so that :kbd:`Ctrl+Shift+H` browses the scrollback in + a pager again with :ac:`show_scrollback`, as documented. The two actions + shared the same default trigger and the panel silently took the key over. + - The keyboard shortcuts panel ellipsizes a long action name inside its own column instead of letting the edge of the dock cut it, shrinks its key column on very narrow docks so that a row always fits, and shows the full name of diff --git a/docs/kittens/help.rst b/docs/kittens/help.rst index fdbe93e..8fe2e22 100644 --- a/docs/kittens/help.rst +++ b/docs/kittens/help.rst @@ -6,14 +6,15 @@ Panneau d'aide aux raccourcis Le panneau d'aide affiche tous les raccourcis clavier actifs, triés par catégorie, avec une recherche rapide. Il s'ouvre dans un dock latéral, comme le gestionnaire de fichiers, et reste en lecture seule : :kbd:`Entrée` ne déclenche -aucune action. Il est mappé sur :kbd:`kitty_mod+H` (:kbd:`Ctrl+Shift+H` par -défaut). +aucune action. Il est mappé sur :kbd:`kitty_mod+alt+h` +(:kbd:`Ctrl+Shift+Alt+H` par défaut), pour laisser :kbd:`kitty_mod+h` à +:ac:`show_scrollback`. Utilisation ----------- Dans le :doc:`shell kitty ` (:kbd:`Ctrl+Shift+Échap`), la commande -``help`` sans argument ouvre le panneau, tout comme :kbd:`kitty_mod+H` dans +``help`` sans argument ouvre le panneau, tout comme :kbd:`kitty_mod+alt+h` dans n'importe quelle fenêtre :: help diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 524a6b1..f6cfcaf 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -4720,11 +4720,13 @@ map('Command palette', 'command_palette kitty_mod+f3 command_palette') map( 'Keyboard shortcuts', - 'keyboard_shortcuts kitty_mod+h launch --type=window-dock --dock-edge=left --dock-size=60 kitty +kitten help', + 'keyboard_shortcuts kitty_mod+alt+h launch --type=window-dock --dock-edge=left --dock-size=60 kitty +kitten help', long_text=""" Open the searchable keyboard shortcuts panel in a dock at the left edge of the current window. It can also be launched manually with :code:`kitty +kitten help`. -The default binding is :kbd:`kitty_mod+h` (:kbd:`Ctrl+Shift+H` by default). +The default binding is :kbd:`kitty_mod+alt+h` (:kbd:`Ctrl+Shift+Alt+H` by +default), so that :kbd:`kitty_mod+h` keeps browsing the scrollback in a pager +with :ac:`show_scrollback`. """, ) diff --git a/kitty/options/types.py b/kitty/options/types.py index a5d9623..d1fb766 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -1041,7 +1041,7 @@ defaults.map = [ # file_manager KeyDefinition(trigger=SingleKey(mods=5, key=101), definition='launch --type=window-dock --dock-edge=left --dock-size=60 kitten file-manager'), # keyboard_shortcuts - KeyDefinition(trigger=SingleKey(mods=5, key=104), definition='launch --type=window-dock --dock-edge=left --dock-size=60 kitty +kitten help'), + KeyDefinition(trigger=SingleKey(mods=258, key=104), definition='launch --type=window-dock --dock-edge=left --dock-size=60 kitty +kitten help'), # toggle_fullscreen KeyDefinition(trigger=SingleKey(mods=256, key=57374), definition='toggle_fullscreen'), # toggle_maximized diff --git a/kitty_tests/options.py b/kitty_tests/options.py index 354b7e2..3acd1b8 100644 --- a/kitty_tests/options.py +++ b/kitty_tests/options.py @@ -29,6 +29,20 @@ class TestConfParsing(BaseTest): def test_conf_parsing(self): conf_parsing(self) + def test_default_shortcuts_have_no_duplicate_trigger(self): + from kitty.config import load_config + + opts = load_config(overrides=()) + keymap = opts.keyboard_modes[''].keymap + # The file manager deliberately takes kitty_mod+e over from open_url, a + # decision documented in the changelog. Every other collision means the + # last definition wins silently and one of the two actions is unreachable. + accepted = {frozenset(('launch', 'open_url_with_hints'))} + for key, defns in keymap.items(): + actions = {d.definition.split()[0] for d in defns} + if len(actions) > 1 and frozenset(actions) not in accepted: + self.fail(f'{key!r} is claimed by several actions: {sorted(actions)}') + def test_default_search_shortcut(self): from kitty.config import load_config From 6e60b16e3684b4a3ab40642520edc51c9d2ff889 Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Thu, 3 Dec 2026 10:21:39 +0100 Subject: [PATCH 2/2] chore(release): bump the fork version to 0.1.14 The default shortcut of the shortcuts panel changed, so cut a patch release. All the version copies must agree for the packaging workflow. --- README.md | 2 +- kitty/launcher/main.c | 4 ++-- packaging/PKGBUILD | 2 +- tools/cli/help.go | 2 +- version | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8a0b39f..368f662 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ _branch=feat/file-manager-panel ### Publication automatique `version`, à la racine, est la source de vérité des releases. Il suit la version -du fork FWS (`0.1.13`), pas la version amont de kitty embarquée dans le paquet : +du fork FWS (`0.1.14`), pas la version amont de kitty embarquée dans le paquet : c'est elle qui nomme le tag, la release et le paquet `fws-kitty--`. Il doit rester égal à `pkgver` dans `packaging/PKGBUILD` et à la version affichée par `fws-kitty` diff --git a/kitty/launcher/main.c b/kitty/launcher/main.c index 60e22b4..9f99464 100644 --- a/kitty/launcher/main.c +++ b/kitty/launcher/main.c @@ -424,10 +424,10 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) { if (get_bool_cli_val(cli_spec, "version")) { if (isatty(STDOUT_FILENO)) { printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION); - printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.13\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n"); + printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.14\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n"); } else { printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION); - printf("fws-kitty 0.1.13 by BlackAngelTV\n"); + printf("fws-kitty 0.1.14 by BlackAngelTV\n"); } exit(0); } diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index e106820..62fd598 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -13,7 +13,7 @@ pkgname=fws-kitty # Fork version from the version file: it names the release and the package. # The upstream kitty release built inside is tracked by _kittyver below. -pkgver=0.1.13 +pkgver=0.1.14 pkgrel=1 pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)' arch=('x86_64' 'aarch64') diff --git a/tools/cli/help.go b/tools/cli/help.go index 7106776..c7d4b3c 100644 --- a/tools/cli/help.go +++ b/tools/cli/help.go @@ -31,7 +31,7 @@ func ShowError(err error) { func (self *Command) version_string(formatter *markup.Context) string { return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) + - fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.13"), "by", formatter.Title("BlackAngelTV")) + fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.14"), "by", formatter.Title("BlackAngelTV")) } func (self *Command) ShowVersion() { diff --git a/version b/version index 7ac4e5e..71d6a66 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.1.13 +0.1.14