Top Description Methods
com.jogamp.newt.event

public Interface KeyListener

extends NEWTEventListener
Known Direct Implementers
com.jogamp.newt.event.TraceKeyAdapter, com.jogamp.newt.opengl.util.NEWTDemoListener, com.jogamp.newt.util.applet.JOGLNewtAppletBase, jogamp.newt.driver.x11.X11UnderlayTracker, com.jogamp.newt.awt.NewtCanvasAWT.FocusTraversalKeyListener, com.jogamp.newt.event.KeyAdapter

Listener for KeyEvents.
See Also
KeyEvent

Method Summary

Modifier and TypeMethod and Description
public void
keyPressed(KeyEvent e)

A key has been pressed, excluding auto-repeat modifier keys.

public void
keyReleased(KeyEvent e)

A key has been released, excluding auto-repeat modifier keys.

Method Detail

keyPressedback to summary
public void keyPressed(KeyEvent e)

A key has been pressed, excluding auto-repeat modifier keys. See KeyEvent.

keyReleasedback to summary
public void keyReleased(KeyEvent e)

A key has been released, excluding auto-repeat modifier keys. See KeyEvent.

To simulated the removed keyTyped(KeyEvent e) semantics, simply apply the following constraints upfront and bail out if not matched, i.e.:

       if( !e.isPrintableKey() || e.isAutoRepeat() ) {
           return;
       }