aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/setting.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/actions/setting.js')
-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,
+ })
};
};