DPad Left and Right are not bindable at ContextActionPriority.Medium

I have double verified that I have not bound anything else to these buttons by creating a new project with only the reproduction case.

Steps to reproduce:

  1. Bind an action to DPad Left or Right with Medium prio

Expected results: The action should be triggered when pressing Left or Right DPad

Actual results: The actions are never called

Work around: Bind DPad Left and Right at High prio

Code sample:

local ContextActionService 	= game:GetService("ContextActionService")

ContextActionService:BindActionAtPriority("DPadTest", 
	function(actionName, inputState, inputObj)		
		print(inputObj.KeyCode)
	end, 
	false, 
	Enum.ContextActionPriority.Medium.Value, 
	Enum.KeyCode.DPadUp,
	Enum.KeyCode.DPadDown,
	Enum.KeyCode.DPadLeft,
	Enum.KeyCode.DPadRight
)

Add the code into a localscript, start the game and press on the DPad buttons on the controller. Up and Down are printed, but not Left and Right.

7 Likes

This issue still persists today. Workaround is easy to implement, but it should be noted that the issue doesn’t only affect the Medium priority. The binds don’t work on the Low, or more importantly, Default priorities either, meaning ContextActionService:BindAction() won’t work for DPadLeft and DPadRight.

3 Likes