net.java.games.input
Class Keyboard
java.lang.Object
net.java.games.input.AbstractController
net.java.games.input.Keyboard
- All Implemented Interfaces:
- Controller
public abstract class Keyboard
- extends AbstractController
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.
Methods inherited from class net.java.games.input.AbstractController |
getComponent, getComponents, getControllers, getEventQueue, getName, getNextDeviceEvent, getPortNumber, getPortType, getRumblers, poll, pollDevice, setDeviceEventQueueSize, setEventQueueSize, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Keyboard
protected Keyboard(java.lang.String name,
Component[] keys,
Controller[] children,
Rumbler[] rumblers)
- Protected constructor.
Subclasses should initialize the array of axes to an array of keys.
- Parameters:
name
- The name of the keyboard
getType
public Controller.Type getType()
- Returns the type of the Controller.
- Specified by:
getType
in interface Controller
- Overrides:
getType
in class AbstractController
isKeyDown
public final boolean isKeyDown(Component.Identifier.Key key_id)