com.jogamp.newt.event

## Interface KeyListener

- All Superinterfaces:
    EventListener, NEWTEventListener
  All Known Implementing Classes:
    JOGLNewtAppletBase, KeyAdapter, TraceKeyAdapter

      public interface KeyListener
      extends NEWTEventListener

  Listener for `KeyEvent`s.
  See Also:
    `KeyEvent`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `keyPressed(KeyEvent e)` A key has been `pressed`, excluding `auto-repeat` `modifier` keys.
    `void` | `keyReleased(KeyEvent e)` A key has been `released`, excluding `auto-repeat` `modifier` keys.

- - ### Method Detail

    - #### keyPressed

          void keyPressed(KeyEvent e)

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

    - #### keyReleased

          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;
                  }

Copyright 2010 JogAmp Community.