Skip to content

Commit

Permalink
Merge pull request #5391 from kehwar/patch-1
Browse files Browse the repository at this point in the history
fix: use KeyboardEvent `key` instead of `code`
  • Loading branch information
tugcekucukoglu authored Mar 13, 2024
2 parents 139250e + 20d069c commit 961ee18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/terminal/Terminal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit 961ee18

Please sign in to comment.