Table of Contents

Class Input

Namespace
Lime
Assembly
Lime.dll
public class Input
Inheritance
Input
Inherited Members

Constructors

Input()

public Input()

Fields

KeyRepeatDelay

public float KeyRepeatDelay

Field Value

float

KeyRepeatInterval

public float KeyRepeatInterval

Field Value

float

MaxTouches

public const int MaxTouches = 4

Field Value

int

Simulator

public readonly Input.InputSimulator Simulator

Field Value

Input.InputSimulator

Properties

Acceleration

Gets the current acceleration in g-force units. This vector is specified in the current coordinate space, which takes into account any interface rotations in effect for the device. Therefore, the value of this property may change when the device rotates between portrait and landscape orientations.

public Vector3 Acceleration { get; }

Property Value

Vector3

Changed

public bool Changed { get; }

Property Value

bool

DesktopMousePosition

The current mouse position in desktop coordinates. (read only)

public Vector2 DesktopMousePosition { get; }

Property Value

Vector2

NativeAcceleration

Gets the current acceleration in g-force units. This vector is based on the device in a "natural" orientation (portrait-up on iOS and device-specific on Android). The value is not changed when switching between orientations.

public Vector3 NativeAcceleration { get; }

Property Value

Vector3

TextInput

public string TextInput { get; }

Property Value

string

WheelScrollAmount

Indicates how much the mouse wheel was moved

public float WheelScrollAmount { get; }

Property Value

float

Methods

ConsumeKey(Key)

public void ConsumeKey(Key key)

Parameters

key Key

GetDesktopTouchPosition(int)

public Vector2 GetDesktopTouchPosition(int index)

Parameters

index int

Returns

Vector2

GetDoubleClickByIndex(int)

public static Key GetDoubleClickByIndex(int button)

Parameters

button int

Returns

Key

GetModifiers()

public Modifiers GetModifiers()

Returns

Modifiers

GetMouseButtonByIndex(int)

public static Key GetMouseButtonByIndex(int button)

Parameters

button int

Returns

Key

GetNumTouches()

public int GetNumTouches()

Returns

int

GetTouchByIndex(int)

public static Key GetTouchByIndex(int index)

Parameters

index int

Returns

Key

IsKeyPressed(Key)

Returns true while the user holds down the key identified by name. Think auto fire.

public bool IsKeyPressed(Key key)

Parameters

key Key

Returns

bool

IsMousePressed()

public bool IsMousePressed()

Returns

bool

IsMousePressed(int)

public bool IsMousePressed(int button)

Parameters

button int

Returns

bool

IsTouching(int)

public bool IsTouching(int index)

Parameters

index int

Returns

bool

WasDoubleClickPressed(int)

public bool WasDoubleClickPressed(int buttonIndex)

Parameters

buttonIndex int

Returns

bool

WasKeyPressed(Key)

Returns true during the frame the user starts pressing down the key identified by name.

public bool WasKeyPressed(Key key)

Parameters

key Key

Returns

bool

WasKeyReleased(Key)

Returns true during the frame the user releases the key identified by name.

public bool WasKeyReleased(Key key)

Parameters

key Key

Returns

bool

WasKeyRepeated(Key)

Returns true during the frame the user starts pressing down the key identified by name or key event was repeated.

public bool WasKeyRepeated(Key key)

Parameters

key Key

Returns

bool

WasMousePressed()

public bool WasMousePressed()

Returns

bool

WasMousePressed(int)

public bool WasMousePressed(int button)

Parameters

button int

Returns

bool

WasMouseReleased()

public bool WasMouseReleased()

Returns

bool

WasMouseReleased(int)

public bool WasMouseReleased(int button)

Parameters

button int

Returns

bool

WasTouchBegan(int)

public bool WasTouchBegan(int index)

Parameters

index int

Returns

bool

WasTouchEnded(int)

public bool WasTouchEnded(int index)

Parameters

index int

Returns

bool