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

macOS: Ctrl+L with Ergo-L keyboard layout doesn't produce a ctrl encoding #5448

Open
mitchellh opened this issue Jan 31, 2025 · 0 comments
Open
Labels
input Keyboard or mouse input os/macos

Comments

@mitchellh
Copy link
Contributor

Steps to reproduce:

  1. Install Ergo-L: https://ergol.org
  2. Launch Ghostty
  3. Run any keyboard input tracker, i.e. kitty +kitten show_key -m kitty (or any other)
  4. Switch to Ergo-L
  5. Ctrl+L (On US physical: Ctrl+H)

Notice the control key doesn't show up.

I've tracked this down to the code below, but this code exists for a reason. We should investigate why we do this, fix this, and ensure we don't regress the reason we did this in the first place.

// This is a hack. libghostty on macOS treats ctrl input as not having
// text because some keyboard layouts generate bogus characters for
// ctrl+key. libghostty can't tell this is from an IM keyboard giving
// us direct values. So, we just remove control.
var modifierFlags = event.modifierFlags
modifierFlags.remove(.control)

@mitchellh mitchellh added input Keyboard or mouse input os/macos labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input Keyboard or mouse input os/macos
Projects
None yet
Development

No branches or pull requests

1 participant