---
description: Built-in Input library.
---

# Input

### Static Functions:

#### .IsKeyDown

`Input.IsKeyDown(key: VirtualKey)`: boolean

| Argument | Type                                 | Description |
| -------- | ------------------------------------ | ----------- |
| key      | [VirtualKey](../../enums#virtualkey) | -           |

Returns true if key is currently pressed.

#### .GetKeyDownDuration

`Input.GetKeyDownDuration(key: VirtualKey)`: boolean

| Argument | Type                                 | Description |
| -------- | ------------------------------------ | ----------- |
| key      | [VirtualKey](../../enums#virtualkey) | -           |

Returns float value in seconds for how long is key pressed, if key is not pressed the value will be -1.0

#### .GetMousePosition

`Input.GetMousePosition()`: Vector2

Returns Vector2 object which contains mouse position relative to game window.
