ok isso é algo
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));
Friendly Hawk
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));