diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-12 18:25:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 18:25:14 +0900 |
commit | c7b05482f33cc778e1966faa9354ea46b490a115 (patch) | |
tree | b73bc6e5a6468d8c5a1118dcfb61f9d00b1aa5cf /src/content/actions | |
parent | 3af2e3154ed6b56400d02fc3d726bfc7186f372a (diff) | |
parent | ccf3c7b421e804172827dd34a995290afc85af10 (diff) |
Merge pull request #132 from ueokande/meta-keys
Meta keys
Diffstat (limited to 'src/content/actions')
-rw-r--r-- | src/content/actions/setting.js | 16 |
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, + }) }; }; |