~martijnbraam/lsplug

a886e82ef18dc53190faae6da8e0ada85daae336 — Haelwenn (lanodan) Monnier 9 months ago e89e49b
Add support for /dev/input/(js*,mouse*)
1 files changed, 4 insertions(+), 0 deletions(-)

M lsplug/__main__.py
M lsplug/__main__.py => lsplug/__main__.py +4 -0
@@ 109,9 109,13 @@ def get_ports(filter=None, use_db=True, fixed=False, portinfo=False, devinfo=Fal

                # Check for input devices
                glob_device_basename(os.path.join(intf, "input/input*/event*"), "/dev/input/")
                glob_device_basename(os.path.join(intf, "input/input*/js*"), "/dev/input/")
                glob_device_basename(os.path.join(intf, "input/input*/mouse*"), "/dev/input/")

                # Some input drivers have deeper nested paths
                glob_device_basename(os.path.join(intf, "*/input/input*/event*"), "/dev/input/")
                glob_device_basename(os.path.join(intf, "*/input/input*/js*"), "/dev/input/")
                glob_device_basename(os.path.join(intf, "*/input/input*/mouse*"), "/dev/input/")

                # Check for network devices
                glob_device_basename(os.path.join(intf, "net/*"), "")