From a1f8f0d1de7286a55c97a783504b23bd76740e50 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Tue, 5 May 2020 00:14:21 +0300 Subject: [PATCH] support meta as scanning modifier (#502) --- ext/bg/data/options-schema.json | 2 +- ext/bg/settings.html | 1 + ext/mixed/js/text-scanner.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json index 8622f16b..656da989 100644 --- a/ext/bg/data/options-schema.json +++ b/ext/bg/data/options-schema.json @@ -351,7 +351,7 @@ }, "modifier": { "type": "string", - "enum": ["none", "alt", "ctrl", "shift"], + "enum": ["none", "alt", "ctrl", "shift", "meta"], "default": "shift" }, "deepDomScan": { diff --git a/ext/bg/settings.html b/ext/bg/settings.html index fc9221f8..b8477e46 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -417,6 +417,7 @@ + diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js index 9dcf6009..cc81f758 100644 --- a/ext/mixed/js/text-scanner.js +++ b/ext/mixed/js/text-scanner.js @@ -369,6 +369,7 @@ class TextScanner extends EventDispatcher { case 'alt': return mouseEvent.altKey; case 'ctrl': return mouseEvent.ctrlKey; case 'shift': return mouseEvent.shiftKey; + case 'meta': return mouseEvent.metaKey; case 'none': return true; default: return false; }