diff --git a/CHANGELOG.md b/CHANGELOG.md index 826c95c1..cc511b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - bug fixes - range: value update issue (internal touch state not updated properly) - - scripting: send(): ignore `ignoreDefaults` property + - scripting: send(): ignore `ignoreDefaults` property + - script: onKeyboard script not cleaned upon edition / removal ## 1.15.7 diff --git a/src/client/widgets/scripts/script-widget.js b/src/client/widgets/scripts/script-widget.js index b75fed2a..5c06f6df 100644 --- a/src/client/widgets/scripts/script-widget.js +++ b/src/client/widgets/scripts/script-widget.js @@ -26,7 +26,8 @@ class ScriptWidget extends Widget { keyBinding: {type: 'string|array', value: '', help: [ 'Key combo `string` or `array` of strings (see KeyboardJS documentation).', - 'If the editor is enabled, some keys / combos will not work.' + 'If the editor is enabled, some keys / combos will not work.', + 'To process all keystroke events, write `[\'\']`' ]}, keyRepeat: {type: 'boolean', value: true, help: 'Set to `false` to prevent keydown repeats when holding the key combo pressed'}, keyType: {type: 'string', value: 'keydown', choices: ['keydown', 'keyup', 'both'], help: 'Determines which key event trigger the script\'s execution'}, @@ -107,7 +108,7 @@ class ScriptWidget extends Widget { onRemove() { - if (this.getProp('event') === 'keyboard' && this.getProp('keyBinding')) { + if (this.getProp('onKeyboard') && this.getProp('keyBinding')) { keyboardJS.withContext('global', ()=>{