本文整理汇总了Java中com.jogamp.newt.event.KeyEvent.VK_I属性的典型用法代码示例。如果您正苦于以下问题:Java KeyEvent.VK_I属性的具体用法?Java KeyEvent.VK_I怎么用?Java KeyEvent.VK_I使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.jogamp.newt.event.KeyEvent
的用法示例。
在下文中一共展示了KeyEvent.VK_I属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: keyPressed
@Override
public void keyPressed(final KeyEvent e) {
if(userInput) {
return;
}
final short s = e.getKeySymbol();
if(s == KeyEvent.VK_3) {
if( e.isAltDown() ) {
fontHeadIncr(1);
} else {
fontBottomIncr(1);
}
}
else if(s == KeyEvent.VK_4) {
if( e.isAltDown() ) {
fontHeadIncr(-1);
} else {
fontBottomIncr(-1);
}
}
else if(s == KeyEvent.VK_H) {
switchHeadBox();
}
else if(s == KeyEvent.VK_F) {
drawFPS = !drawFPS;
}
else if(s == KeyEvent.VK_SPACE) {
nextFontSet();
}
else if(s == KeyEvent.VK_I) {
userInput = true;
setIgnoreInput(true);
}
}
示例2: charPress
public void charPress(KeyEvent keyEvent) {
float offset = keyEvent.isShiftDown() ? viewScale.smallPosOffset() : viewScale.largePosOffset();
if (rightKeyboardCtrls) {
switch (keyEvent.getKeyCode()) {
case KeyEvent.VK_I:
offsetTargetPos(TargetOffsetDir.FORWARD, offset);
break;
case KeyEvent.VK_K:
offsetTargetPos(TargetOffsetDir.BACKWARD, offset);
break;
case KeyEvent.VK_L:
offsetTargetPos(TargetOffsetDir.RIGHT, offset);
break;
case KeyEvent.VK_J:
offsetTargetPos(TargetOffsetDir.LEFT, offset);
break;
case KeyEvent.VK_O:
offsetTargetPos(TargetOffsetDir.UP, offset);
break;
case KeyEvent.VK_U:
offsetTargetPos(TargetOffsetDir.DOWN, offset);
break;
}
} else {
switch (keyEvent.getKeyCode()) {
case KeyEvent.VK_W:
offsetTargetPos(TargetOffsetDir.FORWARD, offset);
break;
case KeyEvent.VK_S:
offsetTargetPos(TargetOffsetDir.BACKWARD, offset);
break;
case KeyEvent.VK_D:
offsetTargetPos(TargetOffsetDir.RIGHT, offset);
break;
case KeyEvent.VK_A:
offsetTargetPos(TargetOffsetDir.LEFT, offset);
break;
case KeyEvent.VK_E:
offsetTargetPos(TargetOffsetDir.UP, offset);
break;
case KeyEvent.VK_Q:
offsetTargetPos(TargetOffsetDir.DOWN, offset);
break;
}
}
}