@witchcraft/spellcraft
    Preparing search index...
    • Given an list of key ids, returns an array of deduped key codes. If you have a list of Keys instead use getKeyCodesFromKeys.

      Useful for when the codes must be passed to a third-party library (for example, a dragging library that takes a list modifiers).

      This properly takes a look at the key and all it's variants.

      skipIdIfHasVariants is true by default and will skip adding the key's id if it has variants as it's assumed the id is not a valid name.

      Parameters

      • keyIds: string[]
      • keys: Keys
      • opts: { skipIdIfHasVariants?: boolean } | undefined

      Returns string[]