forked from kofal.net/zmk
feat: Add LED indicator support (#3239)
This adds a new zmk,indicator-leds device, which maps HID indicator states onto any devices that implement the LED driver API. This adds support for things like a caps lock LED. The name was chosen so that more drivers could be added later as zmk,indicator-*, for example a version that uses the LED strip API.
This commit is contained in:
37
app/dts/bindings/indicators/zmk,indicator-leds.yaml
Normal file
37
app/dts/bindings/indicators/zmk,indicator-leds.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright (c) 2025, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Display the states of HID indicators using LEDs
|
||||
|
||||
compatible: "zmk,indicator-leds"
|
||||
|
||||
child-binding:
|
||||
properties:
|
||||
leds:
|
||||
type: phandles
|
||||
required: true
|
||||
description: One or more LED devices to control
|
||||
|
||||
indicator:
|
||||
type: int
|
||||
required: true
|
||||
description: HID_INDICATOR_* value to indicate (see dt-bindings/zmk/hid_indicators.h)
|
||||
|
||||
active-brightness:
|
||||
type: int
|
||||
description: LED brightness in percent when the indicator is active
|
||||
default: 100
|
||||
|
||||
inactive-brightness:
|
||||
type: int
|
||||
description: LED brightness in percent when the indicator is not active
|
||||
default: 0
|
||||
|
||||
disconnected-brightness:
|
||||
type: int
|
||||
description: LED brightness in percent when the keyboard is not connected to any device
|
||||
default: 0
|
||||
|
||||
on-while-idle:
|
||||
type: boolean
|
||||
description: Keep LEDs enabled even when the keyboard is idle and on battery power
|
||||
Reference in New Issue
Block a user