Question regarding joystick/gamepad support in wayland
peter.hutterer at who-t.net
Thu Mar 3 06:13:14 UTC 2016
On Thu, Mar 03, 2016 at 01:52:26AM +0000, 박성진 wrote:
> Dear Peter, thank you for your quick answer and I agree with you. :)
> I have one more question below.
> >As for the most desirable way to support joysticks in Wayland - we
> >quite know, it'll depend on developers coming and saying "we need this
> >that", then we can start a conversation on what to do. But right now
> >seems a logind-like approach to allow an application to open js0 or
> >event node is quite sufficient.
> Do you imply that there will be security issues regarding the direct
> of the joystick node by an application ?
> Did you mention logind-like approach for another reason ?
> logind-like approach seems to be good for me, too, from the security
> point of view.
> If the joystick node is able to be opened by any application directly
> (for instance) if a user starts a game application and tries to make
> any payment
> in the game application with a joystick, i think it can make a security
> Of course, this is just an example and the payment for games needs
> to be made outside the game application. :)
I worry less about the joystick node here and more about the ability to open
other event nodes that are keyboard, followed by sniffing every keyboard
event that happens. If you have a process in place that checks which devices
are joysticks and revokes them as needed, then this is mitigated somewhat.
> ------- Original Message -------
> Sender : Peter Hutterer<peter.hutterer at who-t.net>
> Date : 2016-03-03 08:42 (GMT+09:00)
> Title : Re: Question regarding joystick/gamepad support in wayland
> On Wed, Mar 02, 2016 at 11:11:06PM +0000, wrote:
> > Dear all,
> > I would like to get your opinions regarding joystick/gamepad support
> in wayland.
> > What's the desirable way to support joystick/gamepad both in wayland
> and in linux ?
> > Plz kindly let me know if there is any previous discussion about
> this. :)
> > Linux supports both joydev(e.g. /dev/input/js0) and evdev(e.g.
> /dev/input/event0) for joysticks/gamepads.
> > As far as I know, many games in linux open js node directly within
> the process itself and read/handle joystick events by itself.
> > Under Xorg window system, without having X events and X input
> extension events, why are the games opening joystick nodes directly ?
> > Are there any reason for doing that ? Are there any performance
> issues ? Otherwise, is it originated from the lack of X events for
> > Lastly, what the most desirable way to support joysticks/gamepads in
> wayland ?
> couple of things here:
> * joystick events require relatively little processing, they are mapped
> to a
> function and that's about it. compare that with e.g. touchpads where
> a lot
> of stuff is required before we know whether we should send a motion,
> button or scroll event
> * joysticks do not have a standard set of functionality. they're all
> and axes but the layout changes, the functionality differs per
> device, etc.
> this makes it really hard to come up with a generic library that
> joysticks. and when you do, it'll likely look like evdev anyway
> * X hasn't really had joystick support, so now you have the inertia of
> "everyone is doing it this way already". Couple this with the fact
> joysticks aren't used in the normal UI, they're dedicated devices
> have a different functionality per application.
> As for the most desirable way to support joysticks in Wayland - we
> quite know, it'll depend on developers coming and saying "we need this
> that", then we can start a conversation on what to do. But right now it
> seems a logind-like approach to allow an application to open js0 or the
> event node is quite sufficient.
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> <p> </p><p> </p>
More information about the wayland-devel