diff --git a/src/public/app/desktop.ts b/src/public/app/desktop.ts index 4e9930d34..b78074126 100644 --- a/src/public/app/desktop.ts +++ b/src/public/app/desktop.ts @@ -4,7 +4,6 @@ import noteTooltipService from "./services/note_tooltip.js"; import bundleService from "./services/bundle.js"; import toastService from "./services/toast.js"; import noteAutocompleteService from "./services/note_autocomplete.js"; -import macInit from "./services/mac_init.js"; import electronContextMenu from "./menus/electron_context_menu.js"; import glob from "./services/glob.js"; import { t } from "./services/i18n.js"; @@ -35,8 +34,6 @@ if (utils.isElectron()) { initOnElectron(); } -macInit.init(); - noteTooltipService.setupGlobalTooltip(); noteAutocompleteService.init(); diff --git a/src/public/app/services/mac_init.ts b/src/public/app/services/mac_init.ts deleted file mode 100644 index c864b3cad..000000000 --- a/src/public/app/services/mac_init.ts +++ /dev/null @@ -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 -}; diff --git a/src/public/app/setup.ts b/src/public/app/setup.ts index ec389c793..1970c110a 100644 --- a/src/public/app/setup.ts +++ b/src/public/app/setup.ts @@ -1,9 +1,6 @@ import utils from "./services/utils.js"; -import macInit from "./services/mac_init.js"; import ko from "knockout"; -macInit.init(); - // TriliumNextTODO: properly make use of below types // type SetupModelSetupType = "new-document" | "sync-from-desktop" | "sync-from-server" | ""; // type SetupModelStep = "sync-in-progress" | "setup-type" | "new-document-in-progress" | "sync-from-desktop";