【发布时间】:2012-09-23 20:13:30
【问题描述】:
我正在使用 LWJGL,我希望在按住某个键(例如在 word 中按住一个字母键)时快速发生事件。
这是我的尝试:
while(Keyboard.next())
{
if (Keyboard.getEventKeyState())
{
if (Keyboard.isKeyDown(Keyboard.KEY_UP))
{
i += 5.0f;
}
if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT))
{
i -= 1.0f;
}
}
}
【问题讨论】:
标签: java keyboard key lwjgl tapandhold