diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-03-04 21:38:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-04 21:38:29 +0900 |
commit | 72bf3cc2bdcc63864e064a64f7459aba004f4538 (patch) | |
tree | 4a34e2d408cd4f7d29e634b98dea2c07ca10ece9 /src/content/actions | |
parent | 0211d7781fffdb0f4e9a5e523f0f6ea24c5c8db8 (diff) | |
parent | 5cd8c81fda2f07bc6ca5b1ee9264a02fae16c5c0 (diff) |
Merge pull request #354 from ueokande/hide-console
Hide console
Diffstat (limited to 'src/content/actions')
-rw-r--r-- | src/content/actions/setting.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/content/actions/setting.js b/src/content/actions/setting.js index 0238c71..4c1e385 100644 --- a/src/content/actions/setting.js +++ b/src/content/actions/setting.js @@ -1,10 +1,17 @@ import actions from 'content/actions'; import * as keyUtils from 'shared/utils/keys'; +import operations from 'shared/operations'; + +const reservedKeymaps = { + '<Esc>': { type: operations.CANCEL }, + '<C-[>': { type: operations.CANCEL }, +}; const set = (value) => { let entries = []; if (value.keymaps) { - entries = Object.entries(value.keymaps).map((entry) => { + let keymaps = Object.assign({}, value.keymaps, reservedKeymaps); + entries = Object.entries(keymaps).map((entry) => { return [ keyUtils.fromMapKeys(entry[0]), entry[1], |