Skip to content

simulateKeyPress

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/packages/ui-core/src/test-helpers.ts

Helper to simulate keyboard events

Signature

ts
function simulateKeyPress(element: HTMLElement, key: string, options: Partial<KeyboardEventInit>): void

Parameters

NameType
elementHTMLElement
keystring
optionsPartial<KeyboardEventInit>

Returns: void

Was this page helpful?

Download as PDF