-
Notifications
You must be signed in to change notification settings - Fork 15.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
[Bug]: webContents.sendInputEvent does not work with Space and Enter #39610
Comments
Same as this issue: #24279, which was closed because of invalid formatting. |
Hello @tristanmercille. Thanks for reporting this and helping to make Electron better! Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use. Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests. Now adding the
blocked/need-repro
|
Here's a link to the gist for reproduction: https://gist.github.com/tristanmercille/ec40d0ef8ce2da99da52a464b74f8d70 When the app is ran, it should type a space (" ") into the input field every second. Instead, we see the chars "Spa". |
bump |
Bug also reproduces on Electron 26.1.0 and 27.0.0-alpha.4. |
Preflight Checklist
Electron Version
19.0.9
What operating system are you using?
Ubuntu
Operating System Version
20.04
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
webContents.sendInputEvent({ keyCode: "Space", type: "keyDown" });
webContents.sendInputEvent({ keyCode: "Space", type: "char" });
webContents.sendInputEvent({ keyCode: "Space", type: "keyUp" });
Displays "Spa" in my input field.
Same applies for "Enter", which displays "Ent".
Backspace and other simple letters work fine.
Actual Behavior
"Space" and "Enter" keycodes input the first 3 letters instead of the actual key.
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: