From c90b06f3a02465be9dc6ae90473eca0600f44df2 Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 9 Jul 2020 15:55:44 +0200 Subject: [PATCH] keyboard: rm "toggles" property, replace with "mode" (as for buttons) --- src/client/widgets/containers/keyboard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client/widgets/containers/keyboard.js b/src/client/widgets/containers/keyboard.js index 32bfb0d8..27711a84 100644 --- a/src/client/widgets/containers/keyboard.js +++ b/src/client/widgets/containers/keyboard.js @@ -31,7 +31,12 @@ module.exports = class Keyboard extends Panel { 'Set to `null` to send send no argument in the osc message', 'Can be an `object` if the type needs to be specified (see preArgs)' ]}, - toggles: {type: 'boolean', value: false, help: 'Set to `true` to make keys bahave like toggle buttons'} + mode: {type: 'string', value: 'push', choices: ['push', 'toggle', 'tap'], help: [ + 'Interraction mode:', + '- `push` (press & release)', + '- `toggle` (on/off switches)', + '- `tap` (no release)' + ]}, }, [], { @@ -80,7 +85,7 @@ module.exports = class Keyboard extends Panel { data.top = data.left = data.height = data.width = 'auto' data.type = 'button' - data.mode = this.getProp('toggles') ? 'toggle' : 'push' + data.mode = this.getProp('mode') data.id = this.getProp('id') + '/' + i data.label = false data.css = ''