Skip to content

Commit

Permalink
fix: single key cannot be a hotkey (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed May 8, 2024
1 parent d1fa49e commit 07dc19a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tauri/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const isModifierKey = (key: string): boolean => {

export function isMissingNormalKey(hotkey: string): boolean {
const tokens = hotkey.split('+').map((token) => token.trim().toUpperCase())
return tokens.length === 1 || tokens.every((token) => isModifierKey(token))
return tokens.every((token) => isModifierKey(token))
}

export async function bindHotkey(oldHotKey?: string) {
Expand Down

0 comments on commit 07dc19a

Please sign in to comment.