Windows.Devices.Haptics Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides support for basic, non-directional haptic feedback such as clicks, buzzes, and rumbles that can be tuned through characteristics such as intensity and timing.
Classes
KnownSimpleHapticsControllerWaveforms |
Provides a set of well-known haptic waveform types (based on the Haptic Usage Page HID specification. |
SimpleHapticsController |
Provides access to a single haptic input device that can be used to enumerate the haptic waveforms supported by the associated input device and trigger a specific haptic response. |
SimpleHapticsControllerFeedback |
Provides access to the feedback behaviors supported by the haptic input device. |
VibrationDevice |
Provides access to a device that supports vibration notifications only. |
Enums
VibrationAccessStatus |
Specifies the access rights to the vibration device. |
Examples
The following fully functional samples demonstrate haptic features across various devices.
Pen haptics
See the Pen haptics sample for working examples of the following functionality:
- Get a SimpleHapticsController from pen input: Go from PointerPoint.PointerId to PenDevice to SimpleHapticsController (requires both a haptic-capable pen and a device that supports the pen).
- Check pen haptics capabilities: A SimpleHapticsController exposes properties for pen hardware capabilities, including IsIntensitySupported, IsPlayCountSupported, SupportedFeedback, and so on.
- Start and stop haptic feedback: Use the SendHapticFeedback and StopFeedback methods appropriately.
- Trigger haptic feedback: Feedback for both inking feedback and interaction feedback.
RadialController haptics
See the RadialController for examples of how to use haptics with RadialController devices such as the Surface Dial.
Mixed reality controller haptics
See the Spatial interaction source sample for an example of how to use haptics with Six Degree of Freedom (6DOF) Controllers on Windows Mixed Reality Desktop.