diff --git a/README.md b/README.md index 7d69443..210d8a1 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ In Navigation view, `f` activate selection node and start editing. ## 🚧 TODO -- [ ] Delete node by shortcut `Delete` +- [ ] Canvas should only be applied in active graph - [ ] Double `f` create node in the middle if no node in viewport diff --git a/src/main.ts b/src/main.ts index 55e0c87..b71d30d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -41,6 +41,20 @@ export default class LovelyMindmap extends Plugin{ this.addSettingTab(new Setting(this)) this.keymap.registerAll() this.createCanvasInstance() + + // fixed: blur node doesn't work + // @see https://github.com/xincan1949/lovely-mindmap/issues/1#issue-1868166056 + this.addCommand({ + id: 'blurNode', + name: 'Blur node', + hotkeys: [ + { + modifiers: ['Mod'], + key: 'Escape', + }, + ], + checkCallback: () => this.keymap.blurNode(), + }); } onunload() { diff --git a/src/module/keymap.ts b/src/module/keymap.ts index 6c516e9..19e280e 100644 --- a/src/module/keymap.ts +++ b/src/module/keymap.ts @@ -121,7 +121,6 @@ class Keymap { registerAll() { this.hotkeys.push( this.register([], 'f', this.focusNode), - this.register(['Meta'], 'Escape', this.blurNode), this.register([], 'Tab', this.main.node.createChildren), this.register([], 'enter', this.main.node.createSibNode), this.register(['Shift'], 'enter', this.main.node.createSibNode),