script: onKeyboard script not cleaned upon edition / removal
This commit is contained in:
parent
753a6d5128
commit
8faaf997a1
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ class ScriptWidget extends Widget {
|
|||
|
||||
keyBinding: {type: 'string|array', value: '', help: [
|
||||
'Key combo `string` or `array` of strings (see <a href="https://github.com/RobertWHurst/KeyboardJS">KeyboardJS</a> 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', ()=>{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue