# resolveHotkeyAlternates

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

```ts
function resolveHotkeyAlternates<T>(hotkey, platform?): PlatformHotkeyEntries<NonNullable<T>>[];
```

Defined in: [alternates.ts:62](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/alternates.ts#L62)

Resolves the hotkeys of a hotkey object for one platform that come after
the one labels show: `resolveHotkeys` without its first hotkey. A hotkey
without alternates returns an empty array.

Call this to list the alternates next to a label, such as in a cheat
sheet. Where the platform has only alternates, the first of them is the
label, so it is not in this list.

## Type Parameters

### T

`T`

## Parameters

### hotkey

`T`

A hotkey object, or any other hotkey

### platform?

[`HotkeyPlatform`](../type-aliases/HotkeyPlatform.md) = `...`

The target platform. Defaults to auto-detection.

## Returns

[`PlatformHotkeyEntries`](../type-aliases/PlatformHotkeyEntries.md)\<`NonNullable`\<`T`\>\>[]

## Example

```ts
const redo = {
  default: 'Mod+Y',
  mac: 'Mod+Shift+Z',
  alternates: [{ default: 'Mod+Shift+Z', mac: null }],
} as const
resolveHotkeyAlternates(redo, 'windows') // ['Mod+Shift+Z']
resolveHotkeyAlternates(redo, 'mac') // []
resolveHotkeyAlternates({ default: null, alternates: ['F1', 'F2'] }, 'mac') // ['F2']
```
