Variable SpecialCombosConst

SpecialCombos: {
    isAltAndControl: ((event) => ("Alt" | "Control")[]);
    isAltAndShift: ((event) => ("Alt" | "Shift")[]);
    isAltOrControl: ((event) => ("Alt" | "Control")[]);
    isAltOrShift: ((event) => ("Alt" | "Shift")[]);
    isControlAndShift: ((event) => ("Control" | "Shift")[]);
    isControlOrShift: ((event) => ("Control" | "Shift")[]);
    isDigit: ((event) => default[]);
    isFunctionKey: ((event) => string[]);
    isLetter: ((event) => string[]);
    isLowercaseLetter: ((event) => string[]);
    isMediaControl: ((event) => string[]);
    isMetaAndControl: ((event) => ("Control" | "Meta")[]);
    isMetaAndShift: ((event) => ("Shift" | "Meta")[]);
    isMetaOrControl: ((event) => ("Control" | "Meta")[]);
    isMetaOrShift: ((event) => ("Shift" | "Meta")[]);
    isModifier: ((event) => any[]);
    isNavigationKey: ((event) => string[]);
    isNonEnglishLetter: ((event) => string[]);
    isSpecialCharacter: ((event) => string[]);
    isUppercaseLetter: ((event) => string[]);
    isWhitespace: ((event) => string[]);
} = ...

A collection of functions within the KeysKey object that assess special key group combinations in key events.

The SpecialCombos object contains various methods to check for specific combinations of keys being pressed during a KeyEvent. Each method takes a KeyEvent as an argument and returns a boolean indicating whether the specific key combination is active.

Usage Example: KeysKey.SpecialCombos.isMetaAndShift(event)

Methods:

    • isAltAndControl(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Alt', 'Control'] if both Alt and Control keys are pressed, undefined otherwise.
    • isAltAndShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Alt', 'Shift'] if both Alt and Shift keys are pressed, undefined otherwise.
    • isAltKey(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Alt'] if the Alt key is pressed, undefined otherwise.
    • isAltOrShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Alt', 'Shift'] if either Alt or Shift key is pressed, undefined otherwise.
    • isControlAndShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Control', 'Shift'] if both Control and Shift keys are pressed, undefined otherwise.
    • isControlOrShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Control', 'Shift'] if either Control or Shift key is pressed, undefined otherwise.
    • isDelete(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if the Delete key is pressed, undefined otherwise.
    • isDigit(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a digit (0-9) is pressed, undefined otherwise.
    • isFunctionKey(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a function key (F1-F12) is pressed, undefined otherwise.
    • isLetter(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a letter (A-Z, a-z) is pressed, undefined otherwise.
    • isLowercaseLetter(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a lowercase letter (a-z) is pressed, undefined otherwise.
    • isMediaControl(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a media control key is pressed, undefined otherwise.
    • isMetaAndControl(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Meta', 'Control'] if both Meta and Control keys are pressed, undefined otherwise.
    • isMetaAndShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Meta', 'Shift'] if both Meta and Shift keys are pressed, undefined otherwise.
    • isMetaOrControl(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Meta', 'Control'] if either Meta or Control key is pressed, undefined otherwise.
    • isMetaOrShift(event: KeyEvent): KeysKey[] | undefined
  • Returns ['Meta', 'Shift'] if either Meta or Shift key is pressed, undefined otherwise.
    • isModifier(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a modifier key (Meta, Shift, Control, Alt) is pressed, undefined otherwise.
    • isNavigationKey(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a navigation key is pressed, undefined otherwise.
    • isNonEnglishLetter(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a non-English letter is pressed, undefined otherwise.
    • isSpecialCharacter(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a special character is pressed, undefined otherwise.
    • isUppercaseLetter(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if an uppercase letter (A-Z) is pressed, undefined otherwise.
    • isWhitespace(event: KeyEvent): KeysKey[] | undefined
  • Returns the key name if a whitespace key (space or tab) is pressed, undefined otherwise.

Type declaration

  • isAltAndControl: ((event) => ("Alt" | "Control")[])
      • (event): ("Alt" | "Control")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Alt" | "Control")[]

  • isAltAndShift: ((event) => ("Alt" | "Shift")[])
      • (event): ("Alt" | "Shift")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Alt" | "Shift")[]

  • isAltOrControl: ((event) => ("Alt" | "Control")[])
      • (event): ("Alt" | "Control")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Alt" | "Control")[]

  • isAltOrShift: ((event) => ("Alt" | "Shift")[])
      • (event): ("Alt" | "Shift")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Alt" | "Shift")[]

  • isControlAndShift: ((event) => ("Control" | "Shift")[])
      • (event): ("Control" | "Shift")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Control" | "Shift")[]

  • isControlOrShift: ((event) => ("Control" | "Shift")[])
      • (event): ("Control" | "Shift")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Control" | "Shift")[]

  • isDigit: ((event) => default[])
  • isFunctionKey: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isLetter: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isLowercaseLetter: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isMediaControl: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isMetaAndControl: ((event) => ("Control" | "Meta")[])
      • (event): ("Control" | "Meta")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Control" | "Meta")[]

  • isMetaAndShift: ((event) => ("Shift" | "Meta")[])
      • (event): ("Shift" | "Meta")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Shift" | "Meta")[]

  • isMetaOrControl: ((event) => ("Control" | "Meta")[])
      • (event): ("Control" | "Meta")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Control" | "Meta")[]

  • isMetaOrShift: ((event) => ("Shift" | "Meta")[])
      • (event): ("Shift" | "Meta")[]
      • Parameters

        • event: KeyboardEvent

        Returns ("Shift" | "Meta")[]

  • isModifier: ((event) => any[])
      • (event): any[]
      • Parameters

        Returns any[]

  • isNavigationKey: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isNonEnglishLetter: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isSpecialCharacter: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isUppercaseLetter: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

  • isWhitespace: ((event) => string[])
      • (event): string[]
      • Parameters

        Returns string[]

Generated using TypeDoc