Methods
Input.clear(key: string?, clear_down: boolean?)
Arguments:
key: string? | |
clear_down: boolean? |
Returns:
1: boolean|nil |
Input.getBoundKeys(key: string, gamepad: boolean?)
Arguments:
key: string | |
gamepad: boolean? |
Returns:
1: (string|string[])[]|nil |
Input.getControllerType()
return #1:
| "switch"
| "ps4"
| "xbox"
Returns:
1: "ps4"|"switch"|"xbox"|nil |
Input.getCurrentCursorPosition(x: number?, y: number?, relative: boolean?)
Arguments:
x: number? | |
y: number? | |
relative: boolean? |
Returns:
x: number | |
y: number |
Input.getGamepadCursorPosition(x: number?, y: number?, relative: boolean?)
Arguments:
x: number? | |
y: number? | |
relative: boolean? |
Returns:
x: number | |
y: number |
Input.getMousePosition(x: number?, y: number?, relative: boolean?)
Arguments:
x: number? | |
y: number? | |
relative: boolean? |
Returns:
x: number | |
y: number |
Input.getPrimaryBind(alias: string, gamepad: boolean?)
Arguments:
alias: string | |
gamepad: boolean? |
Returns:
1: string|string[]|nil |
Input.getText(alias: string, gamepad: boolean?)
Arguments:
alias: string | |
gamepad: boolean? |
Returns:
1: string |
Input.getTexture(alias: string, gamepad: boolean?)
Arguments:
alias: string | |
gamepad: boolean? |
Returns:
1: love.Image |
Input.getThumbstick(stick: "left"|"right", raw: boolean?)
stick:
| "left"
| "right"
Arguments:
stick: "left"|"right" | |
raw: boolean? |
Returns:
x: number | |
y: number |
Input.isThumbstick(key: string, which: ("left"|"right")?)
which:
| "left"
| "right"
Arguments:
key: string | |
which: ("left"|"right")? |
Returns:
1: boolean |
Input.keyPressed(key: string, repeatable: boolean?)
Arguments:
key: string | |
repeatable: boolean? |
Returns:
1: boolean |
Input.pressed(key: string, repeatable: boolean?)
Arguments:
key: string | |
repeatable: boolean? |
Returns:
1: boolean |
Input.setBind(alias: string, index: number, key: string, gamepad: boolean?)
Arguments:
alias: string | |
index: number | |
key: string | |
gamepad: boolean? |
Returns:
1: boolean |
Input.shouldProcess(key: string, repeatable: boolean?)
Arguments:
key: string | |
repeatable: boolean? |
Returns:
1: boolean |