aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-05-25 20:56:08 -0700
committerAlex Yatskov <alex@foosoft.net>2017-05-25 20:56:08 -0700
commit618a3cb319c247c7196b1b83389d5f43241ab0c6 (patch)
treea617adbb35be0645e20e96c62170e89b73d15d48 /ext/bg/js/util.js
parent9aeb807d4b40717f0eef50de9b456ddaa08fbadd (diff)
support variable modifier keys, fixes #5
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 413fbaca..75833871 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -108,12 +108,12 @@ function optionsSetDefaults(options) {
},
scanning: {
- requireShift: true,
middleMouse: true,
selectText: true,
alphanumeric: true,
delay: 15,
- length: 10
+ length: 10,
+ modifier: 'shift'
},
dictionaries: {},
@@ -149,10 +149,10 @@ function optionsSetDefaults(options) {
function optionsVersion(options) {
const fixups = [
- () => { },
- () => { },
- () => { },
- () => { },
+ () => {},
+ () => {},
+ () => {},
+ () => {},
() => {
if (options.general.audioPlayback) {
options.general.audioSource = 'jpod101';
@@ -162,6 +162,13 @@ function optionsVersion(options) {
},
() => {
options.general.showGuide = false;
+ },
+ () => {
+ if (options.scanning.requireShift) {
+ options.scanning.modifier = 'shift';
+ } else {
+ options.scanning.modifier = 'none';
+ }
}
];