I've made a working chat script, but it cant detect when the player hits return on mobile.
Basically what I'm asking is: How to detect when a mobile device presses return on their keyboard for chat?
I've already tried:
InputService.InputBegan:connect(function(Key) if Key.KeyCode == Enum.KeyCode.Return then --stuff in here end end)
And it didn't work so can someone help me?
The only time you can even get "keyboard" input on mobile is in the context of a textbox. So if the box is single-lined, one trick is to use the even FocusLost ( bool enterPressed, InputObject inputThatCausedFocusLoss )
. Otherwise, I'm sure inputbegan works.