josdejong / josdejong/jsoneditor
How to add shortcut key custom event
Open
question
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
I would like to add some listener in my JSONEditor options to capture shortcut key events for example:
"Crtl + S" = Call method foo123 ()
"F5" = Call method bar123 ()
```
var options = {
schema: schema,
schemaRefs: {"job": job},
mode: 'code',
modes: ['code', 'text', 'tree', 'preview'],
onKey: function (key) {
if(key == 12){
//TO DO
}
}
};
```
Is there anything that already does that today?
Contributor guide
Assessment
This issue has not been assessed yet.