Skip to content

Two Feature Requests #27

@sysl-dev

Description

@sysl-dev

An option to have it try to reload the joystick selected on a timer (That way if you plug in a remote later it will refresh)

An option to get the current joystick for your current configuration

local baton = require 'baton'

local input = baton.new {
  controls = {
    left = {'key:left', 'key:a', 'axis:leftx-', 'button:dpleft'},
    right = {'key:right', 'key:d', 'axis:leftx+', 'button:dpright'},
    up = {'key:up', 'key:w', 'axis:lefty-', 'button:dpup'},
    down = {'key:down', 'key:s', 'axis:lefty+', 'button:dpdown'},
    action = {'key:x', 'button:a'},
  },
  pairs = {
    move = {'left', 'right', 'up', 'down'}
  },
  joystick = love.joystick.getJoysticks()[1],
}

Something like

input.joystick

or

input:getJoystick()

I'm sure I'll add it at some point, but it never hurts to ask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions