From 829ee1cacabbb52db43efb45340021f61f5af6b1 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Fri, 5 Jan 2024 17:25:05 +0100 Subject: [PATCH] Change default emacs meta key to Alt on non Linux and Windows --- electron/config.js | 3 ++- src/editor/editor.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/electron/config.js b/electron/config.js index c93be581..e5c1e3e9 100644 --- a/electron/config.js +++ b/electron/config.js @@ -1,4 +1,5 @@ import Store from "electron-store" +import { isMac } from "./detect-platform" const isDev = !!process.env.VITE_DEV_SERVER_URL @@ -50,7 +51,7 @@ const schema = { const defaults = { settings: { keymap: "default", - emacsMetaKey: "meta", + emacsMetaKey: isMac ? "meta" : "alt", showLineNumberGutter: true, showFoldGutter: true, autoUpdate: true, diff --git a/src/editor/editor.js b/src/editor/editor.js index 8050c756..c98a310d 100644 --- a/src/editor/editor.js +++ b/src/editor/editor.js @@ -40,7 +40,7 @@ export class HeynoteEditor { theme="light", saveFunction=null, keymap="default", - emacsMetaKey="Meta", + emacsMetaKey, showLineNumberGutter=true, showFoldGutter=true, bracketClosing=false,