Keyboard Event Handling
Keyboard testing captures browser keyboard events (keydown, keyup, keypress) using the KeyboardEvent interface. Each event provides: key (character value like 'a', 'Enter'), code (physical key identifier like 'KeyA', 'Enter'), keyCode (deprecated numeric code), location (standard, left, right, numpad), and modifier states (Ctrl, Alt, Shift, Meta). The test monitors keydown (when key pressed), keyup (when released), and calculates hold duration.