Doesn't work for different keyboard combinations
Looks like it doesn't work if I for example use the Alt + 64 combination for the "@" character but it works if I add it using other combination or a key to insert it directly.
Hi, this worked to me, detecting with keypress and triggering a KeyboardEventInit:
onKeypress(event:any) {
var element = document.getElementById("commentMentions");
if(element&&event&&event["key"]=='@'&&event["code"]!="Digit2"){
let eventInit:KeyboardEventInit = {};
eventInit.composed = true;
eventInit.bubbles = true;
eventInit.cancelable = true;
eventInit.code = "Digit2";
eventInit.ctrlKey = true;
eventInit.key = '@';
eventInit.location = 0;
element.dispatchEvent(new KeyboardEvent('keydown',eventInit));
}
}