From 83122bff42fa1da310327200dfaa8ac0eda8c44f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 30 Oct 2020 20:00:18 +0100 Subject: [PATCH] Fix blank page not doing anything refs #2 Signed-off-by: Knut Ahlers --- cmd/streamdeck/system_pages.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/cmd/streamdeck/system_pages.go b/cmd/streamdeck/system_pages.go index 1f29759..79a5faf 100644 --- a/cmd/streamdeck/system_pages.go +++ b/cmd/streamdeck/system_pages.go @@ -1,6 +1,26 @@ package main func applySystemPages(conf *config) { - blankPage := page{} + blankPage := page{Keys: make(map[int]keyDefinition)} + + for i := 0; i < sd.NumKeys(); i++ { + blankPage.Keys[i] = keyDefinition{ + Display: dynamicElement{ + Type: "color", + Attributes: map[string]interface{}{ + "rgba": []interface{}{0x0, 0x0, 0x0, 0xff}, + }, + }, + Actions: []dynamicElement{ + { + Type: "page", + Attributes: map[string]interface{}{ + "relative": 1, + }, + }, + }, + } + } + conf.Pages["@@blank"] = blankPage }