TVEventHandler

Subscribe to remote control key events on TV platforms.

TV relevance: TV-specific API. Primary low-level event subscription surface for TV remote input.


Remote Events On Web TV

react-native-web-tv includes built-in TV focus navigation (LRUD) and remote input handling for browser-based TV environments.

TVEventHandler is the low-level event stream for custom handling (for example global shortcuts or app-specific Back/Menu behavior).

ℹ️ Note: Your app or host platform must register remote keys (arrow, OK/Enter, Back, Menu) so those key events reach the browser. Once key delivery is configured, no additional remote-event library is required.

For configuration and advanced usage, see the TV Navigation documentation.


TVEventHandler exposes a low-level listener API for hardware remote events.

import { TVEventHandler } from 'react-native';

const subscription = TVEventHandler.addListener((event) => {
console.log(event.eventType);
});

// Later
subscription.remove();

API

Static methods

addListener (callback: (event: TVRemoteEvent) => void) => EventSubscription

Registers a TV remote event listener and returns an EventSubscription with a remove() method.

TVRemoteEvent

eventType string

Event name emitted by the remote input pipeline (for example directional press events).

eventKeyAction ?string

Optional action value attached to the event payload.

tag ?number

Optional node tag associated with the current focus target.

target ?number

Optional native target id associated with the event.

body ?any

Optional platform-specific payload.


Updated
React Native Web for TVPortions Copyright © Nicolas Gallagher, Meta Platforms, Inc., Facebook, Inc. and affiliates, and other contributors as noted in file headers and THIRD_PARTY_NOTICES.md. Modifications and TV extensions Copyright © Harpreet Singh and contributors.