Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
bind standard shortcuts on both command and ctrl modifiers, #254
azivnerd30e3a405262
diff --git a/src/public/javascripts/services/bootstrap.js b/src/public/javascripts/services/bootstrap.jsindex b1622538d4..5c9a10d0eb 100644--- a/src/public/javascripts/services/bootstrap.js+++ b/src/public/javascripts/services/bootstrap.js@@ -117,6 +117,13 @@ if (utils.isElectron() && utils.isMac()) {utils.bindShortcut('ctrl+a', () => exec('selectAll'));utils.bindShortcut('ctrl+z', () => exec('undo'));utils.bindShortcut('ctrl+y', () => exec('redo'));++ utils.bindShortcut('meta+c', () => exec("copy"));+ utils.bindShortcut('meta+v', () => exec('paste'));+ utils.bindShortcut('meta+x', () => exec('cut'));+ utils.bindShortcut('meta+a', () => exec('selectAll'));+ utils.bindShortcut('meta+z', () => exec('undo'));+ utils.bindShortcut('meta+y', () => exec('redo'));}$("#export-note-button").click(function () {diff --git a/src/public/javascripts/services/entrypoints.js b/src/public/javascripts/services/entrypoints.jsindex 81c87ef252..fbbc6fbbe8 100644--- a/src/public/javascripts/services/entrypoints.js+++ b/src/public/javascripts/services/entrypoints.js@@ -95,7 +95,7 @@ function registerEntrypoints() {}});- $(document).bind('keydown', 'ctrl+f', () => {+ function openInPageSearch() {if (utils.isElectron()) {const $searchWindowWebview = $(".electron-in-page-search-window");$searchWindowWebview.show();@@ -113,7 +113,13 @@ function registerEntrypoints() {return false;}- });+ }++ utils.bindShortcut('ctrl+f', openInPageSearch);++ if (utils.isMac()) {+ utils.bindShortcut('meta+f', openInPageSearch);+ }// FIXME: do we really need these at this point?utils.bindShortcut("ctrl+shift+up", () => {