fix: use KeyboardEvent `key` instead of `code`
parent
d7c25df7b0
commit
20d069cff2
|
@ -44,7 +44,7 @@ export default {
|
||||||
this.$refs.input.focus();
|
this.$refs.input.focus();
|
||||||
},
|
},
|
||||||
onKeydown(event) {
|
onKeydown(event) {
|
||||||
if ((event.code === 'Enter' || event.code === 'NumpadEnter') && this.commandText) {
|
if (event.key === 'Enter' && this.commandText) {
|
||||||
this.commands.push({ text: this.commandText });
|
this.commands.push({ text: this.commandText });
|
||||||
TerminalService.emit('command', this.commandText);
|
TerminalService.emit('command', this.commandText);
|
||||||
this.commandText = '';
|
this.commandText = '';
|
||||||
|
|
Loading…
Reference in New Issue