-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Feature] Russian Keyboard Layout #7396
Comments
We currently hard code in a US keyboard layout. We can add in more layouts, but its a lot of work for each one so we've been waiting for a flood of user requests to prioritize it. |
[GOOD FIRST ISSUE] |
I want to work on this issue. |
@JoelEinbinder hi, could you please suggest how to nicely implement this feature?
I guess if somebody will want to add a new layout then more or less 2 lines should be changed. Of course besides the layout itself. |
Might want to consider different keyboard layouts; like Standard(ЙЦУКЕН) and Phonetic(ЯШЕРТЫ) |
can we add the same file but with a Russian keyboard Chars? |
Both layouts were generated from scraping kbdlayout.info. Adding more layouts should be trivial. Refs: microsoft#7396
I did a small PoC to support other keyboard layouts using a generator, to simplify the process. You can find it here: |
Both layouts were generated from scraping kbdlayout.info. Adding more layouts should be trivial. Refs: microsoft#7396
I noticed that keyCodes found in Looking at the code, it apparently uses Virtual-Key Codes in those cases. I'll change my generator to use these values. |
keyCode is now extracted from virtual keys section (e.g. http://kbdlayout.info/kbdus/virtualkeys). Tests event values obtained manually from https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html, to ensure correctness. Refs: microsoft#7396
keyCode is now extracted from virtual keys section (e.g. http://kbdlayout.info/kbdus/virtualkeys). Tests event values obtained manually from https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html, to ensure correctness. Refs: microsoft#7396
For primary input layouts, the following list is available: So, if we decide to select the keyboard layout by locale, we can use this table (115 keyboard layouts):
There's some ambiguity yet for
|
We only load the default keyboard layout statically. All other locales are loaded dynamically on demand. See: microsoft#7396 (comment)
Both layouts were generated from scraping kbdlayout.info. Adding more layouts should be trivial. Refs: microsoft#7396
keyCode is now extracted from virtual keys section (e.g. http://kbdlayout.info/kbdus/virtualkeys). Tests event values obtained manually from https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html, to ensure correctness. Refs: microsoft#7396
We only load the default keyboard layout statically. All other locales are loaded dynamically on demand. See: microsoft#7396 (comment)
Both layouts were generated from scraping kbdlayout.info. Adding more layouts should be trivial. Refs: microsoft#7396
keyCode is now extracted from virtual keys section (e.g. http://kbdlayout.info/kbdus/virtualkeys). Tests event values obtained manually from https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html, to ensure correctness. Refs: microsoft#7396
We only load the default keyboard layout statically. All other locales are loaded dynamically on demand. See: microsoft#7396 (comment)
Both layouts were generated from scraping kbdlayout.info. Adding more layouts should be trivial. Refs: microsoft#7396
keyCode is now extracted from virtual keys section (e.g. http://kbdlayout.info/kbdus/virtualkeys). Tests event values obtained manually from https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html, to ensure correctness. Refs: microsoft#7396
We only load the default keyboard layout statically. All other locales are loaded dynamically on demand. See: microsoft#7396 (comment)
We have updated our docs and this issue to emphasize that in most circumstances you do not need to call If you have tried using |
The app that I am testing had a bug where each keystroke resulted in a re-render of the Dead keys are only present on some keyboard layouts, e.g. "US-International - PC". As I want to simulate the press of a dead key plus a follow-up keystroke for a test, I'd need support for specific layouts. Example: Pressing |
I did implement other keyboard layouts in !24249 with deadkeys support but there were too many corner cases, so at the end that was not merged. On chrome, you can use CDPSession to send all required events. For instance, you can check which events need to be sent in W3C Keyboard Event Viewer, and send the corresponding events with Input.dispatchKeyEvent. |
Thanks for the tip. I have tried to reproduce the behavior with |
Actually, for committing you can use the |
It is true that For my Playwright test, I want to assert that a composition session was not erroneously aborted by the browser re-rendering the input element. If the fix is applied, the resulting text in the form is |
would it be possible to utilise something like However, I don't doubt there is a very good reason why we are not using it (and I'd love to hear it) 🙂 |
Note from maintainers
In most cases you should use
locator.pressSequentially()
method instead oflocator.type()
. This will work with any keyboard layout. You only need to type character by character if there is some special keyboard handling on the page.Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
When I try to type russian characters keyup/down events are not triggered
The text was updated successfully, but these errors were encountered: