For some reason since about 2 days ago any mousekeybind refuses to work in my game.
In studio they still work but only ingame they dont work.
Game affected: Plane Crazy | Play on Roblox
For some reason since about 2 days ago any mousekeybind refuses to work in my game.
In studio they still work but only ingame they dont work.
Game affected: Plane Crazy | Play on Roblox
Hi, thanks for the report, can you provide us a minimal repro file?
Hi there!
I cant get a repro because this happens ingame only.
To reproduce it:
Hi, can you provide more context about how you are implementing your keybind system? Are you using UIS, CAS, or IAS? Without any code it is difficult for us to diagnose the problem.
I can repro the issue though and can confirm that this is not the result of any flag flip in the past week. Is it possible that it is related to any code or updates you have made?
Im using inputbegan and it seems to be printing KeyCode.None when pressing any of the mousekeys for some reason
In studio its inputObject.KeyCode.Unknown instead of inputObject.KeyCode.None which is why its unable to properly detect mousekeys ingame.
Hi,
Thanks for getting back to me! We recently aliased Enum.KeyCode.Unknown to Enum.KeyCode.None but the old usage of Unknown should still work to reference None as an old name. Can you describe how you are encountering the issue and provide a repro file (maybe you are doing direct string comparison instead of referencing the enum values)?
The newest Studio version should also have this update. If you are using UserInputService.InputBegan, I suggest comparing directly to the InputObject.UserInputType rather than the InputObject.KeyCode property to get the mouse button hardware changes.
I use userinputtype for this already but relied on detecting Unknown to determine whether it should be userinputtype or a keycode
local Input = inputObject.KeyCode.Name
if Input == "Unknown" then
Input = inputObject.UserInputType.Name
end
local KeyInput = Keys[Input]
if KeyInput ~= nil then
Hello,
Thanks for getting back to me! Unfortunately we aren’t able to support direct string comparison of enum values with renaming KeyCode.Unknown to KeyCode.None, I suggest comparing enum values when possible to minimize the chances of breaking compatibility.
As a result, I will close this post as “can’t fix” for now, and I sincerely apologize for the issue that this caused. Please let me know if you encounter any additional issues!