feat(shortcuts): open the help panel with Ctrl+H
Make the searchable shortcuts reference reachable without going through the kitty shell, and advertise it on the shell's first screen. The default binding takes over Ctrl+H, which is documented in the mapping description.
This commit is contained in:
2 files changed
+12
-1
No files matched your search
@@ -4685,6 +4685,16 @@ map('Show documentation', 'show_kitty_doc kitty_mod+f1 show_kitty_doc overview')
|
||||
|
||||
map('Command palette', 'command_palette kitty_mod+f3 command_palette')
|
||||
|
||||
map(
|
||||
'Keyboard shortcuts',
|
||||
'keyboard_shortcuts ctrl+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`.
|
||||
This takes over :kbd:`Ctrl+H`, which some programs use for backspace.
|
||||
""",
|
||||
)
|
||||
|
||||
map(
|
||||
'File manager',
|
||||
'file_manager ctrl+shift+e launch --type=window-dock --dock-edge=left --dock-size=60 kitten file-manager',
|
||||
|
||||
@@ -221,7 +221,8 @@ func shell_main(cmd *cli.Command, args []string) (int, error) {
|
||||
running_shell = true
|
||||
formatter = markup.New(true)
|
||||
fmt.Println("Welcome to the kitty shell!")
|
||||
fmt.Println("Use", formatter.Green("help"), "for assistance or", formatter.Green("exit"), "to quit.")
|
||||
fmt.Println("Use", formatter.Green("Ctrl+H"), "or", formatter.Green("help"), "for the keyboard shortcuts panel.")
|
||||
fmt.Println("Use", formatter.Green("help <command>"), "for a command's help, or", formatter.Green("exit"), "to quit.")
|
||||
if atwid := os.Getenv("KITTY_SHELL_ACTIVE_WINDOW_ID"); atwid != "" {
|
||||
amsg := "Previously active window id: " + atwid
|
||||
os.Unsetenv("KITTY_SHELL_ACTIVE_WINDOW_ID")
|
||||
|
||||
Reference in new issue
Block a user