ControlModule fails to switch to keyboard control module on PreferredInput change

When workspace.SignalBehavior is not equal to Deferred, the ControlModule fails to switch back to the keyboard control module if the previous PreferredInput was Touch.
The reason for this is because the ControlModule:SelectComputerMovementModule() method checks (UserInputService.KeyboardEnabled or UserInputService.GamepadEnabled), and if it evaluates to false, the method returns nil. The issue is UserInputService.PreferredInput is updated before UserInputService.KeyboardEnabled (I’m also assuming TouchEnabled and GamepadEnabled as well), which means that if the workspace.SignalBehavior property is set to Immediate (and AncestryDeferred(?)) the ControlModule’s Luau code executes before the engine updates the values it’s checking.
This results in no control module being selected, and completely prevents the user from using a Keyboard (and Gamepad?).

controlModuleBug.rbxl (198.9 KB)

Thanks for the report and clear repro steps. We’re on this.

We found the issue, and there will be a fix in the coming weeks. Rest assured that this issue only affects Roblox Studio, and not end users running the client.

This should be fixed now. Let us know of any issues, thanks!