Skip to content

VirtualInput ​

Inherits Instance.

A service: the global VirtualInput is the game's one VirtualInput.

Methods ​

  • SendGamepadAxisEvent(gamepad: EnumUserInputType, keyCode: EnumKeyCode, position: Vector3): ()
  • SendGamepadButtonEvent(gamepad: EnumUserInputType, keyCode: EnumKeyCode, isDown: boolean): ()
  • SendKeyEvent(isPressed: boolean, keyCode: EnumKeyCode, isRepeatedKey: boolean?, layerCollector: Instance?): ()
  • SendMouseButtonEvent(x: number, y: number, mouseButton: number, isDown: boolean, layerCollector: Instance?, repeatCount: number?): ()
  • SendMouseMoveEvent(x: number, y: number, layerCollector: Instance?): ()
  • SendMouseWheelEvent(x: number, y: number, isForwardScroll: boolean, layerCollector: Instance?): ()
  • SendTextInputCharacterEvent(text: string, layerCollector: Instance?): ()
  • SendTouchEvent(touchId: number, userInputState: EnumUserInputState, x: number, y: number): ()

Inherited ​

From Instance: AddTag, AncestryChanged, Archivable, AttributeChanged, Changed, ChildAdded, ChildRemoved, ClassName, ClearAllChildren, Clone, DescendantAdded, DescendantRemoving, Destroy, Destroying, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, GetDescendants, GetFullName, GetPropertyChangedSignal, GetTags, HasTag, IsA, IsAncestorOf, IsDescendantOf, IsPropertyModified, Name, Parent, QueryDescendants, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild.

Apache License 2.0