Methods


Input.alt()

Returns:

1: boolean


Input.clear(key: string?, clear_down: boolean?)

Arguments:

key: string?
clear_down: boolean?

Returns:

1: boolean|nil


Input.ctrl()

Returns:

1: boolean


Input.down(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.getBoundKeys(key: string, gamepad: boolean?)

Arguments:

key: string
gamepad: boolean?

Returns:

1: (string|string[])[]|nil


Input.getButtonSprite(button: string)

Arguments:

button: string

Returns:

1: string


Input.getButtonTexture(button: string)

Arguments:

button: string

Returns:

1: love.Image


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.gui()

Returns:

1: boolean




Input.is(alias: string, key: string)

Arguments:

alias: string
key: string

Returns:

1: boolean


Input.isCancel(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.isConfirm(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.isGamepad(key: string)

Arguments:

key: string

Returns:

gamepad: boolean
button: string


Input.isMenu(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.isThumbstick(key: string, which: ("left"|"right")?)

which:
    | "left"
    | "right"

Arguments:

key: string
which: ("left"|"right")?

Returns:

1: boolean


Input.keyDown(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.keyPressed(key: string, repeatable: boolean?)

Arguments:

key: string
repeatable: boolean?

Returns:

1: boolean


Input.keyReleased(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.keyUp(key: string)

Arguments:

key: string

Returns:

1: boolean




Input.onKeyPressed(key: string, is_repeat: boolean)

Arguments:

key: string
is_repeat: boolean


Input.onKeyReleased(key: string)

Arguments:

key: string




Input.orderedNumberToKey(number: number)

Arguments:

number: number

Returns:

1: string


Input.pressed(key: string, repeatable: boolean?)

Arguments:

key: string
repeatable: boolean?

Returns:

1: boolean


Input.released(key: string)

Arguments:

key: string

Returns:

1: boolean


Input.resetBinds(gamepad: boolean?)

Arguments:

gamepad: boolean?




Input.setBind(alias: string, index: number, key: string, gamepad: boolean?)

Arguments:

alias: string
index: number
key: string
gamepad: boolean?

Returns:

1: boolean


Input.shift()

Returns:

1: boolean


Input.shouldProcess(key: string, repeatable: boolean?)

Arguments:

key: string
repeatable: boolean?

Returns:

1: boolean


Input.up(key: string)

Arguments:

key: string

Returns:

1: boolean







Fields





Input.connected_gamepad: love.Joystick

Represents a physical joystick.

Open in Browser
























Undocumented