Skip to content

Commit

Permalink
Added check for keys
Browse files Browse the repository at this point in the history
  • Loading branch information
m158261 committed Oct 19, 2023
1 parent 36fcbad commit d520616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/commands/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ export namespace CommandRegistry {
if (parts.cmd && Platform.IS_MAC) {
mods += 'Cmd ';
}
if (parts.key.trim() === '') {
if (!parts.key) {
return mods.trim();
}
return mods + parts.key;
Expand Down Expand Up @@ -1267,7 +1267,7 @@ export namespace CommandRegistry {
if (event.metaKey && Platform.IS_MAC) {
mods.push('Cmd');
}
if (!mods.includes(event.key) && !event.ctrlKey) {
if (!layout.isModifierKey(key)) {
mods.push(key);
}

Expand Down

0 comments on commit d520616

Please sign in to comment.