Skip to content

Conversation

@probably-neb
Copy link
Collaborator

Closes #25353

Detect keybindings using upper case instead of lowercase, and report an error

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 27, 2025
@probably-neb probably-neb enabled auto-merge (squash) March 27, 2025 01:46
@ConradIrwin
Copy link
Member

@probably-neb can we convert X to shift-x instead of making this an error? Would make the vim users much more at home

@ConradIrwin
Copy link
Member

Actually reading the issue, maybe we should have it be an error instead if people assume X means x :D

@probably-neb probably-neb force-pushed the detect-uppercase-key-binds branch from b2c67c4 to 2cfbf9a Compare March 27, 2025 19:58
@probably-neb probably-neb force-pushed the detect-uppercase-key-binds branch from 2cfbf9a to b9ebc2d Compare March 27, 2025 21:04
@probably-neb probably-neb merged commit 8e12eb0 into main Mar 27, 2025
15 checks passed
@probably-neb probably-neb deleted the detect-uppercase-key-binds branch March 27, 2025 21:17
probably-neb added a commit that referenced this pull request Mar 31, 2025
Reverts the error behavior introduced in #27558. Upper-case keys in
keybindings no longer generate errors, instead they are transformed into
`shift-{KEY}`
e.g. `ctrl-N` becomes `ctrl-shift-n`

The behavior introduced in #27558 where "special" keys such as function
keys, `control`, `shift`, etc. Are parsed case-insensitively is
preserved.

Release Notes:
- Improved how upper-case characters are handled in keybinds. "special"
keys such as the function keys, `control`, `shift`, etc. are now parsed
case-insensitively, so for example `F8`, `CTRL`, `SHIFT` are now
acceptable alternatives to `f8`, `ctrl`, and `shift` when declaring
keybindings. Additionally, upper-case (ascii) characters will now be
converted explicitly to `shift` + the lowercase version of the
character, to match the Vim behavior.
NOTE: Release notes above should replace the release notes from #27558
CharlesChen0823 pushed a commit to CharlesChen0823/zed that referenced this pull request Apr 1, 2025
Reverts the error behavior introduced in zed-industries#27558. Upper-case keys in
keybindings no longer generate errors, instead they are transformed into
`shift-{KEY}`
e.g. `ctrl-N` becomes `ctrl-shift-n`

The behavior introduced in zed-industries#27558 where "special" keys such as function
keys, `control`, `shift`, etc. Are parsed case-insensitively is
preserved.

Release Notes:
- Improved how upper-case characters are handled in keybinds. "special"
keys such as the function keys, `control`, `shift`, etc. are now parsed
case-insensitively, so for example `F8`, `CTRL`, `SHIFT` are now
acceptable alternatives to `f8`, `ctrl`, and `shift` when declaring
keybindings. Additionally, upper-case (ascii) characters will now be
converted explicitly to `shift` + the lowercase version of the
character, to match the Vim behavior.
NOTE: Release notes above should replace the release notes from zed-industries#27558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keybindings are not case-insensitive and don't give warnings

3 participants