# isModifierKey

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

```ts
function isModifierKey(key): boolean;
```

Defined in: [parse.ts:272](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/parse.ts#L272)

Checks if a string is a recognized modifier token (including aliases).

For a `KeyboardEvent`, use `isModifierKey(normalizeKeyName(event.key))`:
`event.key` can be missing on events that autofill and extensions send. DOM
spellings like `OS` and `Win` are in the same alias table. `AltGraph` is not.

## Parameters

### key

[`Key`](../type-aliases/Key.md) \| `string` & `object`

Key name or alias (e.g. from a hotkey string or `event.key`)

## Returns

`boolean`

True if the string is a recognized modifier
