Closed danny519 closed 3 years ago
I had no problems sending the hyphen to a text edit on a website using these params of Input.dispatchKeyEvent
:
{"type":"rawKeyDown","modifiers":0,"code":"Minus","key":"Minus","windowsVirtualKeyCode":189}
{"type":"char","modifiers":0,"text":"-","unmodifiedText":"-","code":"Minus","key":"Minus","windowsVirtualKeyCode":189}
{"type":"keyUp","modifiers":0,"text":"","unmodifiedText":"","code":"Minus","key":"Minus","windowsVirtualKeyCode":189}
thanks, that worked for me, not sure what part of that fixed it.
it also works with double colons too.
Whatever I try, I just can't get Input.dispatchKeyEvent to type a hyphen in my chrome extension. I have tried using type: "char" with the text: "-" but nothing happens, I also tried using keyDown with nativeVirtualKeyCode(189), code and key.
this is my latest attempt to get it to work. I am new to chrome devtools protocol so sorry if this is a rookie question, I just could not find anything about it when I googled it.