onEscapeKeyPressed fires when the shopper presses the literal Escape key while the element (or one of its sub-fields) has focus. Use it to close your own modals, blur the input, or restore prior UI state.
Payload
elementType.
Example
The SDK does not preventDefault()
Default browser behavior (for example, dismissing a native autofill panel) is preserved. Merchants own the response.
Not emitted by wallets or submitButton
applePay, googlePay, and submitButton do not emit this event. The event key is omitted from their event map, so subscribing is a TypeScript error and a runtime no-op (with a console warning).
- Wallets render inside their own rendering surface, whose native payment sheet captures keystrokes once open.
submitButtonhas no shopper-dismissable input.
onExit instead.
Per-element wiring
- Fires once per keypress on
email,phone,fullName,billingAddress,shippingAddress,checkout, and manual-modebank, regardless of which sub-field had focus. bankfires only in manual mode. Plaid opens an external modal that handles Escape on its own.cardis best-effort: Escape fires inside the holder-name and postal-code inputs, but not inside the card number, expiration, or security code fields.