Skip to content

Draft: udev: Add led support

Florian RICHER requested to merge florianricher/solid:add-leds-support into master

Current implementation work well with keyboard, flashlight and on my dualsense.

Example for one led on my dualsense

udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:07.1/0000:0b:00.3/usb5/5-2/5-2:1.3/0003:054C:0CE6.0007/leds/input28:rgb:indicator'
  parent = '/org/kde/solid/udev' (string)
  vendor = 'Sony Interactive Entertainment DualSense Wireless Controller' (string)
  product = 'Sony Interactive Entertainment DualSense Wireless Controller' (string)
  description = '' (string)
  icon = '' (string)
  Led.name = 'input28' (string)
  Led.color = 'rgb' (string)
  Led.type = 'indicator' (string)
  Led.maxBrightness = 255  (0xff)  (int)
  Led.brightness = 255  (0xff)  (int)
  Led.brightnessType = 'Variable'  (0x2)  (enum)
  Led.colorSupport = true (bool)
  Led.colorIntensities = '' (QHash<QString,int>)
  Led.rgbSupport = true (bool)
  Led.rgb = '#000000' (QColor)

My keyboard

udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:07.1/0000:0b:00.3/usb5/5-4/5-4.2/5-4.2:1.0/0003:1B1C:1B2D.0005/input/input5/input5::capslock'
  parent = '/org/kde/solid/udev' (string)
  vendor = 'Corsair Corsair Gaming K95 RGB PLATINUM Keyboard' (string)
  product = 'Corsair Corsair Gaming K95 RGB PLATINUM Keyboard' (string)
  description = '' (string)
  icon = '' (string)
  Led.name = 'input5' (string)
  Led.color = '' (string)
  Led.type = 'capslock' (string)
  Led.maxBrightness = 1  (0x1)  (int)
  Led.brightness = 0  (0x0)  (int)
  Led.brightnessType = 'Toggle'  (0x1)  (enum)
  Led.colorSupport = false (bool)
  Led.colorIntensities = '' (QHash<QString,int>)
  Led.rgbSupport = false (bool)
  Led.rgb = '#000000' (QColor)

vendor and product is very hard to extract for now with udev.

Edited by Florian RICHER

Merge request reports

Loading