KeyboardEvent constructor
KeyboardEvent({})
Implementation
KeyboardEvent({
/// One of keyup or keydown.
required KeyboardEventType type,
/// (Deprecated) The ID of the request. Use the `requestId` param from the
/// `onKeyEvent` event instead.
String? requestId,
/// The extension ID of the sender of this keyevent.
String? extensionId,
/// Value of the key being pressed
required String key,
/// Value of the physical key being pressed. The value is not affected by
/// current keyboard layout or modifier state.
required String code,
/// The deprecated HTML keyCode, which is system- and
/// implementation-dependent numerical code signifying the unmodified
/// identifier associated with the key pressed.
int? keyCode,
/// Whether or not the ALT key is pressed.
bool? altKey,
/// Whether or not the ALTGR key is pressed.
bool? altgrKey,
/// Whether or not the CTRL key is pressed.
bool? ctrlKey,
/// Whether or not the SHIFT key is pressed.
bool? shiftKey,
/// Whether or not the CAPS_LOCK is enabled.
bool? capsLock,
}) : _wrapped = $js.KeyboardEvent(
type: type.toJS,
requestId: requestId,
extensionId: extensionId,
key: key,
code: code,
keyCode: keyCode,
altKey: altKey,
altgrKey: altgrKey,
ctrlKey: ctrlKey,
shiftKey: shiftKey,
capsLock: capsLock,
);