Skip to content

Commit b5ecda6

Browse files
author
neurodynamic
committed
adds quit shortcut
1 parent 9ea2d2d commit b5ecda6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import { Elm } from '../elm/Main'
22
import { open } from '@tauri-apps/api/dialog'
33
import { readTextFile, writeFile } from '@tauri-apps/api/fs'
44
import { exit } from '@tauri-apps/api/app'
5+
import { register } from '@tauri-apps/api/globalShortcut'
56

6-
console.log("START")
7+
register("CmdOrControl+Q", () => {
8+
exit()
9+
})
710

811
const app = Elm.Main.init({
912
flags: {

0 commit comments

Comments
 (0)