Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Allen M." <ase1592@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: adding xpad support for PS-PC Smart Joypad
Date: Sat, 16 Jan 2016 10:34:53 -0800	[thread overview]
Message-ID: <20160116183453.GC9203@dtor-ws> (raw)
In-Reply-To: <CAPMSj_HSv_cYc+fk8-j-7DDrkcE8OtV=962_ytOhJPrEgyToGw@mail.gmail.com>

On Fri, Jan 15, 2016 at 08:18:03PM -0600, Allen M. wrote:
> On Fri, Jan 15, 2016 at 6:43 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > Hi Allen,
> >
> > On Fri, Jan 15, 2016 at 9:42 AM, Allen M. <ase1592@gmail.com> wrote:
> >> Hello, I have a Playstation 1 to USB device I'd like to request to be added
> >> as an xpad supported device. verbose lsusb output for the device can be
> >> found here: http://ix.io/nq3
> >>
> >> The device currently works fine as a generic joystick. However, it needs
> >> the MAP_DPAD_AS_BUTTONS option in order for it to be used with a dance pad.
> >> Let me know if I need to do anything further or if I need to provide more
> >> info for the device.
> >
> > This looks like a generic HID device, not Xbox device, so xpad driver
> > would be wrong one to add it to. Can you have UDEV rule to remap
> > buttons form userspace when the device is discovered, similarly to
> > what we do for keyboards?
> >
> > Thanks.
> >
> > --
> > Dmitry
> 
> Can UDEV remap a joystick axis to buttons? I wasn't aware it had that
> ability. Currently I cannot simultaneously hit the left and right buttons
> on the dance pad, as that simply does not work for an axis-mapped device.

Hmm, you are right, we can only remap keys or not-yep mapped usages, not
usages that are represented as relative or absolute axis. So it really
depends how your device presents itself to HID.

If udev keymap load does not work you will need to create a tiny HID
driver that overrides mapping in kernel.

Thanks.

-- 
Dmitry

      reply	other threads:[~2016-01-16 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 17:42 adding xpad support for PS-PC Smart Joypad Allen M.
2016-01-16  0:43 ` Dmitry Torokhov
2016-01-16  2:18   ` Allen M.
2016-01-16 18:34     ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160116183453.GC9203@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=ase1592@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox