Skip to content

Commit

Permalink
Merge pull request #1820 from StratusFearMe21/patch-1
Browse files Browse the repository at this point in the history
Try to fix MacOS sound
  • Loading branch information
amitojsingh366 authored Apr 5, 2021
2 parents 370b59b + f79bc53 commit 7f72bec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions baklava/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
"electron-log": "^4.3.2",
"electron-overlay-window": "^1.0.4",
"electron-updater": "^4.3.8",
"globkey": "^1.0.21",
"globkey": "^1.0.22",
"i18next": "^20.0.0",
"i18next-node-fs-backend": "^2.1.3"
},
"files": [
"./icons/**/*",
"./resources/**/*"
]
}
}
6 changes: 5 additions & 1 deletion baklava/src/utils/keybinds/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import { isMainThread, parentPort } from 'worker_threads';
import globkey from 'globkey';

if (!isMainThread) {
let prev_keys = ['', '']
globkey.start();
while (true) {
let keys = globkey.getKeys();
if (parentPort) parentPort.postMessage({ type: 'keys', keys: keys });
if (keys != prev_keys) {
if (parentPort) parentPort.postMessage({ type: 'keys', keys: keys });
}
prev_keys = keys
}
}

1 comment on commit 7f72bec

@vercel
Copy link

@vercel vercel bot commented on 7f72bec Apr 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.