Skip to content

fix: support AltGr text input on Windows#3000

Open
tianrking wants to merge 1 commit into
gitui-org:masterfrom
tianrking:agent/altgr-text-input
Open

fix: support AltGr text input on Windows#3000
tianrking wants to merge 1 commit into
gitui-org:masterfrom
tianrking:agent/altgr-text-input

Conversation

@tianrking

Copy link
Copy Markdown

Summary

Fixes #2848.

On Windows, crossterm reports AltGr as Ctrl+Alt. TextInputComponent rejected every event with the Alt modifier, so AltGr-bound characters such as {, [, ], }, and \ could not be entered in commit messages or other text inputs.

Handle Ctrl+Alt character events as text after the existing Ctrl+Alt editing shortcuts have had a chance to match. This preserves commands such as Ctrl+Alt+B while accepting characters that are not shortcut bindings.

Tests

  • Added regression coverage for Ctrl+Alt character insertion.
  • Added coverage that Alt-only characters remain uninserted.
  • Added coverage that the Ctrl+Alt+B editing shortcut still moves to the line start.
  • cargo test --no-default-features --features regex-fancy (80 passed)
  • rustfmt --check src/components/textinput.rs
  • git diff --check

The default-feature build could not run on this Windows host because its vendored OpenSSL dependency requires Perl, which is not installed. The code path was fully validated under the project's non-vendored feature combination.

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.

Cannot type AltGr-bound characters in the commit field

1 participant