pub async fn press_key(c: &CdpClient, sid: &str, chord: &Chord) -> Result<()>Expand description
Press and release a key, with any modifiers held around it.
Order is modifiers down, key down, key up, modifiers up in reverse. Releasing in reverse matters: a Shift left down leaks into whatever the page does next. The modifier release runs even when the key dispatch fails, so an error cannot strand the browser with Control held.
Keyboard input goes to whatever has focus, so unlike the other native actions this takes no node id.