Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
iansan5653 committed Dec 7, 2023
1 parent ff178c5 commit fcedce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotkey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {NormalizedSequenceString} from './sequence.js'
import {macosSymbolLayerKeys} from './macos-symbol-layer.js'
import {macosUppercaseLayerKeys} from './macos-uppercase-layer'
import {macosUppercaseLayerKeys} from './macos-uppercase-layer.js'

const normalizedHotkeyBrand = Symbol('normalizedHotkey')

Expand Down Expand Up @@ -95,12 +95,12 @@ function localizeMod(hotkey: string, platform: string = navigator.platform): str

function sortModifiers(hotkey: string): string {
const key = hotkey.split('+').pop()
const modifiers = []
const modifiers: string[] = []
for (const modifier of ['Control', 'Alt', 'Meta', 'Shift']) {
if (hotkey.includes(modifier)) {
modifiers.push(modifier)
}
}
modifiers.push(key)
if (key) modifiers.push(key)
return modifiers.join('+')
}

0 comments on commit fcedce0

Please sign in to comment.