PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

OnScreenKeyboardPosition

UserInputService

Vector2

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

The code snippet below prints the position of the keyboard.

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

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

On screen keyboard

See also

  • UserInputService/OnScreenKeyboardVisible
  • UserInputService/OnScreenKeyboardSize

Code Samples


UserInputService.OnScreenKeyboardPosition

This example prints the position of the player’s on-screen keyboard.

local UserInputService = game:GetService("UserInputService")

print(UserInputService.OnScreenKeyboardPosition)