# @types/is-hotkey

> TypeScript definitions for is-hotkey

Latest version **0.1.10** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/is-hotkey
pnpm add @types/is-hotkey
yarn add @types/is-hotkey
bun add @types/is-hotkey
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2023-11-21 |
| First published | 2018-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/is-hotkey
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-hotkey
- npm.io page: https://npm.io/package/@types/is-hotkey

## Recent versions

- 0.1.10 (latest) — 2023-11-21
- 0.1.7 (ts3.8) — 2021-12-24
- 0.1.5 (ts3.7) — 2021-09-02
- 0.1.3 (ts3.6) — 2021-07-06
- 0.1.2 (ts3.1) — 2020-08-31
- 0.1.1 (ts2.0) — 2018-10-08
- 0.1.9 — 2023-11-07
- 0.1.8 — 2023-10-18
- 0.1.6 — 2021-12-14
- 0.1.4 — 2021-08-22
- 0.1.0 — 2018-02-13

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-hotkey/index.d.ts)
````ts
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 | readonly string[],
    options?: HotKeyOptions,
): (event: KeyboardEventLike) => boolean;

export function isHotkey(hotkey: string | readonly string[], event: KeyboardEventLike): boolean;

export function isHotkey(
    hotkey: string | readonly string[],
    options: HotKeyOptions,
    event: KeyboardEventLike,
): boolean;

export function isCodeHotkey(hotkey: string | readonly string[]): (event: KeyboardEventLike) => boolean;
export function isCodeHotkey(hotkey: string | readonly string[], event: KeyboardEventLike): boolean;

export function isKeyHotkey(hotkey: string | readonly string[]): (event: KeyboardEventLike) => boolean;
export function isKeyHotkey(hotkey: string | readonly 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: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: none

# Credits
These definitions were written by [Alex Kondratyuk](https://github.com/lynxtaa).

---
_Source: https://npm.io/package/@types/is-hotkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
