Package net.java.games.input
Class Keyboard
java.lang.Object
net.java.games.input.AbstractController
net.java.games.input.Keyboard
- All Implemented Interfaces:
Controller
A Keyboard is a type of controller consisting of a single controller,
they keypad, which contains several axes (the keys). By default, all keys
are set to receive polling data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.java.games.input.Controller
Controller.PortType, Controller.Type
-
Constructor Summary
ModifierConstructorDescriptionprotected
Keyboard
(String name, Component[] keys, AbstractController[] children, Rumbler[] rumblers) Protected constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the type of the Controller.final boolean
isKeyDown
(Component.Identifier.Key key_id) Methods inherited from class net.java.games.input.AbstractController
equals, getComponent, getComponents, getControllers, getEventQueue, getName, getNextDeviceEvent, getPortNumber, getPortType, getRumblers, poll, pollDevice, setDeviceEventQueueSize, setEventQueueSize, toString
-
Constructor Details
-
Keyboard
protected Keyboard(String name, Component[] keys, AbstractController[] children, Rumbler[] rumblers) Protected constructor. Subclasses should initialize the array of axes to an array of keys.- Parameters:
name
- The name of the keyboard
-
-
Method Details
-
getType
Returns the type of the Controller.- Specified by:
getType
in interfaceController
- Overrides:
getType
in classAbstractController
-
isKeyDown
-