I got in my Vue project a Balkan Orgchart that displays a pretty cool chart that has an option to go "fullscreen" but now I added a button that opens a modal (vuedal) window when pressed. The problem is that I can't see the modal window when the chart is in fullscreen, so I wanted to force the press of the Esc key so the user will get out of the fullscreen mode before opening the modal window.
That's why I wanted to manually trigger the Esc key press event when the user tries to open the modal window.
Any clue?
If you are trying to achieve the original event of pressing esc key, you can emit the keydown event with the keycode of the esc key. which is 27.
$emit('keydown', { ...e, keyCode: 27 })