接口(interface)InputProcessor
实现keyUp
和keyDown
方法,以int
形式传递键码。在哪里可以找到与键盘输入对应的这些代码的列表?
public boolean keyDown(int keycode) {
return false;
}
public boolean keyUp(int keycode) {
return false;
}
假设我想将 UP
映射到一个事件。我如何知道UP
的键码?
最佳答案
给你:http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Keys.html 。请注意,您可以点击 javadocs 中的链接。 :
keycode - one of the constants in Input.Keys
关于java - 按键代码列表(InputProcessor),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27068309/