You need to do 2 things:
1. In your constructor pass false so that GameCanvas does not suppress key events.
2. Define the keyPressed() or keyReleased() callback events.
Note that if you want to detect game keys only (which may or not be those in the numeric keypad)
you should use GameCanvas.getKeyStates() and pass true in the GameCanvas constructor instead of handling assynchronous key events this way. It should be far more efficient.
[ August 22, 2005: Message edited by: Eduardo Marques ]
[ August 22, 2005: Message edited by: Eduardo Marques ]