support mutliple modifiers for key bindings
This commit is contained in:
parent
4e94695c75
commit
036ede3379
11 changed files with 75 additions and 75 deletions
|
@ -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,
|
||||
})
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue