How do people create binds for xbox and mobile with contextactionservice?

ive seen it before im pretty sure, but how do people use context action service to add binds for xbox and mobile?

ContextActionService:BindAction() takes in a parameter for a mobile button, as well as a tuple of parameters in the end which can be UserInputTypes and KeyCodes. (UserInputTypes include touch actions)

how do they find what device the player is on?
like if they are on xbox or something change the keybinds to xbox keybinds

here are all keycodes of roblox, controller buttons are at the bottom

1 Like