You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bug] global-shortcut should allow re-registering a shortcut, and calling unregister_all when no shortcuts are registered should return success directly.
#9806
Closed
Tallone opened this issue
May 17, 2024
· 1 comment
Now when registering a shortcut which already exists, it will return an error: "Hotkey already registered."
When there are no registered shortcuts, calling unregister_all will return an error: "Invalid arguments shortcuts for command unregister_all: command unregister_all missing required key shortcuts."
Reproduction
No response
Expected behavior
When registering a shortcut that already exists, maybe it should directly override it, so that repeated calls do not fail.
When calling unregister_all if there are no registered shortcuts, it should return ok directly, instead of returning an error.
unregister_all will only unregister registered by your own application and not by the system, the "Hotkey already registered." error means another app has already registered the same shortcut you're trying to register and your app can't hijack that, it is an OS limiation.
Describe the bug
Now when registering a shortcut which already exists, it will return an error: "Hotkey already registered."
When there are no registered shortcuts, calling
unregister_all
will return an error: "Invalid arguments shortcuts for command unregister_all: command unregister_all missing required key shortcuts."Reproduction
No response
Expected behavior
When registering a shortcut that already exists, maybe it should directly override it, so that repeated calls do not fail.
When calling
unregister_all
if there are no registered shortcuts, it should return ok directly, instead of returning an error.Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: