as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
原生
Skip to main content
UserInputManager allows apps to override the default behavior when D-pad events are received.

Usage

The following code example show how to use addListener to register events:

Reference

Methods

UserInputManager.addListener(eventName, callback)

Deprecated: Use the useAddUserInputListenerCallback() hook instead. This method allows app to registers listener for specific event, following is a list of all supported events in Vega:

useAddUserInputListenerCallback

This custom hook returns a callback that, when invoked, registers a listener for specific event. When calling this hook, make sure to follows the established rules for hooks. For more information, seeRules of Hooks. The returned callback function takes two paramenters: the UserInputEventName to listen to, and a callback function to invoke when the desired UserInputEventName is pressed. The following is a list of all supported events in Vega:

最后修改于 2026年10月26日