Wiredcharlie wrote: 
> From what I can see that is button/keypress only. 
It uses python-evdev, which is a interface to evdev and reports all
device events (X uses evdev as well btw). Haven't tested it with
inputexec, but this works:


Code:
--------------------
    #!/usr/bin/env python3
  import evdev
  device = evdev.InputDevice('/dev/input/event10')
  print(device)
  for event in device.read_loop():
        if event.code == evdev.ecodes.REL_WHEEL:
                print("Event: {} value: {}".format( evdev.categorize(event), 
event.value))
--------------------



Code:
--------------------
    device /dev/input/event10, name "Logitech USB Laser Mouse", phys 
"usb-0000:00:1d.0-1.6/input0"
  Event: relative axis event at 1574017671.107975, REL_WHEEL  value: -1
  Event: relative axis event at 1574017672.227968, REL_WHEEL  value: 1
--------------------

so you could just add a line to send something (e.g. with requests) to
LMS in that if clause

Anyway, I've switched to 'triggerhappy'
(https://github.com/wertarbyte/triggerhappy) in the meantime, which will
also work with the wheel:

Code:
--------------------
    $  cat ../THD.conf
  REL_WHEEL     1       echo "wheel up" >> /tmp/thd.log
  REL_WHEEL     -1      echo "wheel down" >> /tmp/thd.log
--------------------



Code:
--------------------
    ./thd --triggers ../THD.conf /dev/input/event10
  Executing trigger action: echo "wheel down" >> /tmp/thd.log
  Executing trigger action: echo "wheel up" >> /tmp/thd.log
  
--------------------



'Various SW' (https://www.nexus0.net/pub/sw/): Web Interface | Playlist
Editor / Generator | Music Classification | Similar Music | Announce |
EventTrigger | LMSlib2go | ...
'Various HowTos' (https://www.nexus0.net/pub/documents/LMS/): build a
self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
------------------------------------------------------------------------
Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=111225

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to