Handler |
Description |
Events |
Data structure |
IFocusable |
Reacts to focus enter/exit |
OnFocusEnter |
|
IHoldHandler |
Reacts to hold gestures |
OnHoldStarted |
Hold EventData |
IInputClickHandler |
Reacts to simple click input |
OnInputClicked |
InputClicked EventData |
IManipulationHandler |
Reacts to manipulation gestures |
OnManipulationStarted |
Manipulation EventData |
INavigationHandler |
Reacts to navigation gestures |
OnNavigationStarted |
Navigation EventData |
ISourceStateHandler |
Reacts to source state changes |
OnSourceDetected |
SourceState EventData |
ISpeechHandler |
Reacts to speech recognition |
OnSpeechKeyword Recognized |
SpeechKeyword Recognized EventData |
InputManager provides a generic interface to various input sources supported by the HoloLens device. Notably, this includes gestures and speech. The code that implements the gesture input source is GesturesInput.
The GesturesInput class is a wrapper on top of the Unity built-in GestureRecognizer class. GestureRecognizer is part of the UnityEngine.VR.WSA.Input library, Microsoft's mixed reality Windows Store Apps input SDK. The GesturesInput is used by InputManager as the gesture input source.
The 3D UI system elements that we build in this project include scripts that illustrate using these input events.