Skip to content
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

Open
alex-popov-tech opened this issue Jun 30, 2021 · 4 comments
Open

[Feature] Russian Keyboard Layout #7396

alex-popov-tech opened this issue Jun 30, 2021 · 4 comments

Comments

@alex-popov-tech
Copy link

@alex-popov-tech alex-popov-tech commented Jun 30, 2021

Context:

  • Playwright Version: [1.12.2]
  • Operating System: [Linux & Mac]
  • Node.js version: [14.17.0]
  • Browser: [Chromium]
  • Extra: [any specific details about your environment]
## System:
 - OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
 - Memory: 15.31 GB / 31.30 GB
 - Container: Yes
## Binaries:
 - Node: 14.17.0 - /usr/bin/node
 - npm: 7.5.2 - /usr/local/bin/npm
## Languages:
 - Bash: 5.0.17 - /usr/bin/bash
## npmPackages:
 - playwright: 1.12.2 => 1.12.2 
## System:
 - OS: macOS 11.4
 - Memory: 670.91 MB / 32.00 GB
## Binaries:
 - Node: 15.3.0 - ~/.asdf/installs/nodejs/15.3.0/bin/node
 - Yarn: 1.22.10 - /usr/local/bin/yarn
 - npm: 7.0.14 - ~/.asdf/installs/nodejs/15.3.0/bin/npm
## Languages:
 - Bash: 3.2.57 - /bin/bash
## npmPackages:
 - playwright: 1.12.2 => 1.12.2 

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:

const {chromium, webkit, firefox} = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
      await page.goto('https://learn.javascript.ru/article/keyboard-events/keyboard-dump/');
      const checkbox = await page.$('input[name="keyupStop"]');
      await checkbox.click();
      const input = await page.$('#kinput');
      await input.type(' working ', { delay: 500, noWaitAfter: false, timeout: 15000 });
      await input.type(' не работает ', { delay: 500, noWaitAfter: false, timeout: 15000 });
})();

Describe the bug

When I try to type russian characters keyup/down events are not triggered

@JoelEinbinder
Copy link
Contributor

@JoelEinbinder JoelEinbinder commented Jun 30, 2021

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.

@JoelEinbinder JoelEinbinder changed the title [BUG] element.type does not trigger key events with russian text [FEATURE] Russian Keyboard Layout Jun 30, 2021
@JoelEinbinder JoelEinbinder changed the title [FEATURE] Russian Keyboard Layout [Feature] Russian Keyboard Layout Jun 30, 2021
@pavelfeldman
Copy link
Member

@pavelfeldman pavelfeldman commented Jan 6, 2022

[GOOD FIRST ISSUE]

@mxschmitt mxschmitt added the good first issue label Jan 6, 2022
@santapan345
Copy link

@santapan345 santapan345 commented Feb 11, 2022

I want to work on this issue.

@viraxslot
Copy link

@viraxslot viraxslot commented May 25, 2022

@JoelEinbinder hi, could you please suggest how to nicely implement this feature?
Is it ok to:

  • create the second file with the Russian layout
  • create a common file and merge EN/RU layouts there
  • use this common file in packages/playwright-core/src/server/input.ts instead of the English one?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@pavelfeldman @JoelEinbinder @mxschmitt @viraxslot @alex-popov-tech @santapan345 and others