kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.13k stars 971 forks source link

multikey mappings w/ more than two keys activate after pressing just two keys #7073

Closed BinaryKhaos closed 8 months ago

BinaryKhaos commented 8 months ago

Describe the bug A defined multikey mapping with more than two keys, will prematurely activate after pressing the first two keys.

To Reproduce Steps to reproduce the behavior:

  1. Define a multikey mapping
    map super+k>w>n new_window
  2. Press super+k, followed by w: A new window is created.

Environment details

kitty 0.32.1 created by Kovid Goyal
Linux TARDIS 6.6.12-240119-r1 #1 SMP PREEMPT_DYNAMIC Fri Jan 19 09:21:44 CET 2024 x86_64

This is TARDIS (Linux x86_64 6.6.12-240119-r1) 15:12:00

DISTRIB_ID="Gentoo"
Running under: Wayland
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib64/kitty
  extensions dir: /usr/lib64/kitty/kitty
  system shell: /bin/bash
Loaded config files:
  /home/matthew/.config/kitty/kitty.conf

Config options different from defaults:
cursor_blink_interval 0.0
font_family           JetBrainsMono Nerd Font
font_size             18.0
scrollback_lines      10000
tab_bar_style         powerline
tab_title_max_length  20
Added shortcuts:
    super+k > r →  load_config_file
    super+x > w > n →  new_window

Important environment variables seen by the kitty process:
    PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin:/etc/eselect/wine/bin
    LANG                                en_US.UTF-8
    EDITOR                              /usr/bin/nvim
    SHELL                               /bin/bash
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-0
    USER                                matthew
    LC_MEASUREMENT                      de_DE.UTF-8
    LC_MONETARY                         de_DE.UTF-8
    LC_NUMERIC                          de_DE.UTF-8
    LC_PAPER                            de_DE.UTF-8
    LC_TELEPHONE                        de_DE.UTF-8
    LC_TIME                             en_GB.UTF-8
    XDG_CONFIG_DIRS                     /home/matthew/.config/kdedefaults:/etc/xdg
    XDG_CURRENT_DESKTOP                 KDE
    XDG_DATA_DIRS                       /home/matthew/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/etc/eselect/wine/share:/usr/share/gdm
    XDG_MENU_PREFIX                     plasma-
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_SEAT                            seat0
    XDG_SESSION_CLASS                   user
    XDG_SESSION_ID                      c2
    XDG_SESSION_TYPE                    wayland
    XDG_VTNR                            7
kovidgoyal commented 8 months ago

That's because you only have one mapping. Make more than one and it will wait after the second key.

BinaryKhaos commented 8 months ago

I am so sorry for the noise. Works fine w/ more than two mappings. ~That would be a good addition to the docs, though.~ Just noticed your commit. :+1: Thanks again!