From c5740085644bf5678db42af1ad456f86db529be2 Mon Sep 17 00:00:00 2001 From: handlerug Date: Mon, 14 Jun 2021 10:15:37 +0700 Subject: [PATCH] Change superscript and subscript shortcuts on Mac Now they won't conflict with the default browser actions, if we're going to not stop the browser from doing its own thing. --- static/shortcuts.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/static/shortcuts.js b/static/shortcuts.js index b88c9bf..f4cc2df 100644 --- a/static/shortcuts.js +++ b/static/shortcuts.js @@ -340,17 +340,15 @@ // Inspired by MS Word, Pages, Google Docs and Telegram desktop clients. // And by myself, too. - // Win+Linux Mac Action Description - ['Ctrl+b', 'Meta+b', wrapBold, 'Format: Bold'], - ['Ctrl+i', 'Meta+i', wrapItalic, 'Format: Italic'], - ['Ctrl+M', 'Meta+Shift+m', wrapMonospace, 'Format: Monospaced'], - ['Ctrl+I', 'Meta+Shift+i', wrapHighlighted, 'Format: Highlight'], - ['Ctrl+.', 'Meta+.', wrapLifted, 'Format: Superscript'], - ['Ctrl+Comma', 'Meta+Comma', wrapLowered, 'Format: Subscript'], - // Strikethrough conflicts with 1Password on my machine but - // I'm probably the only Mycorrhiza user who uses 1Password. -handlerug - ['Ctrl+X', 'Meta+Shift+x', wrapStrikethrough, 'Format: Strikethrough'], - ['Ctrl+k', 'Meta+k', wrapLink, 'Format: Link'], + // Win+Linux Mac Action Description + ['Ctrl+b', 'Meta+b', wrapBold, 'Format: Bold'], + ['Ctrl+i', 'Meta+i', wrapItalic, 'Format: Italic'], + ['Ctrl+M', 'Meta+Shift+m', wrapMonospace, 'Format: Monospaced'], + ['Ctrl+I', 'Meta+Shift+i', wrapHighlighted, 'Format: Highlight'], + ['Ctrl+.', 'Meta+Shift+.', wrapLifted, 'Format: Superscript'], + ['Ctrl+Comma', 'Meta+Shift+Comma', wrapLowered, 'Format: Subscript'], + ['Ctrl+X', 'Meta+Shift+x', wrapStrikethrough, 'Format: Strikethrough'], + ['Ctrl+k', 'Meta+k', wrapLink, 'Format: Link'], ]; editorShortcuts.fakeItem('Editor');