From 7c0097951c550c86be785f0150d2c2c835c6f329 Mon Sep 17 00:00:00 2001 From: voidsatisfaction Date: Wed, 20 Jun 2018 21:38:36 +0900 Subject: [PATCH 1/3] fix: m key issue --- browser/main/lib/ConfigManager.js | 4 ++-- browser/main/lib/shortcutManager.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/main/lib/ConfigManager.js b/browser/main/lib/ConfigManager.js index 0f070fc6..ecdceac3 100644 --- a/browser/main/lib/ConfigManager.js +++ b/browser/main/lib/ConfigManager.js @@ -21,8 +21,8 @@ export const DEFAULT_CONFIG = { listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL' amaEnabled: true, hotkey: { - toggleMain: OSX ? 'Cmd + Alt + L' : 'Super + Alt + E', - toggleMode: OSX ? 'Cmd + M' : 'Ctrl + M' + toggleMain: OSX ? 'Command + Alt + L' : 'Super + Alt + E', + toggleMode: OSX ? 'Command + M' : 'Ctrl + M' }, ui: { language: 'en', diff --git a/browser/main/lib/shortcutManager.js b/browser/main/lib/shortcutManager.js index 2b937aea..ac2a3a08 100644 --- a/browser/main/lib/shortcutManager.js +++ b/browser/main/lib/shortcutManager.js @@ -3,7 +3,7 @@ import CM from 'browser/main/lib/ConfigManager' import ee from 'browser/main/lib/eventEmitter' import { isObjectEqual } from 'browser/lib/utils' require('mousetrap-global-bind') -const functions = require('./shortcut') +import functions from './shortcut' let shortcuts = CM.get().hotkey From a2ddb5654070863ab9ceb635520b1baabc0daeb6 Mon Sep 17 00:00:00 2001 From: voidsatisfaction Date: Wed, 20 Jun 2018 21:45:24 +0900 Subject: [PATCH 2/3] fix: change mode to more desiarable way --- browser/main/Detail/MarkdownNoteDetail.js | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/main/Detail/MarkdownNoteDetail.js b/browser/main/Detail/MarkdownNoteDetail.js index a8fc938b..b0be06b0 100755 --- a/browser/main/Detail/MarkdownNoteDetail.js +++ b/browser/main/Detail/MarkdownNoteDetail.js @@ -277,6 +277,7 @@ class MarkdownNoteDetail extends React.Component { handleSwitchMode (type) { this.setState({ editorType: type }, () => { + this.focus(); const newConfig = Object.assign({}, this.props.config) newConfig.editor.type = type ConfigManager.set(newConfig) From bdd5b7b3a7bb9324f66daaaa413c44d4ee5492d6 Mon Sep 17 00:00:00 2001 From: voidsatisfaction Date: Wed, 20 Jun 2018 21:57:11 +0900 Subject: [PATCH 3/3] fix: no need semicolon --- browser/main/Detail/MarkdownNoteDetail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/main/Detail/MarkdownNoteDetail.js b/browser/main/Detail/MarkdownNoteDetail.js index b0be06b0..82073162 100755 --- a/browser/main/Detail/MarkdownNoteDetail.js +++ b/browser/main/Detail/MarkdownNoteDetail.js @@ -277,7 +277,7 @@ class MarkdownNoteDetail extends React.Component { handleSwitchMode (type) { this.setState({ editorType: type }, () => { - this.focus(); + this.focus() const newConfig = Object.assign({}, this.props.config) newConfig.editor.type = type ConfigManager.set(newConfig)