本文整理了Java中org.lwjgl.input.Keyboard.poll()
方法的一些代码示例,展示了Keyboard.poll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyboard.poll()
方法的具体详情如下:
包路径:org.lwjgl.input.Keyboard
类名称:Keyboard
方法名:poll
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void update() {
if (!context.isRenderable())
return;
Keyboard.poll();
while (Keyboard.next()){
int keyCode = Keyboard.getEventKey();
char keyChar = Keyboard.getEventCharacter();
boolean pressed = Keyboard.getEventKeyState();
boolean down = Keyboard.isRepeatEvent();
long time = Keyboard.getEventNanoseconds();
KeyInputEvent evt = new KeyInputEvent(keyCode, keyChar, pressed, down);
evt.setTime(time);
listener.onKeyEvent(evt);
}
}
代码示例来源:origin: org.lwjgl.lwjgl/lwjgl_util
public synchronized void pollDevice() throws IOException {
if (!org.lwjgl.input.Keyboard.isCreated())
return;
org.lwjgl.input.Keyboard.poll();
for ( Component component : getComponents() ) {
Key key = (Key)component;
key.update();
}
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
public void update() {
if (!context.isRenderable())
return;
Keyboard.poll();
while (Keyboard.next()){
int keyCode = Keyboard.getEventKey();
char keyChar = Keyboard.getEventCharacter();
boolean pressed = Keyboard.getEventKeyState();
boolean down = Keyboard.isRepeatEvent();
long time = Keyboard.getEventNanoseconds();
KeyInputEvent evt = new KeyInputEvent(keyCode, keyChar, pressed, down);
evt.setTime(time);
listener.onKeyEvent(evt);
}
}
代码示例来源:origin: org.ode4j/demo
Keyboard.poll();
while(Keyboard.next()) {
char key = (char) Keyboard.getEventKey();
代码示例来源:origin: playn/playn
Keyboard.poll();
int flags = modifierFlags(
Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU),
内容来源于网络,如有侵权,请联系作者删除!