useEscapeKeydown

Listens for Escape key presses and invokes a callback.

Attaches a global keydown listener that invokes a callback when the Escape key is pressed. The listener is automatically cleaned up when the component unmounts.

Import#

import { useEscapeKeydown } from '@volue/wave-react';

Example#


API Reference#

Arguments#

Prop
Type
Default
onEscapeKeyDown
(event: KeyboardEvent) => void

Returns#

void