本文整理了Java中com.jogamp.newt.event.KeyEvent.getModifiers()
方法的一些代码示例,展示了KeyEvent.getModifiers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.getModifiers()
方法的具体详情如下:
包路径:com.jogamp.newt.event.KeyEvent
类名称:KeyEvent
方法名:getModifiers
暂无
代码示例来源:origin: jzy3d/jzy3d-api
public static int mask(com.jogamp.newt.event.KeyEvent event) {
int newtMods = event.getModifiers();
int awtMods = 0;
if ((newtMods & com.jogamp.newt.event.InputEvent.SHIFT_MASK) != 0) {
awtMods |= java.awt.event.InputEvent.SHIFT_MASK;
}
if ((newtMods & com.jogamp.newt.event.InputEvent.CTRL_MASK) != 0) {
awtMods |= java.awt.event.InputEvent.CTRL_MASK;
}
if ((newtMods & com.jogamp.newt.event.InputEvent.META_MASK) != 0) {
awtMods |= java.awt.event.InputEvent.META_MASK;
}
if ((newtMods & com.jogamp.newt.event.InputEvent.ALT_MASK) != 0) {
awtMods |= java.awt.event.InputEvent.ALT_MASK;
}
if ((newtMods & com.jogamp.newt.event.InputEvent.ALT_GRAPH_MASK) != 0) {
awtMods |= java.awt.event.InputEvent.ALT_GRAPH_MASK;
}
return awtMods;
}
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
@Override
public void keyPressed(KeyEvent e) {
if (focusedWindow != null) {
focusedWindow.sendKeyEvent(e.getEventType(), e.getModifiers(),
e.getKeyCode(), e.getKeySymbol(), e.getKeyChar());
}
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
@Override
public void keyReleased(KeyEvent e) {
if (focusedWindow != null) {
focusedWindow.sendKeyEvent(e.getEventType(), e.getModifiers(),
e.getKeyCode(), e.getKeySymbol(), e.getKeyChar());
}
}
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
throw new InternalError("XXX");
final AWTKeyStroke ks = AWTKeyStroke.getAWTKeyStroke(evt.getKeyCode(), evt.getModifiers(), onRelease);
boolean suppress = false;
if(null != ks) {
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
@Override
public void keyPressed(final KeyEvent e) {
if( !e.isPrintableKey() || e.isAutoRepeat() ) {
return;
}
if(e.getKeyChar()=='r' && 0==e.getModifiers() && null!=parentWin) {
e.setConsumed(true);
glWindow.invokeOnNewThread(null, false, new Runnable() {
public void run() {
if(null == glWindow.getParent()) {
glWindow.reparentWindow(parentWin, -1, -1, 0 /* hints */);
} else {
final InsetsImmutable insets = glWindow.getInsets();
final int x, y;
if ( 0 >= insets.getTopHeight() ) {
// fail safe ..
x = 32;
y = 32;
} else {
x = insets.getLeftWidth();
y = insets.getTopHeight();
}
glWindow.reparentWindow(null, x, y, 0 /* hints */);
glWindow.setDefaultCloseOperation( glClosable ? WindowClosingMode.DISPOSE_ON_CLOSE : WindowClosingMode.DO_NOTHING_ON_CLOSE );
}
} } );
}
}
代码示例来源:origin: com.io7m.jcamera/com.io7m.jcamera.examples.jogl
if ((e.getModifiers() & InputEvent.AUTOREPEAT_MASK) == InputEvent.AUTOREPEAT_MASK) {
return;
代码示例来源:origin: com.io7m.jcamera/com.io7m.jcamera.examples.jogl
if ((e.getModifiers() & InputEvent.AUTOREPEAT_MASK) == InputEvent.AUTOREPEAT_MASK) {
return;
代码示例来源:origin: com.io7m.jcamera/com.io7m.jcamera.examples.jogl
if ((e.getModifiers() & InputEvent.AUTOREPEAT_MASK) == InputEvent.AUTOREPEAT_MASK) {
return;
代码示例来源:origin: com.io7m.jcamera/com.io7m.jcamera.examples.jogl
if ((e.getModifiers() & InputEvent.AUTOREPEAT_MASK) == InputEvent.AUTOREPEAT_MASK) {
return;
代码示例来源:origin: org.processing/core
protected void nativeKeyEvent(com.jogamp.newt.event.KeyEvent nativeEvent,
int peAction) {
int peModifiers = nativeEvent.getModifiers() &
(InputEvent.SHIFT_MASK |
InputEvent.CTRL_MASK |
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
break;
case KeyEvent.VK_Q:
if( quitAdapterEnabled && 0 == e.getModifiers() ) {
System.err.println("QUIT Key "+Thread.currentThread());
quitAdapterShouldQuit = true;
内容来源于网络,如有侵权,请联系作者删除!