Input
Updated: Dec 9, 2025
Meta Horizon OS supports a range of input methods, including controllers, hands, gamepad, keyboard, mouse, and stylus.
Targeted inputs include controllers, hands, mouse, and stylus, which send Android motion events to apps when they hover over a panel or perform selection actions (such as pulling a controller trigger, or pinching thumb and index fingers together).
Untargeted inputs include keyboard and gamepad, which send standard Android input events to the panel that currently has input focus.
Pressing the B or Y buttons on controllers is functionally the same as pressing the back button on Android devices. However, if back navigation is crucial for your use case, supply a button in the app itself, because there is no hand tracking input for back navigation, and users may not be aware that they can navigate back with controller buttons.
The default Android behavior for scroll events uses joystick input to scroll the Views in the app’s window (if the Views are scrollable). However, you may want to handle joystick input differently to mimic a gamepad or other device. To do so, you need to override the View’s onGenericMotionEvent() handler and read the X and Y joystick values from the AXIS_HSCROLL and AXIS_VSCROLL axes. However, there are limitations:
- This will only work for one controller at a time. You can’t get raw joystick poses from both controllers at the same time.
- This will only work if the controller’s ray is hovering over the 2D app. You can’t capture all input since the controller is a targeted input device, unlike a gamepad which is untargeted (focus-based).