diff --git a/docs/custom_ui.mdx b/docs/custom_ui.mdx index 17e9334..8ab8ea1 100644 --- a/docs/custom_ui.mdx +++ b/docs/custom_ui.mdx @@ -185,7 +185,13 @@ Example: `label` defines the text label on the left of the control -`type` defines the type of control. Valid values are `range`, `dropdown`, +`type` defines the type of control. Valid values are: +- `button` +- `toggle` +- `range` +- `dropdown` +- `color` +- `keycode` `options` defines the possible values of the control (the numerical range, or string/integer values) @@ -204,6 +210,25 @@ For example: ... defines a range (slider) UI control, labelled `Brightness`, with a range of 0 to 255. It will be using `channel_id` of `2` and `value_id` of `1` in the VIA protocol to set/get the value in the firmware. It has a `value_key` of `"id_qmk_rgblight_brightness"` because the `value_id` of `1` matches the integer value of `id_qmk_rgblight_brightness` in enum `id_qmk_rgblight` in the firmware code. +### Button Control + +The button control is a clickable that sends a numeric value. + + +![Custom UI Button Control](/img/custom_ui_button_control.png) + +```json +{ + "label": "Test button", + "type": "button", + "options": [10], + "content": ["id_test_button", 0, 3] +} +``` + +The `options` element defines value to be sent, e.g. `"options": [10],`. The value data is one byte (i.e. <=255), otherwise it is two bytes. See [Handling 16-bit Values](#handling-16-bit-values) for handling two byte values. + + ### Toggle Control The toggle control is a toggle switch that controls a boolean (on/off) value. diff --git a/static/img/custom_ui_button_control.png b/static/img/custom_ui_button_control.png new file mode 100644 index 0000000..9de2f0f Binary files /dev/null and b/static/img/custom_ui_button_control.png differ