aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-05 09:47:30 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-11-11 20:34:31 +0900
commit036ede3379285cbe678d79aad3b9442dca8b31e6 (patch)
treee97e4a8a1713c7540db0d3ff82ab0964104d3bad /src/content/actions
parent4e94695c758215a950fe53911e1c1e30e47b9c98 (diff)
support mutliple modifiers for key bindings
Diffstat (limited to 'src/content/actions')
-rw-r--r--src/content/actions/setting.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/content/actions/setting.js b/src/content/actions/setting.js
index c874294..353dd24 100644
--- a/src/content/actions/setting.js
+++ b/src/content/actions/setting.js
@@ -1,9 +1,23 @@
import actions from 'content/actions';
+import * as keyUtils from 'shared/utils/keys';
const set = (value) => {
+ let maps = new Map();
+ if (value.keymaps) {
+ let entries = Object.entries(value.keymaps).map((entry) => {
+ return [
+ keyUtils.fromMapKeys(entry[0]),
+ entry[1],
+ ];
+ });
+ maps = new Map(entries);
+ }
+
return {
type: actions.SETTING_SET,
- value,
+ value: Object.assign({}, value, {
+ keymaps: maps,
+ })
};
};