本文整理了Java中com.jogamp.newt.event.KeyEvent.getKeySymbol()
方法的一些代码示例,展示了KeyEvent.getKeySymbol()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.getKeySymbol()
方法的具体详情如下:
包路径:com.jogamp.newt.event.KeyEvent
类名称:KeyEvent
方法名:getKeySymbol
[英]Returns the virtual key symbol reflecting the current keyboard layout.
For #isPrintableKey(), the key symbol is the #isModifierKey()representation of the UTF-16 #getKeyChar().
E.g. symbol [ #VK_A, 'A'] for char 'a'.
[中]返回反映当前键盘布局的虚拟键符号。
对于#isPrintableKey(),键符号是UTF-16#getKeyChar()的#isModifierKey()表示形式。
例如,符号[#VK_A,'A']表示字符“A”。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void keyPressed(KeyEvent evt) {
int code = convertNewtKey(evt.getKeySymbol());
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, evt.isAutoRepeat());
keyEvent.setTime(evt.getWhen());
synchronized (eventQueue){
eventQueue.add(keyEvent);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void keyReleased(KeyEvent evt) {
int code = convertNewtKey(evt.getKeySymbol());
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, evt.isAutoRepeat());
keyEvent.setTime(evt.getWhen());
synchronized (eventQueue) {
eventQueue.add(keyEvent);
}
}
代码示例来源:origin: com.ardor3d/ardor3d-jogl
/**
* Convert from NEWT key event to Ardor3D Key. Override to provide additional or custom behavior.
*
* @param e
* the NEWT KeyEvent received by the input system.
* @return an Ardor3D Key, to be forwarded to the Predicate/Trigger system.
*/
public synchronized Key fromKeyEventToKey(final com.jogamp.newt.event.KeyEvent e) {
return JoglNewtKey.findByCode(e.getKeySymbol());
}
代码示例来源:origin: nifty-gui/nifty-gui
private void handleKeyEvent(@Nonnull final KeyEvent e, final boolean isKeyDown) {
keyboardEvents.add(convert(e, isKeyDown, converter.convertToNiftyKeyCode(e.getKeyCode(), e.getKeySymbol())));
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
public void keyPressed(KeyEvent evt) {
int code = convertNewtKey(evt.getKeySymbol());
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, evt.isAutoRepeat());
keyEvent.setTime(evt.getWhen());
synchronized (eventQueue){
eventQueue.add(keyEvent);
}
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
public void keyReleased(KeyEvent evt) {
int code = convertNewtKey(evt.getKeySymbol());
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, evt.isAutoRepeat());
keyEvent.setTime(evt.getWhen());
synchronized (eventQueue) {
eventQueue.add(keyEvent);
}
}
代码示例来源: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: org.jogamp.jogl/jogl-all-noawt
return;
final int keySymbol = e.getKeySymbol();
switch(keySymbol) {
case KeyEvent.VK_SPACE:
内容来源于网络,如有侵权,请联系作者删除!