Custom Chat: Mobile

So, I’m well on my way into making a custom chat. Everything is pretty set on PC right now, and so I started trying to integrate mobile. Unfortunately, the soft keyboard is absolutely atrocious and slow. My inputs don’t get recorded half the time. On top of that, I get this huge offset upon TextBox:CaptureFocus(), whose cause I don’t understand at all, because it doesn’t seem consistent among different games.



What’s more, Roblox doesn’t seem to have the tools to allow developers to create their own soft keyboards in their games. So…does anyone have any clue what I should do here?

1 Like

Nope! Unfortunately Roblox doesn’t have an API for disabling the keyboard built into the mobile operating system. I do know that there is an API that allows you to chat, and then send it through Roblox’s chat, but be sure to filter your text, and if this API does exist, it would be in ChatService.

The only problem is, the API that Roblox gives you is a little bit messy in my opinion:

I have seen fully custom chats done before, and maybe you can do

if UserInputService.TouchEnabled then
-- Hide Chat with Roblox SetCoreGUIEnabled
end

And your custom chat button can be fully RobloxUI Based.

Roblox does have an example with 3D Keyboards here, and maybe you can take that idea but make it UI.

Yeah, I thought about maybe allowing mobile players to use the Roblox default chat and allowing PC players to use the custom, but I’d have to actually pull Roblox’s chat bar out of their system and reimplement it to work with mine–and that would just be a shot in the dark: it may still not work quite right. Not to mention, laptops with touch screens can register as either mobile/PC at a whim, making a seamless, polished switch between the systems very challenging.

I thought I had determined a few days ago there was no way I could make my own keyboard, but I’m actually blanking as to the reason why (outside of it being a bummer for people who like localization features). If I forgo TextBoxes for input, I could probably make it work well enough with sufficient patience and time. For now, I’ll skip this, but I may revisit it later. Thanks for the feedback.

UserInputService.KeyboardEnabled should do the trick to fix this.

Mobile devices can have bluetooth/attachable keyboards as well. There’s just no way to certainly tell what device someone is using via their inputs.