Skip to content

Commit

Permalink
refactor add space for puley modifier key
Browse files Browse the repository at this point in the history
  • Loading branch information
g547315 committed Oct 20, 2023
1 parent d520616 commit 4926fd0
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions packages/commands/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1269,21 +1269,11 @@ export namespace CommandRegistry {
}
if (!layout.isModifierKey(key)) {
mods.push(key);
return mods.join(' ');
} else {
// for purely modifier key strings add a space so they can be matched
return mods.join(' ') + ' ';
}

// Handle the edge cases

// Handle the edge case for triggering the Alt Shift key binding
if (mods.length === 2 && mods[0] === 'Alt' && mods[1] === 'Shift') {
return 'Alt' + ' ' + 'Shift' + ' ';
}

// Handle the edge case for triggering the Alt key binding
if (mods.length === 1 && mods[0] === 'Alt') {
return 'Alt' + ' ';
}

return mods.join(' ');
}
}

Expand Down

0 comments on commit 4926fd0

Please sign in to comment.