In JavaScript in general, the event that triggers the actual writing of the text into an input / textarea (and other) element is the event with the `KeyPress` type.
Likewise, in CDP, the event that is required to trigger the actual writing is the `char` one. You need to have `keyUp` -> `char` -> `keyDown`.
Also, there's the `text` field in the parameters of `Input.dispatchKeyEvent` that should be filled for the `char` event (and only in this event).
Overall, here's the type, text, key and code of writing down the letter "a" successfully with CDP:
"keyDown", undefined, "a", "KeyA"
"char", "a", "a" , "KeyA"
"keyUp", undefined, "a", "KeyA"
I hope it makes sense. If you have any questions, please let me know.