Skip to content

Build your personal knowledge base with Trilium Notes

remove `mac_init` functionality as it was overriding paste (and other) functionality, and is no longer needed

perfectra1n512440684e37
diff --git a/src/public/app/desktop.ts b/src/public/app/desktop.ts
index 4e9930d34c..b780741268 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
index c864b3cadb..46a59aeea8 100644
--- a/src/public/app/services/mac_init.ts
+++ b/src/public/app/services/mac_init.ts
@@ -5,20 +5,6 @@ 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 {
diff --git a/src/public/app/setup.ts b/src/public/app/setup.ts
index ec389c793a..1970c110ab 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";