Interface KeyListener

All Superinterfaces:
All Known Implementing Classes:

public interface KeyListener
extends java.util.EventListener

The listener interface for receiving keyboard events such as key presses.

This listener should not be confused with java.awt.event.KeyListener. You should explicitly use com.webrenderer.event.KeyListener

browser.addKeyListener(new com.webrenderer.event.KeyListener(){...});

The class that is interested in processing a keyboard event either implements this interface (and all the methods it contains) or extends the abstract KeyAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with an IBrowserCanvas using the addKeyListener method.

Method Summary
 void onKeyDown(KeyEvent e)
          Invoked when a key is pushed down.
 void onKeyPress(KeyEvent e)
          Invoked when a character is typed.
 void onKeyUp(KeyEvent e)
          Invoked when a key is released.

Method Detail


public void onKeyDown(KeyEvent e)
Invoked when a key is pushed down.


public void onKeyUp(KeyEvent e)
Invoked when a key is released.


public void onKeyPress(KeyEvent e)
Invoked when a character is typed.