Reputation: 60
I want to emulate keyboard event. but the code:
editor.trigger(monaco.KeyCode.Backspace, 'type')
not work,
it will not delete current char in editor.
Upvotes: 2
Views: 1246
Reputation: 214047
For Backspace
key monaco has specific core command called deleteLeft
:
editor.trigger(monaco.KeyCode.Backspace, 'deleteLeft')
Upvotes: 1