|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.input.lwjgl.LWJGLKeyInput
LWJGLKeyInput uses the LWJGL API to access the keyboard.
The LWJGL make use of the native interface for the keyboard.
| Field Summary |
| Constructor Summary | |
LWJGLKeyInput()
Constructor instantiates a new LWJGLKeyInput object. |
|
| Method Summary | |
void |
destroy()
destroy cleans up the keyboard for use by other programs. |
int |
getKeyIndex(java.lang.String name)
getKeyIndex returns the value of the key name |
java.lang.String |
getKeyName(int key)
getKeyName returns the string representation of the key
code. |
boolean |
isCreated()
isCreated returns true if the keyboard has been initialized
false otherwise. |
boolean |
isKeyDown(int key)
isKeyDown returns true if the provided key code is pressed,
false otherwise. |
int |
key()
the key value of the current event |
char |
keyChar()
the char value of the current event |
boolean |
next()
iterates to next key event after poll is called |
boolean |
state()
returns true if the current event is a keydown event |
void |
update()
update updates the keyboard buffer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LWJGLKeyInput()
LWJGLKeyInput object. During
instantiation, the keyboard is created.
| Method Detail |
public boolean isKeyDown(int key)
isKeyDown returns true if the provided key code is pressed,
false otherwise.
isKeyDown in interface KeyInputkey - the keycode to check for.
KeyInput.isKeyDown(int)public boolean isCreated()
isCreated returns true if the keyboard has been initialized
false otherwise.
isCreated in interface KeyInputKeyInput.isCreated()public java.lang.String getKeyName(int key)
getKeyName returns the string representation of the key
code.
getKeyName in interface KeyInputkey - the key code to check.
KeyInput.getKeyName(int)public int getKeyIndex(java.lang.String name)
getKeyIndex returns the value of the key name
getKeyIndex in interface KeyInputname - the name of the key
public void update()
update updates the keyboard buffer.
update in interface KeyInputKeyInput.update()public void destroy()
destroy cleans up the keyboard for use by other programs.
destroy in interface KeyInputKeyInput.destroy()public boolean next()
next in interface KeyInputpublic boolean state()
state in interface KeyInputpublic int key()
key in interface KeyInputpublic char keyChar()
keyChar in interface KeyInput
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||