With this code:
<script lang="ts">
import { register, unregisterAll } from '@tauri-apps/api/globalShortcut'
async function test() {
await unregisterAll();
await register('CommandOrControl+Shift+C', () => {
console.log('shortcut works')
})
}
test()
</script>
<h1>hi</h1>
It gives this error in the console: Unable to register accelerator with `RegisterHotKey`
I am on windows 11. I have properly added the "globalShortcut" to the allowlist in tauri.conf.json
I believe it is probably a simple fix, but I am at the end of my wits nonetheless.