-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
macos: add keyboard support #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! I didn't know about this crate.
It seems to work for me without issues. The only thing that does not work is repeating keys, it seems.
You could take some inspiration from
lan-mouse/src/backend/consumer/windows.rs
Line 91 in 8084b52
async fn spawn_repeat_task(&mut self, key: u32) { |
Rust format is complaining but other than that, lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed up my attempt to integrate the key repeating logic. I tried turning key_event
into a method, but it might be simpler to just event_source
and to pass it into key_event
in the event handler and the timer?
That should do it! I'm new to Rust so feedback welcome. |
Thank you, looking good! I fixed one clippy complaint and updated the README, hope you don't mind :) |
keycode
is doing all the heavy lifting here.I encountered some odd behaviour with Caps lock (which I've mapped to Control) getting stuck, but keys appear to be translated properly otherwise.