System Information:
Samsung Galaxy S7, though my players have reported that this happens on other devices
Reproduction:
Copy this to a LocalScript in StarterPlayerScripts
local UserInputService = game:GetService("UserInputService")
while task.wait(5) do
print(UserInputService.KeyboardEnabled)
end
Join the game on a mobile device, then chat anything - KeyboardEnabled remains set to false. Specifically press the backspace button - KeyboardEnabled gets set to true. Occurs in any textbox, not just the chat textbox.
Expected Behavior
KeyboardEnabled should remain set to false.
Actual Behavior
KeyboardEnabled gets set to true.
Workaround
I have to save the value of KeyboardEnabled locally when the player first loads in.
Issue Area: Engine Issue Type: Other Impact: Moderate Frequency: Constantly Date First Experienced: 2021-02-01 00:02:00 (-06:00) Date Last Experienced: 2022-10-07 00:10:00 (-05:00)
Any updates on this? I can confirm this is still an issue.
Edit: I use a workaround to detect for both KeyboardEnabled and NOT TouchEnabled… this helps for detecting computer, but will obviously miss those with touch screen computers… but atleast thats better than accidentally detecting all Samsung mobile devices.
Sorry for the bump, but any updates on this? I have recently release Mobile Servers for my game and it frequently checks player input. I have been receiving reports where players get falsely detected while typing in the chat. I think all of them are using an Android device.
The MouseEnabled and KeyboardEnabled API has also been very broken. The API just doesn’t seems to reflect its state accurately. Such as it stays true after keyboard / mouse is disconnected. I hope it will be investigated into as soon as possible, as it has been broken for quite a long time.
Edit: I have discovered that this is a bug on Android devices. It happens when the user is typing in a TextBox with the virtual keyboard. KeyboardEnabled will becomes true if the backspace is being pressed and if the TextBox is empty. By setting up a InputBegan listener, the UserInputType will become Keyboard and the KeyCode is Unknown. There may be other ways to trigger this bug but I think it is mostly related to the virtual keyboard and TextBoxes.