public abstract class JavaKeyboard extends Object implements Keyboard
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
JavaKeyboard.Dispatcher<E extends Events.Input> |
protected class |
JavaKeyboard.Queued<E extends Events.Input> |
Keyboard.Adapter, Keyboard.Event, Keyboard.Listener, Keyboard.TextType, Keyboard.TypedEvent| Modifier and Type | Field and Description |
|---|---|
protected JavaKeyboard.Dispatcher<Keyboard.Event> |
down |
protected JavaKeyboard.Dispatcher<Keyboard.TypedEvent> |
typed |
protected JavaKeyboard.Dispatcher<Keyboard.Event> |
up |
| Constructor and Description |
|---|
JavaKeyboard() |
| Modifier and Type | Method and Description |
|---|---|
protected <E extends Events.Input> |
dispatch(E e,
JavaKeyboard.Dispatcher<E> d) |
boolean |
hasHardwareKeyboard() |
void |
post(Key key,
boolean pressed,
char typedCh)
Posts a key event received from elsewhere (i.e.
|
void |
setListener(Keyboard.Listener listener) |
protected final JavaKeyboard.Dispatcher<Keyboard.Event> down
protected final JavaKeyboard.Dispatcher<Keyboard.Event> up
protected final JavaKeyboard.Dispatcher<Keyboard.TypedEvent> typed
public void post(Key key, boolean pressed, char typedCh)
Note: the resulting event will be sent with time = 0, since the GL event time is inaccessible and platform dependent.
key - the key that was pressed or released, or null for a char typed eventpressed - whether the key was pressed or released, ignored if key is nulltypedCh - the character that was typed, ignored if key is not nullpublic void setListener(Keyboard.Listener listener)
setListener in interface Keyboardpublic boolean hasHardwareKeyboard()
hasHardwareKeyboard in interface Keyboardprotected <E extends Events.Input> void dispatch(E e, JavaKeyboard.Dispatcher<E> d)
Copyright © 2013. All Rights Reserved.