constructor(event: KeyboardEvent)
View sourceCopies key, code, location, and target from the browser event.
Class
Captures the keyboard data from a browser keyup event.
Construct this value from the event when handling a released key. It keeps the browser’s key identity, physical code, keyboard location, and target.
const up = new KeyUp(new KeyboardEvent('keyup', {
key: 'a',
code: 'KeyA'
}))
console.log(up.key, up.code) // a KeyAconstructor(event: KeyboardEvent)Copies key, code, location, and target from the browser event.
The key value copied from event.key.
The physical key code copied from event.code.
The keyboard location copied from event.location.
The event target copied from event.target, or null when the browser
event has no target.