fix: use KeyboardEvent `key` instead of `code`

pull/5391/head
Kenyi Watanabe 2024-03-08 00:44:46 -05:00 committed by GitHub
parent d7c25df7b0
commit 20d069cff2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '';