aboutsummaryrefslogtreecommitdiff
path: root/src/background/keys.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 09:00:41 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 09:00:41 +0900
commitcd4708898134f5966f87df4aeaa8ed8c60e7943f (patch)
treedb082d9cb2ec426010556dbc24ab439c9757afbd /src/background/keys.js
parentc5529958d53146c8c6826673abe6431a19f1924d (diff)
parent9ae814dfe45426f8df9b89b305392770344a7d50 (diff)
Merge branch 'lint'
Diffstat (limited to 'src/background/keys.js')
-rw-r--r--src/background/keys.js12
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 };