-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support separate keydown/keyup event for hotkey #9
Comments
I think this maybe be possible on Linux(X11) and maybe Windows too (I have an idea but haven't tested it yet). As for macOS, I see in the article that they are using private APIs which will result in your app getting rejected by The App Store so we can't use that. Since I am not a macOS dev, I will have to leave it to someone else to contribute. |
I see in the macOS ffi impl we have It is useful for creating a "hold to talk" interaction for our users. Happy to make a PR for macOS if the API is decided upon. |
@morajabi thanks for looking into this, the API should be straight forward, you would need to just add a field in pub enum HotKeyState {
Pressed,
Released,
}
pub struct GlobalHotKeyEvent {
/// Id of the associated [`HotKey`]
pub id: u32,
pub state: HotKeyState,
} |
+1 on this |
Is this possible to do? I've seen this in Swift before.
Here it is implemented for macOS: https://medium.com/@avaidyam/building-a-better-registereventhotkey-900afd68f11f but seems to be a lot more than that lol.
The text was updated successfully, but these errors were encountered: