Skip to content

Commit

Permalink
Merge pull request #106 from github/hotkey-extend-sequence
Browse files Browse the repository at this point in the history
Make `NormalizedHotkeyString` extend `NormalizedSequenceString`
  • Loading branch information
iansan5653 committed Oct 12, 2023
2 parents b3ba694 + 402ae34 commit dd45427
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hotkey.ts
@@ -1,3 +1,5 @@
import {NormalizedSequenceString} from './sequence'

const normalizedHotkeyBrand = Symbol('normalizedHotkey')

/**
Expand All @@ -17,7 +19,7 @@ const normalizedHotkeyBrand = Symbol('normalizedHotkey')
* "Control+s" // Control modifier plus letter
* "Control+Alt+Delete" // Multiple modifiers
*/
export type NormalizedHotkeyString = string & {[normalizedHotkeyBrand]: true}
export type NormalizedHotkeyString = NormalizedSequenceString & {[normalizedHotkeyBrand]: true}

/**
* Returns a hotkey character string for keydown and keyup events.
Expand Down

0 comments on commit dd45427

Please sign in to comment.