The Unknown
key code is able to fire actions bound to Space
key code. Paste the following code example in a local script in a baseplate, play solo and press Space- it will print correctly. Then press escape to open Roblox menu- this will print Enum.KeyCode.Unknown
.
game.ContextActionService:BindActionAtPriority("Wheelie", function(actionName, state, input)
print(input.KeyCode)
if input.KeyCode == Enum.KeyCode.Space then
if state == Enum.UserInputState.Begin then
return Enum.ContextActionResult.Sink
elseif state == Enum.UserInputState.End then
return Enum.ContextActionResult.Sink
end
return Enum.ContextActionResult.Pass
end
end,false, 2001, Enum.KeyCode.Space)