Skip to content

Commit

Permalink
Merge pull request #318 from braden-w:feature/whi-116-fix-keyboard-pr…
Browse files Browse the repository at this point in the history
…essing-in-tauri-v2

fix: on keyboard press in tauri v2
  • Loading branch information
braden-w authored Sep 25, 2024
2 parents bce4102 + e401e13 commit ea1c022
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/app/src/lib/stores/settings.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ const registerGlobalShortcut = ({
try: async () => {
if (!window.__TAURI_INTERNALS__) return;
const { register } = await import('@tauri-apps/plugin-global-shortcut');
return await register(shortcut, callback);
return await register(shortcut, (event) => {
if (event.state === 'Pressed') {
callback();
}
});
},
catch: (error) =>
new WhisperingError({
Expand Down

0 comments on commit ea1c022

Please sign in to comment.