1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-30 06:31:23 +00:00

Make "on" attribute on buttons optional

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-11-21 18:38:15 +01:00
parent ab281813bc
commit 81e4f693ae
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -116,7 +116,7 @@ func main() {
} }
kd := activePage.Keys[evt.Key] kd := activePage.Keys[evt.Key]
if kd.On == "down" && evt.Type == streamdeck.EventTypeDown || kd.On == "up" && evt.Type == streamdeck.EventTypeUp || kd.On == "both" { if kd.On == "down" && evt.Type == streamdeck.EventTypeDown || (kd.On == "up" || kd.On == "") && evt.Type == streamdeck.EventTypeUp || kd.On == "both" {
if err := triggerAction(kd); err != nil { if err := triggerAction(kd); err != nil {
log.WithError(err).Error("Unable to execute action") log.WithError(err).Error("Unable to execute action")
} }