> For the complete documentation index, see [llms.txt](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/classes/input.md).

# Input

Built-in Input library.

### Static Functions:

#### .IsKeyDown

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

| Argument | Type                                                           | Description |
| -------- | -------------------------------------------------------------- | ----------- |
| key      | [VirtualKey](/sleeping-dogs-de-script-api/enums.md#virtualkey) | -           |

Returns true if key is currently pressed.

#### .GetKeyDownDuration

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

| Argument | Type                                                           | Description |
| -------- | -------------------------------------------------------------- | ----------- |
| key      | [VirtualKey](/sleeping-dogs-de-script-api/enums.md#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.
