Date: Thu, 17 Sep 2015 06:18:05 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: Hans Petter Selasky <hselasky@freebsd.org>, Jakub Wojciech Klama <jceel@freebsd.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r397098 - in head/devel: . py-evdev py-evdev/files Message-ID: <oah1-of0i-wny@FreeBSD.org> In-Reply-To: <201509170414.t8H4E8tX075252@repo.freebsd.org> (Jan Beich's message of "Thu, 17 Sep 2015 04:14:08 %2B0000 (UTC)") References: <201509170414.t8H4E8tX075252@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jan Beich <jbeich@FreeBSD.org> writes: > Author: jbeich > Date: Thu Sep 17 04:14:08 2015 > New Revision: 397098 > URL: https://svnweb.freebsd.org/changeset/ports/397098 > > Log: > devel/py-evdev: add new port >=20=20=20 > This package provides bindings to the generic input event interface in > Linux. The evdev interface serves the purpose of passing events > generated in the kernel directly to userspace through character > devices that are typically located in /dev/input/. [...] > @@ -0,0 +1,46 @@ > +# XXX Patch churn from GSoC 2014, expect v4l_compat for now > + > +--- evdev/genecodes.py~ 2014-10-07 20:16:56 UTC > ++++ evdev/genecodes.py > +@@ -11,11 +11,7 @@ import os, sys, re > +=20 > + template =3D r''' > + #include <Python.h> > +-#ifdef __FreeBSD__ > +-#include <dev/evdev/input.h> > +-#else > + #include <linux/input.h> > +-#endif As ABI is same the package works with both e.g., # webcamd $ sudo python2.7 test.py ('/dev/input/event0', 'Wacom Bamboo 16FG 4x5 Pen', 'usb-/dev/usb-/dev/usb= /input0') ('/dev/input/event1', 'Wacom Bamboo 16FG 4x5 Finger', 'usb-/dev/usb-/dev/= usb/input1') ('/dev/input/event2', 'Wacom Bamboo 16FG 4x5 Pad', 'usb-/dev/usb-/dev/usb= /input1') # evdev(4) from gsoc2014 $ sudo python2.7 test.py ('/dev/input/event0', 'System keyboard multiplexer', '') ('/dev/input/event1', 'Microsoft Comfort Curve Keyboard 3000, class 0/0, = rev 2.00/1.70, addr 2', 'ukbd0') ('/dev/input/event2', 'Logitech USB Laser Mouse, class 0/0, rev 2.00/31.0= 0, addr 3', 'ums0') $ cat test.py #! /usr/bin/env python from evdev import InputDevice, list_devices devices =3D [InputDevice(fn) for fn in list_devices()] for dev in devices: print(dev.fn, dev.name, dev.phys) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJV+j7+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bzpEIALUDHWjXzEJwhq2KgPR6uYcG gJH8ATFzW414PTMHfTRb7Xt6ba6W7jRbJ+JsjU3DIuXGQ123kiI0AXkNENsqeTOW ZZTl+theix7wVo1nabMey8MTj5lY/bdFrey9yob6s6epEpVOhlxdtSdtCW1HryBr 6G+GONuqpna8cwqDrWYwdTfem4miSSGRG6JedwLwXaf7M4rMS+HmtV8YWiEi7OXo DjgQMip/ISECf3tOLgZCgnDL3W3MdkXqzjvnJA0nuKZGQQf+AY3S88NXdk/mZXFg U9x8jYdXCrqKStJlFPahxoyy6ea/gcBpDiG2zUN2Prcu4yy+LxiXM4QJqs8d1L0= =4w0z -----END PGP SIGNATURE----- --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?oah1-of0i-wny>