diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-09-05 12:48:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 12:48:10 +0000 |
commit | 0fc2eea7431649f85c6e5d57cca66457f24bb14d (patch) | |
tree | ff7139f8047a23011c329f1c93eb79fac234cce3 /src/console/components | |
parent | 428805e66f993884643136dc2d8267c53bd81588 (diff) | |
parent | bf9bec21461991a1e4b7581446ecfe21091a9597 (diff) |
Merge pull request #641 from ueokande/cancel-by-ctrl-c
Cancel console by Ctrl+C
Diffstat (limited to 'src/console/components')
-rw-r--r-- | src/console/components/Console.tsx | 7 |
1 files changed, 7 insertions, 0 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; |