diff options
Diffstat (limited to 'src/background/keys.js')
-rw-r--r-- | src/background/keys.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/background/keys.js b/src/background/keys.js index 8d75aba..9121e0f 100644 --- a/src/background/keys.js +++ b/src/background/keys.js @@ -30,28 +30,26 @@ const defaultKeymap = { 'F': { type: operations.FOLLOW_START, newTab: true }, 'H': { type: operations.HISTORY_PREV }, 'L': { type: operations.HISTORY_NEXT }, -} +}; const asKeymapChars = (keys) => { return keys.map((k) => { let c = String.fromCharCode(k.code); if (k.ctrl) { return '<C-' + c.toUpperCase() + '>'; - } else { - return c } + return c; }).join(''); -} +}; const asCaretChars = (keys) => { return keys.map((k) => { let c = String.fromCharCode(k.code); if (k.ctrl) { return '^' + c.toUpperCase(); - } else { - return c; } + return c; }).join(''); -} +}; export { defaultKeymap, asKeymapChars, asCaretChars }; |