本文整理了Java中processing.event.KeyEvent.getKeyCode()
方法的一些代码示例,展示了KeyEvent.getKeyCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.getKeyCode()
方法的具体详情如下:
包路径:processing.event.KeyEvent
类名称:KeyEvent
方法名:getKeyCode
暂无
代码示例来源:origin: ajavamind/Processing-Cardboard
protected void handleKeyEvent(KeyEvent event) {
// keyEvent = event;
key = event.getKey();
keyCode = event.getKeyCode();
switch (event.getAction()) {
case KeyEvent.PRESS:
keyPressed = true;
keyPressed(event);
break;
case KeyEvent.RELEASE:
keyPressed = false;
keyReleased(event);
break;
}
handleMethods("keyEvent", new Object[]{event});
}
代码示例来源:origin: evolvio/evolv.io
public void handleKeyEvent(KeyEvent keyEvent) {
int keyActionConstant = keyEvent.getAction();
KeyAction keyAction = KeyAction.getFromConstant(keyActionConstant);
char key = keyEvent.getKey();
if (key == PConstants.CODED) {
int keyCodeConstant = keyEvent.getKeyCode();
KeyCode keyCode = KeyCode.getFromConstant(keyCodeConstant);
performAction(keyAction, keyCode, keyCodeActions, keyEvent);
} else {
performAction(keyAction, key, keyActions, keyEvent);
}
}
代码示例来源:origin: org.processing/core
keyCode = event.getKeyCode();
event.getKeyCode() == 'W' &&
((event.isMetaDown() && platform == MACOSX) ||
(event.isControlDown() && platform != MACOSX))) {
内容来源于网络,如有侵权,请联系作者删除!