-
Notifications
You must be signed in to change notification settings - Fork 116
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
Inconsitency in number handling between Linux and Windows (or lacks of documentation to this behavior) #308
Comments
Note that enigo.key(Key::Unicode('#'), enigo::Direction::Click).unwrap();
enigo.key(Key::Unicode('0'), enigo::Direction::Click).unwrap(); by enigo.text("#0").unwrap(); solves the issue |
Is this new in 0.2.1? This worked fine for me under 0.2.0, haven't tested on 0.2.1 yet. |
I have slightly modified the script to use That still provides the issue. Here is the full compilation/Execution log
|
This is related to the PR #285. When you want to enter text, you should always use the That said, I definitely need to improve the behavior of Key::Unicode and improve it's documentation. Right now it is confusing and inconsistent |
Thanks for the feedback. My use case is not trivial, as I am trying to control the emulator of an oldschool machine; so text typing may not be always the solution. |
👍 |
Describe the bug
Windows does not seem to be able to generate key events for numbers (but also for other chars).
To Reproduce
This minimal example illustrates the issue.
Expected behavior
When launched with Linux, the following output is obtained:
Obtained behavior
When launched with Windows, the following output is obtained:
The problem comes at least from
enigo.key(Key::Unicode('0'), enigo::Direction::Click).unwrap();
, but in this example # is problematic too (hence the line 16 reported).Environment (please complete the following information):
Additional context
I do not understand why there is this faulty behavior on Windows.
Either there is a bug in the library, either this is a known limitation.
In that case, what are the workarounds ?
The text was updated successfully, but these errors were encountered: