As a workaround since the Roblox Client on iPad’s [and possibly Apple/Android] do not fire events for InputBegan or InputEnded on Bluetooth Keyboards, this module will use a hack to listen to text added into a TextBox to help support a developmental method of WASD movement and using / to chat.
iPad’s already (partially) support the use of a Bluetooth mouse to look around (cursor doesn’t lock in position when moving mouse on Right Click) but doesn’t support any key pressed except for when typing into a Text Box.
I’ve made this into a rough draft Character Control Module which checks if the player is on a Touch Device without Native Keyboard Enabled to instantly hook and listen to keypresses.
Please take advantage of uncommenting _G.iPadEnabled in the iPadHandler localscript and first asking your players if they would like to use a Bluetooth keyboard.
If a player has accepted to use a Bluetooth keyboard, simply set _G.iPadEnabled=true
If you don’t uncomment this out, a iPad or mobile device user without a Keyboard will be stuck with their Touch Keyboard always open. There is no way of telling if a device has a Bluetooth Keyboard connected so this module keeps focus onto a Text Box to look for new keys clicked so asking a Player may be the only option.
How to install
Place this script with it's Module into StarterPlayerScripts.iPadHandler.rbxm (5.3 KB)
Video
Issues
- This is very experimental, probably to only be used for developmental reasons till Roblox does support this natively as it’s not very instantanious.
- Players do need to click the W,A,S,D key multiple times to keep going in that direction as iPad’s don’t press the key multiple times if you hold it down, depending on the keyboard being used.
- When you let go of a key, it does not stop your character right away but it will stop eventually.
- This hasn’t been fully tested yet incase if a character sits onto a vehicle seat.