PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

OnScreenKeyboardSize

UserInputService

Vector2

This property describes the size of the on-screen keyboard in pixels. The keyboard’s size is DataType/Vector2|Vector2.new(0, 0) when it is not UserInputService/OnScreenKeyboardVisible|visible.

The code snippet below prints the size of the keyboard.

local userInputService = game:GetService("UserInputService")
print(userInputService.OnScreenKeyboardSize)

As UserInputService is client-side only, this property can only be used in a LocalScript.

On screen keyboard

See also

  • UserInputService/OnScreenKeyboardVisible
  • UserInputService/OnScreenKeyboardPosition