KeyCode Button Assignments. A Small Guide

PLEASE NOTE: The KeyCodes for the THUMBSTICKS are INCORRECT. Do not use them.

The KeyCodes for the thumbsticks are:

Enum.KeyCode.Thumbstick1 – Left
Enum.KeyCode.Thumbstick2 – Right

Hello! As like everyone else has experienced at one time during scripting, KeyCodes for special buttons such as the controller’s trigger can be a hassle. Who knows what Enum.KeyCode.ButtonR1 does? Well, I am here to tell you!

The document included KeyCodes on the Original Oculus Touch Controllers, Oculus Touch Controllers, Oculus Quest 2 Touch Controllers, HTC Controllers, and Normal Game Controllers. Just because the controllers may not be the exact same model as in the diagram, it does not mean they will not work. Infer what the buttons would be as the other model.

Below is a full guide on all of the special KeyCodes such as ButtonR2 and where they are assigned.

Roblox KeyCode Assignments.pdf (701.9 KB)
.txt (sry that the .txt document is all messed up):
Roblox KeyCode Assignments.txt (2.2 KB)

Or if you do not want to download the .pdf, here are the pages:

I do not know if this would be to any help to anyone, but I decided to do it anyway.

Have a good day!

please note, I did not create the diagrams.


Enum.KeyCode.ButtonL3 and Enum.KeyCode.ButtonR3 are incorrect.

Please Use:

Enum.KeyCode.Thumbstick1 for the left thumbstick

Enum.KeyCode.Thumbstick2 for the right thumbstick.

I will be updating the original post soon.


Thnk you kind sir



Thank you so much! Was working on a VR system at the moment and couldn’t find the mappings for Quest.

1 Like

Thank you very much!
It’s good to have someone like you.

1 Like

Have physically tested this with my gamepad.

ButtonL3 for left and ButtonR3 for right thumbstick pressing down is correct as per the image.