lovr.headset.wasPressed

Returns whether a button on a device was pressed this frame.

pressed = lovr.headset.wasPressed(device, button)

Arguments

NameTypeDescription
deviceDevice The device.
buttonDeviceButton The button to check.

Returns

NameTypeDescription
pressedboolean Whether the button on the device was pressed this frame.

Notes

Some headset backends are not able to return pressed/released information. These drivers will always return false for lovr.headset.wasPressed and lovr.headset.wasReleased.

Typically the internal lovr.headset.update function will update pressed/released status.

See also