Closed L-Sun closed 3 days ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
blocksuite | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 1, 2024 7:01am |
Add the label βmergeβ to the PR and Graphite will automatically add it to the merge queue when itβs ready to merge.
You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @L-Sun and the rest of your teammates on Graphite
L-Sun
added this pull request to the Graphite merge queue.L-Sun
merged this pull request with the Graphite merge queue.Nice solution, also related to https://github.com/toeverything/blocksuite/issues/3485
Closes: #7451
What changes
Use the
beforeInput
event instead of thekeyDown
event, as the latter cannot capture the actual input character when IME are active. For example, when pressing / with Sogou IME, the actual character input isγ
, but at this timeevent.key
is equal toProcess
.After using the
beforeInput
event, there is no need to check whether various modifier keys are pressed, such as in non-English keyboard layouts, like the French keyboard (Shift + Slash = /
) and the German keyboard (Shift + 7 = /
).However, in the new implementation with Chinese IME actived, pressing \ key also tirgger slash menu becasue of
γ
inputed.Test cases
fr
andde
keyboard layout manually