Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kitty grabs global shortcuts alt-letter and alt-shift-letter on Sequoia #8108

Closed
sschuldenzucker opened this issue Dec 8, 2024 · 2 comments
Labels

Comments

@sschuldenzucker
Copy link

Describe the bug
On MacOS Sequoia, when you configure an application (tested with aerospace and amethyst) that's supposed to grab keyboard shortcuts like alt- or alt-shift- globally, this doesn't work when a kitty window is focused. Instead, the key is grabbed by kitty (produces an accented letter).

I haven't seen this happen on Sonoma.

I'm not super sure if this is a bug in kitty or just some kind of funky interaction between kitty and whatever app is grabbing global shortcuts, but it only happens with kitty, so there seems to be some special thing that kitty does here. Happy to do more targeted tests.

To Reproduce
Steps to reproduce the behavior (at the example of aerospace; this should happen in any other app that configures global keyboard shortcuts, though):

  1. You have to be on MacOS Sequoia. This only happened when I upgraded from Sonoma to Sequoia.

  2. Configure Aerospace to do something on alt-shift- or alt-, for example, in ~/.config/aerospace/aerospace.toml:

[mode.main.binding]
alt-shift-k = 'focus up'
alt-j = 'focus down'
  1. Start aerospace / reload config.

  2. Open a kitty window and a window of some other app (e.g., Safari) and arrange vertically. Then try to move between windows using alt-shift-k and alt-j (where alt = option).

Expected behavior: The keys move focus vertically between the windows.

Actual behavior: They keys move focus vertically between the windows if the other app is focused but not if the kitty window is focused. If the kitty window is focused, an accented letter is output to the shell instead.

This does not happen for other modifier combos, e.g., ctrl- or ctrl-alt- or ctrl-shift-.

Environment details

kitty 0.37.0 (2531c31d02) created by Kovid Goyal
Darwin srs.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64
ProductName:		macOS ProductVersion:		15.1.1 BuildVersion:		24B91
OpenGL: '4.1 Metal - 89.3' Detected version: 4.1
Frozen: True
Fonts:
  medium: Menlo-Regular: /System/Library/Fonts/Menlo.ttc
          Features: ()
    bold: Menlo-Bold: /System/Library/Fonts/Menlo.ttc
          Features: ()
  italic: Menlo-Italic: /System/Library/Fonts/Menlo.ttc
          Features: ()
      bi: Menlo-BoldItalic: /System/Library/Fonts/Menlo.ttc
          Features: ()
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: /opt/homebrew/bin/fish

Config options different from defaults:
Changed shortcuts:
	cmd+k →  clear_terminal_and_scrollback
	ctrl+cmd+, →  reload_config
	opt+cmd+r →  reset_terminal
	shift+cmd+/ →  open_kitty_website

Important environment variables seen by the kitty process:
	PATH                                /Applications/kitty.app/Contents/MacOS:/Users/steffen/.local/bin:/Users/steffen/.asdf/shims:/Users/steffen/.asdf/bin:/Users/steffen/.ghcup/bin:/Users/steffen/.cabal/bin:/Users/steffen/.foundry/bin:/Users/steffen/.nimble/bin:/Users/steffen/.cargo/bin:/usr/local/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/bin:/opt/homebrew/opt/postgresql@16/bin/:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/opt/podman/bin:/Applications/quarto/bin:/Library/TeX/texbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Applications/iTerm.app/Contents/Resources/utilities
	LANG                                en_US.UTF-8
	EDITOR                              hx
	SHELL                               /opt/homebrew/bin/fish
	USER                                steffen
	LC_TERMINAL_VERSION                 3.5.10
	LC_TERMINAL                         iTerm2

Additional context

Tested with kitty --config NONE, issue persists.

Aerospace version I used for testing:

aerospace CLI client version: 0.16.2-Beta 21336ad382539b35fdc94b4fbd55408e10b101f8
AeroSpace.app server version: 0.16.2-Beta 21336ad382539b35fdc94b4fbd55408e10b101f8
@kovidgoyal
Copy link
Owner

You probably turned on secure text input turn it off again.

@sschuldenzucker
Copy link
Author

Man you're a wizard! Of course you're absolutely right. This also seems to be persistent across kitty app restarts, right?

For the record, I don't remember having turned this on; it might be possible that the Sequoia upgrade did this somehow. (or I actually did it by accident ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants