0.1.10 • Published 5 months ago

@types/is-hotkey v0.1.10

Weekly downloads
113,385
License
MIT
Repository
github
Last release
5 months 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-950iron-editorjasonphillips-slate-reactjasonphllips-slate-reactmater-render@artibox/slate-blockquote@artibox/slate-heading@artibox/slate-image@artibox/slate-input-block@artibox/slate-toggle-mark@checksub_team/slate-react@databyss-org/slate-react@dominote/slate-react@duongtruongan/easy-email-editor@dylanvann/slate-react@edtr-io/plugin-text@elg/slate-react@harryhope/slate-react@jay.kou/slate-react@jasonphillips/slate-reactodoc-editorkia-easy-email-editornifty-slate-reactmeow-slate-reactrevo-email-editorshadow-slate-reactslate-react-fork-fallenmaxslate-react-fork-smpptslate-react-latestslate-react-nextslate-react-rxcslate-react-wysiwygslate-reactsjq1-slate-reacttemplate-builder-editortuture-slate-reactybai-1-easy-email-editor@12joan/slate-react@anterostecnologia/anteros-email-editor@maccman/slate-react@makeswift/runtime@quadrats/react@robinedman/slate-react@rino.app/editor@sanity/slate-react@seafile/slate-react@seewo-doc/slate-react@ornikar/slate-react-fork@pbackup/slate-react@momos/easy-email-editor@moonship-fe/slate-react@nekodex/slate-react@techclass/slate-react@thebluedoc/slate-reactarbor-renderavizura-slate-reactbricksite-slate-reactbrain-slate-react@truongan106/easy-email-editoranteros-email-editorace-slate-reacteasy-pdf-editoreditable-slate-reacteasy-email-editor-rusdropdeck-slate-reactdox-editor
0.1.10

5 months ago

0.1.8

7 months ago

0.1.9

6 months ago

0.1.7

2 years ago

0.1.6

2 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

6 years ago