Ok, eso es algo
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));
Friendly Hawk
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));