How do I know when this VR button is pressed?

Ok so I’m messing with the VR API and I want to know when the certain button is pressed.

I tried UserInputService but I couldn’t find anything.
5b4c70c740ac68a5cd0d5ccef9176acc3076432a_2_690x388

2 Likes

Roblox doesn’t explicitly state the KeyCodes for the VR, but we do know they work in Roblox which means they need to have some kind of KeyCode that they trigger.

If you have a VR, I’d set up a InputBegan connection to UserInputService, print the keycode by doing the input.KeyCode when you press a certain button in VR- record all the buttons’ keycodes and boom.

If you don’t, I heard they work just like a controller PS/Xbox, I just don’t know which buttons they resemble.

Example:

local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input, processed)
     print(input.KeyCode)
end
5 Likes

I’m late but hopefully this diagram helps

I’ve made this picture to help me memorize the keys

this is assuming that
VRService:SetTouchpadMode(Enum.VRTouchpad.Left,Enum.VRTouchpadMode.ABXY)
VRService:SetTouchpadMode(Enum.VRTouchpad.Right,Enum.VRTouchpadMode.VirtualThumbstick)

2 Likes

I own a Vive but a lot of people own Oculus Rifts and Quests, so the supply is Vive but the demand is Oculus. Do you have a diagram for Oculus?

1 Like

Sorry for necro, but the diagram for Vive works for Oculus, minus the touchpad.
The touchpads are thumbsticks, and thats all you need to change!