Skip to content

Commit

Permalink
Merge pull request #1187 from surajbobade/mod-key-issue-#1185
Browse files Browse the repository at this point in the history
fix: show ctrl as mod button in shortcut modal for windows devices
  • Loading branch information
manojVivek authored Jan 22, 2024
2 parents 47f9827 + 43388c7 commit ba4dd5e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ interface Props {
const ShortcutButton = ({ text }: Props) => {
const btnText = text[0].split('+');
const btnTextLength = btnText.length - 1;

const formatText = (value: string) => {
if (value === 'mod') return `⌘`;
if (value === 'mod') {
if (navigator?.userAgent?.includes('Windows')) {
return `Ctrl`;
}
return `⌘`;
}

if (value.length === 1) return value.toUpperCase();
return value;
};
Expand Down

0 comments on commit ba4dd5e

Please sign in to comment.