aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-05-05 00:14:21 +0300
committerGitHub <noreply@github.com>2020-05-05 00:14:21 +0300
commita1f8f0d1de7286a55c97a783504b23bd76740e50 (patch)
treeccef04b6d6c8c0deec1fa5743ed4948c05a45cdb
parent7d7ff165ced305bc269b24aa0ce8664272d86fa6 (diff)
support meta as scanning modifier (#502)
-rw-r--r--ext/bg/data/options-schema.json2
-rw-r--r--ext/bg/settings.html1
-rw-r--r--ext/mixed/js/text-scanner.js1
3 files changed, 3 insertions, 1 deletions
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 @@
<option value="alt">Alt</option>
<option value="ctrl">Ctrl</option>
<option value="shift">Shift</option>
+ <option data-hide-for-browser="firefox firefox-mobile" value="meta">Meta</option>
</select>
</div>
</div>
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;
}