Merge pull request #5391 from kehwar/patch-1
fix: use KeyboardEvent `key` instead of `code`pull/5383/head^2
commit
961ee18164
|
@ -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