From 20022db1f6d10b03b1ef2afa8ac2b7b7b060dc33 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Fri, 23 Dec 2022 23:18:24 +0000 Subject: [PATCH] mac: allow using Shift-Enter to complete capture --- extension/src/js/common.js | 2 +- extension/src/js/popup.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/src/js/common.js b/extension/src/js/common.js index 7e578db..2defa37 100644 --- a/extension/src/js/common.js +++ b/extension/src/js/common.js @@ -9,7 +9,7 @@ export function showNotification(text: string, priority: number=0) { 'title': "grasp", 'message': text, 'priority': priority, - 'iconUrl': 'unicorn.png', + 'iconUrl': 'img/unicorn.png', }); } diff --git a/extension/src/js/popup.js b/extension/src/js/popup.js index bc3aa7b..8490071 100644 --- a/extension/src/js/popup.js +++ b/extension/src/js/popup.js @@ -74,7 +74,9 @@ function submitComment () { // todo not sure if can define const here?? var ctrlEnterSubmit: KeyboardEventListener = (e) => { - if (e.ctrlKey && e.key === 'Enter') { + // note: there is also e.metaKey which triggers on mac when cmd is pressed + // but it doesn't seem to allow chords like cmd+Enter + if ((e.ctrlKey || e.shiftKey) && e.key === 'Enter') { submitComment(); } }