本文整理了Java中org.lwjgl.glfw.GLFW.glfwGetKey()
方法的一些代码示例,展示了GLFW.glfwGetKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwGetKey()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwGetKey
[英]Returns the last state reported for the specified key to the specified window. The returned state is one of #GLFW_PRESS or #GLFW_RELEASE. The higher-level action #GLFW_REPEAT is only reported to the key callback.
If the #GLFW_STICKY_KEYS input mode is enabled, this function returns #GLFW_PRESS the first time you call it for a key that was pressed, even if that key has already been released.
The key functions deal with physical keys, with key tokens named after their use on the standard US keyboard layout. If you want to input text, use the Unicode character callback instead.
The modifier key bit masks are not key tokens and cannot be used with this function.
Do not use this function to implement text input.
代码示例来源:origin: libgdx/libgdx
@Override
public boolean isKeyPressed(int key) {
if (key == Input.Keys.ANY_KEY) return pressedKeys > 0;
if (key == Input.Keys.SYM) {
return GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_LEFT_SUPER) == GLFW.GLFW_PRESS||
GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_RIGHT_SUPER) == GLFW.GLFW_PRESS;
}
return GLFW.glfwGetKey(window.getWindowHandle(), getGlfwKeyCode(key)) == GLFW.GLFW_PRESS;
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean isKeyPressed(int key) {
if (key == Input.Keys.ANY_KEY) return pressedKeys > 0;
if (key == Input.Keys.SYM) {
return GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_LEFT_SUPER) == GLFW.GLFW_PRESS||
GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_RIGHT_SUPER) == GLFW.GLFW_PRESS;
}
return GLFW.glfwGetKey(window.getWindowHandle(), getGlfwKeyCode(key)) == GLFW.GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
public boolean isKeyPressed(int keyCode) {
return glfwGetKey(windowHandle, keyCode) == GLFW_PRESS;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
@Override
public boolean isKeyPressed(int key) {
if (key == Input.Keys.ANY_KEY) return pressedKeys > 0;
if (key == Input.Keys.SYM) {
return GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_LEFT_SUPER) == GLFW.GLFW_PRESS||
GLFW.glfwGetKey(window.getWindowHandle(), GLFW.GLFW_KEY_RIGHT_SUPER) == GLFW.GLFW_PRESS;
}
return GLFW.glfwGetKey(window.getWindowHandle(), getGlfwKeyCode(key)) == GLFW.GLFW_PRESS;
}
内容来源于网络,如有侵权,请联系作者删除!