question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sendKeys applies QWERTY-Style on German Keyboard Setting

See original GitHub issue

OS: win10 Language Setting: DEU (German)

Given the following script:

const wd = require("wd");
const serverConfig = {
    host: 'localhost',
    port: 4723,
    path: '/'
};

const driver = wd.promiseChainRemote(serverConfig);

const desiredCapabilities = {
    app: 'C:\\Windows\\System32\\notepad.exe',     
    platformName: 'Windows',
    deviceName: 'windowsPC'
};
   
driver
    .init(desiredCapabilities)
    .elementByClassName("Edit")
    .sendKeys('zora driving a yacht')
    .fin( () => { return driver.quit(); });

Output to Notepad is: yora driving a zacht

If i take a look into the Server-Log the Request is recieved correctly:

==========================================
POST /session/2787FC29-6B61-41AE-B4AF-DE6BC7DFC8C2/element/42.2425972/value HTTP/1.1
Accept: application/json
Connection: keep-alive
Content-Length: 31
Content-Type: application/json; charset=UTF-8
Host: localhost:4723
User-Agent: admc/wd/1.6.2

{"value":["zora driving a yacht"]}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"2787FC29-6B61-41AE-B4AF-DE6BC7DFC8C2","status":0}


==========================================

Possible Workaround: Switching Language/Keyboard in Windows to English and the text is typed to Notepad correctly.

Regards, ap0yuv

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:13

github_iconTop GitHub Comments

1reaction
andrisicommented, Nov 7, 2020

Let’s ask @DHowett kindly 😃 Basically remember that the rest of the world uses non-us keyboards. SendKeys ought to send the charachters we ask for, not translated through they local keyboard.

1reaction
shatulskycommented, Aug 1, 2019

Same behavior with russian keyboard. Sending “QWERTY” keys with Russian Keyboard layout actually type - “ЙЦУКЕН”. So it actually simulate keyboard key pressing with current Keyboard layout instead of just typing actual text. I can by handled by switching keyboard layout right in test but it is not greather solution. Would be greate if it will be fixed by winappdriver devs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sendKeys applies QWERTY-Style on German Keyboard ...
Just ran into this issue on a Swedish keyboard on Win 10. SendKeys("-") turns into a + sign in my UWP app. And...
Read more >
How to get german QWERTY on Windows?
If you want to type umlauts on a keyboard fast, use US-International keyboard layout (LAnguage Bar>Settings>Keyboard). On this layout use Shift+ ...
Read more >
Hello, I have a physical German keyboard layout, but it's ...
Hello, I have a physical German keyboard layout, but it's still qwerty, in the options of language keyboard is qwertz, but still when...
Read more >
Windows 10 - German Keyboard/English Language
Then you go to Language preferences -> English -> Options -> Add Keyboard. Look for the one you want. In my case i...
Read more >
Should I get used to the German keyboard?
I've been learning German for two years now in class, I'm getting somewhat decent and definitely (slowly) making progress.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found