mirror of https://github.com/TriliumNext/Notes
Merge pull request #1101 from TriliumNext/bugfix/mac-paste
Remove `mac_init` as it was breaking MacOSpull/1125/head
parent
3f6e66b5f1
commit
fd7f3ef2ff
@ -1,26 +0,0 @@
|
|||||||
/**
|
|
||||||
* Mac specific initialization
|
|
||||||
*/
|
|
||||||
import utils from "./utils.js";
|
|
||||||
import shortcutService from "./shortcuts.js";
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
if (utils.isElectron() && utils.isMac()) {
|
|
||||||
shortcutService.bindGlobalShortcut("meta+c", () => exec("copy"));
|
|
||||||
shortcutService.bindGlobalShortcut("meta+v", () => exec("paste"));
|
|
||||||
shortcutService.bindGlobalShortcut("meta+x", () => exec("cut"));
|
|
||||||
shortcutService.bindGlobalShortcut("meta+a", () => exec("selectAll"));
|
|
||||||
shortcutService.bindGlobalShortcut("meta+z", () => exec("undo"));
|
|
||||||
shortcutService.bindGlobalShortcut("meta+y", () => exec("redo"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function exec(cmd: string) {
|
|
||||||
document.execCommand(cmd);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
init
|
|
||||||
};
|
|
||||||
Loading…
Reference in New Issue