Skip to content

Commit bb736c4

Browse files
committed
chore: init tanstack hotkeys
1 parent 52bc114 commit bb736c4

3 files changed

Lines changed: 85 additions & 2 deletions

File tree

app/plugins/hotkeys.client.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { useHotkeys } from '@tanstack/vue-hotkeys'
2+
3+
export default defineNuxtPlugin({
4+
parallel: true,
5+
setup: () => {
6+
const { open } = useSettingsDialog()
7+
8+
useHotkeys([
9+
{
10+
callback: () => open.value = !open.value,
11+
hotkey: 'Mod+,',
12+
},
13+
])
14+
},
15+
})

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@nuxtjs/color-mode": "4.0.0",
3434
"@nuxtjs/seo": "5.1.3",
3535
"@peterbud/nuxt-query": "1.7.0",
36+
"@tanstack/vue-hotkeys": "^0.10.0",
3637
"@vite-pwa/nuxt": "^1.1.1",
3738
"@vueuse/nuxt": "14.3.0",
3839
"class-variance-authority": "^0.7.1",

pnpm-lock.yaml

Lines changed: 69 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)