kovidgoyal / kitty

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

macOS 13 Ventura tab focus first keypress issue #5624

Closed ldmsh closed 1 year ago

ldmsh commented 1 year ago

Describe the bug While tab-switching a focused kitty window, the first keypress is not registered.

To Reproduce Steps to reproduce the behavior:

  1. Open kitty
  2. Tab-switch to another app
  3. Tab-switch back to kitty
  4. First keypress isn't registered

Screenshots If applicable, add screenshots to help explain your problem.

Environment details

kitty 0.26.4 created by Kovid Goyal
Darwin is-MacBook-Pro.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
ProductName:        macOS ProductVersion:       13.0 BuildVersion:      22A380
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config files:
  /Users/i/.config/kitty/kitty.conf

Config options different from defaults:
bold_font                          JetBrainsMono Nerd Font Bold
bold_italic_font                   JetBrainsMono Nerd Font Bold Italic
confirm_os_window_close            0
cursor_blink_interval              0.0
cursor_shape                       2
font_family                        JetBrainsMono Nerd Font
font_size                          14.0
hide_window_decorations            2
italic_font                        JetBrainsMono Nerd Font Italic
macos_quit_when_last_window_closed True
modify_font:
    cell_height 14
    cell_width 0
remember_window_size               False
repaint_delay                      4
scrollback_lines                   2500
shell_integration                  frozenset({'no-prompt-mark'})
tab_bar_style                      powerline
tab_powerline_style                slanted
window_padding_width               FloatEdges(left=6.0, top=6.0, right=6.0, bottom=6.0)
Colors:
    active_tab_background              #979eab   
    active_tab_foreground              #282c34   
    background                         #282c34   
    color0                             #1f232b   
    color1                             #e06c75   
    color10                            #98c379   
    color11                            #e5c07b   
    color12                            #61afef   
    color13                            #c678dd   
    color14                            #56b6c2   
    color15                            #abb2bf   
    color2                             #98c379   
    color3                             #e5c07b   
    color4                             #61afef   
    color5                             #c678dd   
    color6                             #56b6c2   
    color7                             #abb2bf   
    color8                             #5c6370   
    color9                             #e06c75   
    foreground                         #abb2bf   
    inactive_tab_background            #282c34   
    inactive_tab_foreground            #abb2bf   

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/Users/i/.cargo/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_GB.UTF-8
    SHELL                               /bin/zsh
    USER                                i

On older versions of kitty, run kitty --debug-config instead

Additional context Try to reproduce the problem with kitty --config NONE - issue persists without config.

page-down commented 1 year ago

I can't reproduce the issue.

kitty --config=NONE --debug-input

After switching macOS windows (actually switching between Apps) via cmd+tab, I can see in the logs that kitty recognizes the keystrokes (including the first pressed key) properly.

kovidgoyal commented 1 year ago

Does nto reproduce for me either on Ventura. Steps I tried

1) Start Terminal.app 2) Start kitty 3) press the a key -- a is shown in kitty 4) press alt-tab once 5) press the b key -- b is shown in terminal.app 6) press alt-tab once 7) press the c key 8) c is shown in kitty

ldmsh commented 1 year ago

After disabling entire config and re-enabling one at a time, found it was safari extension svim causing the issue. Thanks for your help and time, appreciate it