-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Windows - US International keyboard layout modifier (dead keys) don't correctly register #35086
Comments
Looking at the history, I think e2e3f6b is probably related. (If that is the case, this may have the same problem on other non-Windows OSes, I just can't test that. macOS has an "US International (PC)" keyboard that uses dead keys the way Windows does, in Linux that's the US layout with |
Just to add for context, I tested this with the US International (PC) on macOS and the behaviour of the dead keys is slightly different to how Windows handles them. The issue reported didn't happen in macOS for me, only on Windows. The slight difference seems to be that in macOS, the first press of the modifier outputs a placeholder character that is then replaced with the final character on the second keypress. In Windows, the first press of the modifier doesn't output anything at all. |
So here's a JSFiddle that might be useful: http://jsfiddle.net/r8dMu/ The combination for
While for
You can see that there's five events for each character, because dead keys don't map 1-to-1 between keys and symbols. Most importantly the keydown/keyup don't match the press. Now, But my JavaScript-fu is limited, @ellatrix any chance you have ideas on what may be causing this behaviour or a suggestion how to get this fixed quickly? |
Further testing: this does not appear to affect Chrome on Android (of all things!). The output of the fiddle is (missing the last character because I'm manually re-typing), for
and for
|
Could you describe step by step what you're tying, what you're getting, and what you're expecting? You don't get the desired character after pressing space? I tried on Mac and Chrome, Alt+´ works well. |
Prerequisite: this is a report for Windows with the US International keyboard layout. Not Mac, not Android. Using the US International layout, pressing a number of diacritical marks by themselves (no Alt, no Option, no Ctrl, no Compose) causes them to be interpreted as dead keys. That's true for `, Typing one of them following by a compatible letters should replace them with the appropriate codepoint, so for instance:
And to insert the actual diacritical mark, you type the dead key followed by SPACE;
This works everywhere: GitHub right now, Google Docs, Facebook, Instagram, Twitter, Gutenberg as of August, … Except Gutenberg as of September.
That is not what this report is about. |
Making sure that this issue is not considering "dormant" just because nobody said anything in a month. |
@youknowriad you may want to tag this as Regression as well — this works perfectly fine on older Gutenberg. |
I'm removing this issue from WP 5.9 project board since RC1 was released last night. Let's try and land a fix for this in a minor release. |
I guess I'll have to just stop using WordPress once 5.9 releases then. I have to say I'm unimpressed by this whole experience. It's a clear, reproducible bug, affecting a major operating system (Windows!), and I even tracked down when the regression was introduced, but the only attention I got from developers has been looking at the wrong operating system. Once again I feel that what killed blogging is not the death of Google Reader, but the rotting of writing options https://flameeyes.blog/2021/10/05/reader-is-dead-but-what-about-writers/ |
@Flameeyes: I am sorry about this one falling through the cracks and how it's impacting you. I just spent the last couple of hours redoing my virtual machine setup (Win 10 VM guest on a macOS host with access to the host's dev server) and I can reproduce this issue. The expert in this domain, @ellatrix, is on leave, so we'll see if we can find a solution for this in the meantime. |
Thanks, everyone who has been a squeaky wheel on this. I basically compose all of my Wordpress posts in Notepad++ at this point... Looking forward to a fix soon! |
I've tracked it down to #30244. |
See #35086 In `useSpace`, don't intercept character composition that involves the Space key. For example, to input a standalone diacritic (like ´ or `) using a keyboard with dead keys, one must first press the dead key and then press the Space key. Many operating systems handle this in such a way that the second KeyboardEvent contains the property `keyCode: 229`. According to the spec, 229 allows the system to indicate that an Input Method Editor (IDE) is processing some key input. However, Windows doesn't use `keyCode: 229` for dead key composition, instead emitting an event with values `keyCode: SPACE` and `key: '´'`. That is why checking the `key` property for values other than `SPACE` is important. This should serve as a reminder that the `KeyboardEvent.keyCode` attribute is officially deprecated and that we should consider more consistent interfaces.
Description
It appears when you have US International keyboard layouts active in Windows that the modifier keys (pressing either ' or ` on a US layout keyboard, followed by a letter such as e should then output either é or è) don't register correctly if you want to output the actual symbol character (usually done by clicking modifier + space).
Instead, it appears the editor outputs a space character only.
Step-by-step reproduction instructions
'
thene
which should correctly outputé
'
thenspace
which should output the'
character but instead a space character is output instead.Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: