Skip to content

[lexical][lexical-playground] Fix: Use the fallback matching for number keys in keyboard shortcuts#8361

Merged
etrepum merged 2 commits into
facebook:mainfrom
levensta:fix-heading-shortcut
Apr 16, 2026
Merged

[lexical][lexical-playground] Fix: Use the fallback matching for number keys in keyboard shortcuts#8361
etrepum merged 2 commits into
facebook:mainfrom
levensta:fix-heading-shortcut

Conversation

@levensta

Copy link
Copy Markdown
Contributor

Description

Added a fallback check for number keys to the isExactShortcutMatch function. On macOS, the English keyboard layout produces the following characters when the Option key is pressed in combination with numbers:

  • 1¡
  • 2
  • ££

This became apparent after the changes in this PR #8260, as the keyboard shortcuts for headings in the playground stopped working

Test plan

Before

The Option key didn't work with numbers on the English keyboard layout in macOS

After

Support for the Option + Num hotkeys has been added for macOS. Alternative keyboard layouts, such as Dvorak or other languages, continue working

@vercel

vercel Bot commented Apr 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 16, 2026 1:50am
lexical-playground Ready Ready Preview, Comment Apr 16, 2026 1:50am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2026

@etrepum etrepum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be cleaner if this was done in one place instead of two, e.g. isFormatHeading could be getFormatHeading which would tell you which heading it was (or undefined)

@etrepum etrepum added this pull request to the merge queue Apr 16, 2026
Merged via the queue into facebook:main with commit 3ffad5d Apr 16, 2026
44 checks passed
@etrepum etrepum mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants