The passed in event subscriber should wrap around the document object, allowing the keyboard to subscribe to keyup & keydown events when the activate()
method is called.
ButtonInput for the A key.
ButtonInput for the B key.
ButtonInput for the Backquote `
key.
ButtonInput for the Backslash `` key.
ButtonInput for the Backspace key in the numbers row.
The collection of all ButtonInputs that the Keyboard holds.
ButtonInput for the C key.
ButtonInput for the Caps Lock key.
ButtonInput for the Comma ,
key.
ButtonInput for the D key.
ButtonInput for the Delete key.
ButtonInput for the Down arrow key.
ButtonInput for the E key.
ButtonInput for the End key.
ButtonInput for the Enter key.
ButtonInput for the Equal key in the numbers row.
ButtonInput for the Escape key.
ButtonInput for the F key.
ButtonInput for the F1 key.
ButtonInput for the F10 key.
ButtonInput for the F11 key.
ButtonInput for the F12 key.
ButtonInput for the F2 key.
ButtonInput for the F3 key.
ButtonInput for the F4 key.
ButtonInput for the F5 key.
ButtonInput for the F6 key.
ButtonInput for the F7 key.
ButtonInput for the F8 key.
ButtonInput for the F9 key.
This event fires when the keyboard has been deactivated and marked for disposal.
ButtonInput for the G key.
ButtonInput for the H key.
ButtonInput for the Home key.
ButtonInput for the I key.
ButtonInput for the Insert key.
ButtonInput for the Backslash `` key on non-American keyboards (typically located next to the left shift key).
If true, then the keyboard has been deactivated and marked for disposal.
ButtonInput for the J key.
ButtonInput for the K key.
ButtonInput for the L key.
ButtonInput for the Left arrow key.
ButtonInput for the Left Alt key.
ButtonInput for the Left Bracket [
key.
ButtonInput for the Left Control key.
ButtonInput for the Left Shift key.
ButtonInput for the M key.
ButtonInput for the Minus key in the numbers row.
ButtonInput for the N key.
ButtonInput for the Num Lock key.
ButtonInput for the 0 key in the numpad.
ButtonInput for the 1 key in the numpad.
ButtonInput for the 2 key in the numpad.
ButtonInput for the 3 key in the numpad.
ButtonInput for the 4 key in the numpad.
ButtonInput for the 5 key in the numpad.
ButtonInput for the 6 key in the numpad.
ButtonInput for the 7 key in the numpad.
ButtonInput for the 8 key in the numpad.
ButtonInput for the 9 key in the numpad.
ButtonInput for the Add +
key in the numpad.
ButtonInput for the Decimal .
key in the numpad.
ButtonInput for the Divide /
key in the numpad.
ButtonInput for the Enter key in the numpad.
ButtonInput for the Multiply *
key in the numpad.
ButtonInput for the Subtract -
key in the numpad.
ButtonInput for the 0 key in the numbers row.
ButtonInput for the 1 key in the numbers row.
ButtonInput for the 2 key in the numbers row.
ButtonInput for the 3 key in the numbers row.
ButtonInput for the 4 key in the numbers row.
ButtonInput for the 5 key in the numbers row.
ButtonInput for the 6 key in the numbers row.
ButtonInput for the 7 key in the numbers row.
ButtonInput for the 8 key in the numbers row.
ButtonInput for the 9 key in the numbers row.
ButtonInput for the O key.
ButtonInput for the P key.
ButtonInput for the Page Down key.
ButtonInput for the Page Up key.
ButtonInput for the Period .
key.
ButtonInput for the Q key.
ButtonInput for the Quote '
key.
ButtonInput for the R key.
Provides a way of identifying keyboards so they can be easily retrieved later.
ButtonInput for the Right arrow key.
ButtonInput for the Right Alt key.
ButtonInput for the Right Bracket ]
key.
ButtonInput for the Right Control key.
ButtonInput for the Right Shift key.
ButtonInput for the S key.
ButtonInput for the Semicolon ;
key.
ButtonInput for the Slash /
key.
ButtonInput for the Spacebar.
ButtonInput for the T key.
ButtonInput for the Tab key.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
ButtonInput for the U key.
ButtonInput for the Up arrow key.
ButtonInput for the V key.
ButtonInput for the W key.
ButtonInput for the X key.
ButtonInput for the Y key.
ButtonInput for the Z key.
Provides a way for setting the ref through a chained function call. For example:
clock.addChild(new Keyboard(new EventSubscriber(document)).withRef('keyboard'));
The calling object.
The ref to set on the object.
Generated using TypeDoc
The Keyboard class models a computer keyboard, providing ButtonInput properties for all of the keys found on most standard English computer keyboards (coverage of other language keyboards is currently unconfirmed).