support meta as scanning modifier (#502)

This commit is contained in:
siikamiika 2020-05-05 00:14:21 +03:00 committed by GitHub
parent 7d7ff165ce
commit a1f8f0d1de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -351,7 +351,7 @@
},
"modifier": {
"type": "string",
"enum": ["none", "alt", "ctrl", "shift"],
"enum": ["none", "alt", "ctrl", "shift", "meta"],
"default": "shift"
},
"deepDomScan": {

View File

@ -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>

View File

@ -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;
}