Merge pull request #5391 from kehwar/patch-1

fix: use KeyboardEvent `key` instead of `code`
pull/5383/head^2
Tuğçe Küçükoğlu 2024-03-13 14:10:41 +03:00 committed by GitHub
commit 961ee18164
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();
},
onKeydown(event) {
if ((event.code === 'Enter' || event.code === 'NumpadEnter') && this.commandText) {
if (event.key === 'Enter' && this.commandText) {
this.commands.push({ text: this.commandText });
TerminalService.emit('command', this.commandText);
this.commandText = '';