• Normalize a keystroke into a canonical representation.


    • keystroke: string

      The keystroke of interest.

    Returns string

    The normalized representation of the keystroke.


    This normalizes the keystroke by removing duplicate modifiers and extra primary keys, and assembling the parts in a canonical order.

    The Cmd modifier is ignored on non-Mac platforms.