diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-11 14:13:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 14:13:52 -0400 |
commit | a1729eb9aee9426cc9b543c865a53e843ae5f487 (patch) | |
tree | 8e95d5af6546623d52c5928219758e131212495c /ext/bg/js/options.js | |
parent | 18634dca1a9cc1f0ea677f9bf0fe3971174d9d30 (diff) |
Input type filters (#806)
* Add options for scanning input types
* Move buttons in layout, refactor CSS
* Add options for input types
* Use input type filters
* Add _getMatchingInputGroupFromEvent
* Use input filters for touch events
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index ac42fc09..e61e1c48 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -491,7 +491,7 @@ class OptionsUtil { profileOptions.general.usePopupWindow = false; profileOptions.scanning.hideDelay = 0; - const {modifier, middleMouse} = profileOptions.scanning; + const {modifier, middleMouse, touchInputEnabled} = profileOptions.scanning; const scanningInputs = []; let modifierInput = ''; switch (modifier) { @@ -507,12 +507,21 @@ class OptionsUtil { } scanningInputs.push({ include: modifierInput, - exclude: '' + exclude: '', + types: {mouse: true, touch: false, pen: false} }); if (middleMouse) { scanningInputs.push({ include: 'mouse2', - exclude: '' + exclude: '', + types: {mouse: true, touch: false, pen: false} + }); + } + if (touchInputEnabled) { + scanningInputs.push({ + include: '', + exclude: '', + types: {mouse: false, touch: true, pen: true} }); } profileOptions.scanning.inputs = scanningInputs; |