Skip to main content

Module keymap

Module keymap 

Source
Expand description

What a key press has to look like before Chromium will act on it.

Input.dispatchKeyEvent with only key and modifiers set delivers a DOM event a page can observe — and nothing else happens. Chromium’s editing layer (and its default form handling) keys off windowsVirtualKeyCode, and text entry keys off text; without them Backspace deletes nothing, the arrows move no caret, and Enter submits no form. That was live-verified: every editing key was delivered, none of them edited.

This module is the missing description. It is pure — a key name in, the CDP fields out — which is what makes the behaviour testable without a live Chromium, the same discipline the rest of this crate’s CDP glue follows.

Not a full keyboard layout: the named keys a browser drawer’s user actually presses, plus printable characters derived generically. A key it does not recognise still dispatches with its key name, exactly as before — unrecognised keys get no worse, recognised ones get correct.

Structs§

KeyDescriptor
The CDP fields for one key press.

Functions§

describe_key
Describe key for CDP.