Comments (11)
Return to version 0.0.14 to resume normal
from enigo.
I don't know how to get the enigo logs to help you debug, if there is anything I can do please let me know
from enigo.
Hi, thank you for bringing this to my attention. There is no need for you to do anything else. I can reproduce this myself and am now checking which commit broke it. I'll try to fix it today and publish a new version. Sorry about the inconvenience
from enigo.
I had to revert 95e331b. A new version was released. Feel free to try it out
from enigo.
Another question, I found that the speed of the keyboard emulation interface provided by MacSDK is low, it takes 45ms to emulate a keyboard input on M1 Mac Air, while the win32 interface only takes ns level to emulate a keyboard input, I have no experience, so please ask if there is any other way to achieve a lower latency to emulate a keyboard input.
from enigo.
We intentionally sleep for a couple of ms as you can see here. Those sleeps are required on macOS for the key press to be registered. If they are pressed for too short, they are ignored. We do the same on Windows though (see here), so I am a bit confused as to why it only takes ns on Windows for you. I'd like to get rid of these sleeps, but I am not aware of any way these sleeps can be avoided :(
from enigo.
i've try core-foundation-rs on Mac and windows-rs on Windows
not enigo
unsafe {
// \x08: backspace
keybd_event(*key, 0, KEYBD_EVENT_FLAGS::default(), 0);
keybd_event(*key, 0, KEYEVENTF_KEYUP, 0);
}
from enigo.
Does that work reliably without a sleep between the press and the release of the key or are keys ignored?
If it does, I'll use that instead and get rid of the delay.
from enigo.
I simply tested it on the Windows platform, but not on buttons like Control, and the results seem to be fine, you can find the code herekey_test
The test results are as follows:
PS C:\Users\Administrator\code\key_speed_test> cargo run
Compiling key_speed_test v0.1.0 (C:\Users\Administrator\code\key_speed_test)
Finished dev [unoptimized + debuginfo] target(s) in 0.68s
Running `target\debug\key_speed_test.exe`
Press 36 keys in 4.7608ms
PS C:\Users\Administrator\code\key_speed_test> abcdefghijklmnopqrstuvwxyz0123456789
from enigo.
Sorry, I made a mistake, it should be μs instead of ns, but it is fast enough and no characters are missing
from enigo.
Enigo no longer needs any sleeps on Windows anymore. They are still there on macOS though
from enigo.
Related Issues (20)
- Win: Is it necessary to set the MessageExtraInfo? HOT 1
- win: Use an array in `SendInput` to get rid of sleep HOT 2
- In some games, special keys can't be triggered HOT 13
- Reading key presses HOT 4
- win: Check if alt-gr works
- character sequence manual delay HOT 3
- Inconsistent number of newlines produced by `\n` in `key_sequence` HOT 1
- Is EnigoSettings Unavailable on Windows HOT 2
- Volume up / down doesn't work on MacOS HOT 6
- macOS: Use objc2 instead of objc HOT 3
- Invoking multiple keys at the same time does not seem to register HOT 4
- Selecting text isn't working HOT 3
- `text` seems to miss certain characters, consistently HOT 12
- Support BSDs HOT 4
- State of 0.2 releases HOT 6
- Mouse moves to the wrong coordinates HOT 4
- Choose between xdo and wayland at runtime HOT 1
- Doesn't work as expected in simulation “Ctrl+C" HOT 2
- Screenshot under window does not work HOT 1
- Special characters are not working with ShiftKey
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enigo.