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
ConstructorsModifierConstructorDescriptionprotectedKeyboard(String name, Component[] keys, Controller[] children, Rumbler[] rumblers) Protected constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the type of the Controller.final booleanisKeyDown(Component.Identifier.Key key_id) Methods inherited from class net.java.games.input.AbstractController
getComponent, getComponents, getControllers, getEventQueue, getName, getNextDeviceEvent, getPortNumber, getPortType, getRumblers, poll, pollDevice, setDeviceEventQueueSize, setEventQueueSize, toString
-
Constructor Details
-
Keyboard
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:
getTypein interfaceController- Overrides:
getTypein classAbstractController
-
isKeyDown
-