From 90b83d7b7b99598834466c97e9c74c82cbd25cf3 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 4 Mar 2018 18:32:24 +0900 Subject: hide console on and --- src/content/actions/setting.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/content/actions') 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 = { + '': { type: operations.CANCEL }, + '': { 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], -- cgit v1.2.3