From a0865071672e62c7e2cf96fd6e7bb50b2c90ccd8 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 17 May 2020 04:08:43 -0400 Subject: [PATCH] Obey Cmd/Ctrl-W in Scaffold, Style Editor, and Run JavaScript windows --- chrome/content/scaffold/scaffold.xul | 4 ++++ chrome/content/zotero/runJS.js | 3 +++ chrome/content/zotero/tools/csledit.xul | 3 +++ 3 files changed, 10 insertions(+) diff --git a/chrome/content/scaffold/scaffold.xul b/chrome/content/scaffold/scaffold.xul index c798c7d47b..6daf6a19c3 100644 --- a/chrome/content/scaffold/scaffold.xul +++ b/chrome/content/scaffold/scaffold.xul @@ -258,4 +258,8 @@ + + + + diff --git a/chrome/content/zotero/runJS.js b/chrome/content/zotero/runJS.js index ea621115c4..0a9703e0e4 100644 --- a/chrome/content/zotero/runJS.js +++ b/chrome/content/zotero/runJS.js @@ -68,6 +68,9 @@ window.addEventListener('keypress', function (event) { run(); event.stopPropagation(); } + else if (event.key == 'w') { + window.close(); + } }); var shortcut = Zotero.isMac ? 'Cmd-R' : 'Ctrl+R'; diff --git a/chrome/content/zotero/tools/csledit.xul b/chrome/content/zotero/tools/csledit.xul index 78316b62ad..bb08bca9a4 100644 --- a/chrome/content/zotero/tools/csledit.xul +++ b/chrome/content/zotero/tools/csledit.xul @@ -73,4 +73,7 @@