-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[feat] Allow listening for the release of a global shortcut's key combination #4364
Comments
`pub fn register_shortcuts(_app: &mut App) { fn my_custom_sys() { |
I would also like to see this implemented in tauri, atm we have to do this on our own with f.e. https://docs.rs/device_query/0.1.3/device_query/index.html |
/upstream tauri-apps/tao |
Upstream issue at tauri-apps/tao#467 has been closed. |
The implementation of For this use-case, global keyboard events should be used with manual track of modifiers and key combos but for now global keyboard events doessn't work on Wayland (limitation of Wayland, they still wouldn't provide a protocol for it, even though many developers requested it) and flaky on X11?. |
@amrbashir hotkey库使用的winapi可以监听到keydown和keyup事件,如果想要监听按键释放还要自己稍微改动下代码; |
@felix307253927 Tauri v1.3 will have a method to disable the filter: #5562 - if you can't wait for that release, you can also use the dev branch as described here: https://tauri.app/v1/guides/faq#how-can-i-use-unpublished-tauri-changes |
Describe the problem
I would like to implement global push-to-talk functionality for voice calls in my app. I've seen the globalShortcut module which allows one to register a callback for when a key combination is pressed, even if the app is not in focus.
However, for effective push-to-talk, I would like to listen both for when the key combination is pressed, and when it is released. At the moment, the API only allows the former.
Describe the solution you'd like
I would like to be able to pass two callbacks to
globalShortcut.register
. The first would be called when the shortcut was pressed, and the second would be called when the shortcut was released.Alternatives considered
An alternative is to have a single callback which is passed a boolean parameter, indicating whether the shortcut was pressed or released.
Additional context
No response
The text was updated successfully, but these errors were encountered: