MAIDR JavaScript API
    Preparing search index...

    Class PlatformAbstract

    Abstract utility class for platform-specific keyboard key name mappings.

    Index

    Accessors

    • get ctrl(): string

      Returns the platform-specific name for the control/command key.

      Returns string

      'command' on macOS, 'ctrl' on other platforms

    • get alt(): string

      Returns the platform-specific name for the alt/option key.

      Returns string

      'option' on macOS, 'alt' on other platforms

    • get enter(): string

      Returns the platform-specific name for the enter/return key.

      Returns string

      'return' on macOS, 'enter' on other platforms

    • get ctrlSpoken(): string

      Returns the control/command key's name as it should be spoken.

      Separate from ctrl, which yields the lower-case token hotkeys-js parses. A screen reader reads an announcement out loud, so the word has to be the one the reader would say -- capitalised, and never abbreviated to the symbol, which many voices skip entirely.

      Returns string

      The Command key's name on macOS, the Control key's on other platforms