0.1.10 • Published 1 year ago

@types/is-hotkey v0.1.10

Weekly downloads
113,385
License
MIT
Repository
github
Last release
1 year ago

Installation

npm install --save @types/is-hotkey

Summary

This package contains type definitions for is-hotkey (https://github.com/ianstormtaylor/is-hotkey#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-hotkey.

index.d.ts

// Type definitions for is-hotkey 0.1
// Project: https://github.com/ianstormtaylor/is-hotkey#readme
// Definitions by: Alex Kondratyuk <https://github.com/lynxtaa>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface KeyboardEventLike {
    key: string;
    which: number;
    altKey: boolean;
    ctrlKey: boolean;
    metaKey: boolean;
    shiftKey: boolean;
}

export interface HotKeyOptions {
    byKey: boolean;
}

export interface HotKey {
    which?: number | undefined;
    key?: string | undefined;
    altKey: boolean;
    ctrlKey: boolean;
    metaKey: boolean;
    shiftKey: boolean;
}

/**
 * Is hotkey?
 */
export function isHotkey(
    hotkey: string | ReadonlyArray<string>,
    options?: HotKeyOptions,
): (event: KeyboardEventLike) => boolean;

export function isHotkey(hotkey: string | ReadonlyArray<string>, event: KeyboardEventLike): boolean;

export function isHotkey(
    hotkey: string | ReadonlyArray<string>,
    options: HotKeyOptions,
    event: KeyboardEventLike,
): boolean;

export function isCodeHotkey(hotkey: string | ReadonlyArray<string>): (event: KeyboardEventLike) => boolean;
export function isCodeHotkey(hotkey: string | ReadonlyArray<string>, event: KeyboardEventLike): boolean;

export function isKeyHotkey(hotkey: string | ReadonlyArray<string>): (event: KeyboardEventLike) => boolean;
export function isKeyHotkey(hotkey: string | ReadonlyArray<string>, event: KeyboardEventLike): boolean;

/**
 * Parse.
 */
export function parseHotkey(hotkey: string, options?: HotKeyOptions): HotKey;

/**
 * Compare.
 */
export function compareHotkey(object: HotKey, event: KeyboardEventLike): boolean;

/**
 * Utils.
 */
export function toKeyCode(name: string): number;
export function toKeyName(name: string): string;

/**
 * Export.
 */
export default isHotkey;

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:34:52 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Alex Kondratyuk.

slate-react-es6@gerkensm/slate-reactslate-react-rxslatechecksub-react@baijiahei/slate-react@robmayer/slate-react@checksub/slate-reactbiz-email-editorslate-react-jonathanwbn-temp@everything-registry/sub-chunk-950shadow-slate-reactrevo-email-editortemplate-builder-editormeow-slate-reactjaisonj708-slate-reactiron-editorkolade-editorkia-easy-email-editorjasonphillips-slate-reactjasonphllips-slate-reactlakelibmater-renderodoc-editornifty-slate-reactsjq1-slate-reactslate-react-fork-fallenmaxslate-react-fork-smpptslate-react-latestslate-react-nextslate-react-rxcslate-react-wysiwygtuture-slate-react@anterostecnologia/anteros-email-editor@artibox/slate-blockquote@artibox/slate-heading@artibox/slate-image@artibox/slate-input-block@artibox/slate-toggle-mark@checksub_team/slate-react@12joan/slate-reactybai-1-easy-email-editor@duongtruongan/easy-email-editor@dylanvann/slate-react@harryhope/slate-react@edtr-io/plugin-text@kookapp/slate-react@maccman/slate-react@nekodex/slate-react@elg/slate-react@momos/easy-email-editor@makeswift/runtime@jasonphillips/slate-react@jay.kou/slate-react@moonship-fe/slate-react@quadrats/react@sanity/slate-react@rino.app/editor@ornikar/slate-react-fork@seafile/slate-react@seewo-doc/slate-react@robinedman/slate-react@dominote/slate-react@databyss-org/slate-react@pbackup/slate-reacteditable-slate-reacteasy-email-editor-ruseasy-pdf-editordropdeck-slate-react@thebluedoc/slate-react@techclass/slate-react@truongan106/easy-email-editorace-slate-reactanteros-email-editorbrain-slate-reactbricksite-slate-reactarbor-renderavizura-slate-reactdox-editor
0.1.10

1 year ago

0.1.8

1 year ago

0.1.9

1 year ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

6 years ago

0.1.0

7 years ago