mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(terminal) on -> onKey
This commit is contained in:
parent
715fe59ee5
commit
cd5188c71e
2 changed files with 6 additions and 2 deletions
|
|
@ -121,7 +121,9 @@ function create(createOptions) {
|
|||
Socket = socket;
|
||||
Terminal = terminal;
|
||||
|
||||
Terminal.on('key', (char, {keyCode, shiftKey}) => {
|
||||
Terminal.onKey(({domEvent}) => {
|
||||
const {keyCode, shiftKey} = domEvent;
|
||||
|
||||
if (commandExit)
|
||||
hide();
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ function create() {
|
|||
Socket = socket;
|
||||
Terminal = terminal;
|
||||
|
||||
Terminal.on('key', (char, {keyCode, shiftKey}) => {
|
||||
Terminal.onKey(({domEvent}) => {
|
||||
const {keyCode, shiftKey} = domEvent;
|
||||
|
||||
if (shiftKey && keyCode === Key.ESC) {
|
||||
hide();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue