From c92af881071beddfde6b69443bb678bc6839e5a0 Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 9 Nov 2020 09:52:12 +0100 Subject: [PATCH] docs: how to retrieve keyboard/matrix child value --- resources/docs/docs/widgets/scripting.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index 118d73d9..b0910ec2 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -18,7 +18,11 @@ Depending on what triggered the script's execution, a few variables are availabl - `touch`: see [Touch state](#touch-state) ??? infos "Keyboard & Matrix" - In keyboards and matrices, `id` is the id of the child widget that triggered the event. + In keyboards and matrices, `id` is the id of the child widget that triggered the event, and `value` is an array containing the children's values. + The touched widget's value can be retrieved with: + ```javascript + value[getIndex(id)] + ``` **Event: keyboard** (script widget only)