tauri-apps / tauri-apps/plugins-workspace
[bug] [plugin-global-shortcut] When I registered for the global media shortcut, I opened the accessibility feature of MacOS but still received an error message
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
### Describe the bug
I am developing a desktop music player app on Mac and received a message when registering the global media key using @ tauri apps/plugin global sharecut error message: MediaPlayPause register failed: Failed to watch media key event. The code snippet is as follows:
```typescript
try {
await register("MediaPlayPause", () => {
console.log("MediaPlayPause register success.");
});
} catch (error) {
console.log("MediaPlayPause register failed", error);
}
```
### Reproduction
_No response_
### Expected behavior
_No response_
### Full `tauri info` output
```text
[✔] Environment
- OS: Mac OS 15.4.0 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
✔ cargo: 1.87.0 (99624be96 2025-05-06)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 22.11.0
- pnpm: 9.12.3
- npm: 10.9.0
- bun: 1.2.12
```
### Stack trace
```text
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.