@types/mousetrap

  • Version 1.6.15
  • Published
  • 5.25 kB
  • No dependencies
  • MIT license

Install

npm i @types/mousetrap
yarn add @types/mousetrap
pnpm add @types/mousetrap

Overview

TypeScript definitions for mousetrap

Index

Variables

variable Mousetrap

const Mousetrap: Mousetrap.MousetrapStatic;

    Interfaces

    interface ExtendedKeyboardEvent

    interface ExtendedKeyboardEvent extends KeyboardEvent {}

      property returnValue

      returnValue: boolean;

        interface MousetrapInstance

        interface MousetrapInstance {}

          property stopCallback

          stopCallback: (
          e: ExtendedKeyboardEvent,
          element: Element,
          combo: string
          ) => boolean;

            method bind

            bind: (
            keys: string | string[],
            callback: (e: ExtendedKeyboardEvent, combo: string) => void,
            action?: string
            ) => this;

              method handleKey

              handleKey: (
              character: string,
              modifiers: string[],
              e: ExtendedKeyboardEvent
              ) => void;

                method reset

                reset: () => this;

                  method trigger

                  trigger: (keys: string, action?: string) => this;

                    method unbind

                    unbind: (keys: string | string[], action?: string) => this;

                      interface MousetrapStatic

                      interface MousetrapStatic {}

                        property stopCallback

                        stopCallback: (
                        e: ExtendedKeyboardEvent,
                        element: Element,
                        combo: string
                        ) => boolean;

                          method addKeycodes

                          addKeycodes: (keycodes: { [key: number]: string }) => void;

                            method bind

                            bind: (
                            keys: string | string[],
                            callback: (e: ExtendedKeyboardEvent, combo: string) => boolean | void,
                            action?: string
                            ) => MousetrapInstance;

                              method reset

                              reset: () => MousetrapInstance;

                                method trigger

                                trigger: (keys: string, action?: string) => MousetrapInstance;

                                  method unbind

                                  unbind: (keys: string | string[], action?: string) => MousetrapInstance;

                                    construct signature

                                    new (el?: Element): MousetrapInstance;

                                      call signature

                                      (el?: Element): MousetrapInstance;

                                        Package Files (1)

                                        Dependencies (0)

                                        No dependencies.

                                        Dev Dependencies (0)

                                        No dev dependencies.

                                        Peer Dependencies (0)

                                        No peer dependencies.

                                        Badge

                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/mousetrap.

                                        • Markdown
                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/mousetrap)
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/@types/mousetrap"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>