aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/console/components/Console.tsx7
-rw-r--r--src/content/InputDriver.ts11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx
index 7da2f36..1743d15 100644
--- a/src/console/components/Console.tsx
+++ b/src/console/components/Console.tsx
@@ -72,6 +72,13 @@ class Console extends React.Component<Props> {
break;
case '[':
if (e.ctrlKey) {
+ e.preventDefault();
+ return this.props.dispatch(consoleActions.hideCommand());
+ }
+ break;
+ case 'c':
+ if (e.ctrlKey) {
+ e.preventDefault();
return this.props.dispatch(consoleActions.hideCommand());
}
break;
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 {