diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-09-05 21:20:39 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-09-05 21:36:27 +0900 |
commit | faba02ec21e9848b1cdf6a6a8bf507500a34290a (patch) | |
tree | 1563735f176f7020937adba607f2b491fea0fae6 /src/content | |
parent | 428805e66f993884643136dc2d8267c53bd81588 (diff) |
Cancel follow mode and console by Ctrl-C
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/InputDriver.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/content/InputDriver.ts b/src/content/InputDriver.ts index cddc825..ec1f2cc 100644 --- a/src/content/InputDriver.ts +++ b/src/content/InputDriver.ts @@ -2,7 +2,16 @@ import * as dom from '../shared/utils/dom'; import Key, * as keys from './domains/Key'; const cancelKey = (e: KeyboardEvent): boolean => { - return e.key === 'Escape' || e.key === '[' && e.ctrlKey; + if (e.key === 'Escape') { + return true; + } + if (e.key === '[' && e.ctrlKey) { + return true; + } + if (e.key === 'c' && e.ctrlKey) { + return true; + } + return false; }; export default class InputDriver { |