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: don't remove ctrl modifier for text input #5738

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

mitchellh
Copy link
Contributor

Fixes #5448

We previously removed the ctrl modifier for text commit (IME-style) to workaround a libghostty quirk (as noted in the comment in the diff). But this broke other keyboard layouts.

This commit attempts to clean this up slightly -- but not completely -- by removing that hack, and only modifying the ctrl behavior for the UCKeyTranslate call.

Long term, I plan to remove UCKeyTranslate completely, as noted in the todo comment already written just below this diff.

This fixes the aforementioned issue and hopefully doesn't regress any other behavior. I tested the following:

  1. Dvorak Ctrl characters
  2. Ergo-L Ctrl characters
  3. US standard Ctrl characters
  4. Japanese IME input Ctrl input to modify IME state

Fixes #5448

We previously removed the ctrl modifier for text commit (IME-style)
to workaround a libghostty quirk (as noted in the comment in the diff).
But this broke other keyboard layouts.

This commit attempts to clean this up slightly -- but not completely --
by removing that hack, and only modifying the ctrl behavior for the
UCKeyTranslate call.

Long term, I plan to remove UCKeyTranslate completely, as noted in the
todo comment already written just below this diff.

This fixes the aforementioned issue and hopefully doesn't regress any
other behavior. I tested the following:

  1. Dvorak Ctrl characters
  2. Ergo-L Ctrl characters
  3. US standard Ctrl characters
  4. Japanese IME input Ctrl input to modify IME state
@mitchellh mitchellh requested a review from a team as a code owner February 13, 2025 17:43
@mitchellh mitchellh merged commit 20dcae8 into main Feb 13, 2025
57 of 58 checks passed
@mitchellh mitchellh deleted the push-osnwxmkzomyk branch February 13, 2025 17:51
@github-actions github-actions bot added this to the 1.1.1 milestone Feb 13, 2025
@mitchellh
Copy link
Contributor Author

This caused #5743, so there was a case I didn't test. I haven't nailed it down completely, but its something to do with Kitty keyboard input since it only affects that protocol.

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

Successfully merging this pull request may close these issues.

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