www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - receiving key events

How can I pick up key events?  Doing this doesn't seem to work.

mainShell.addKeyListener(new class KeyAdapter {
     public void keyPressed (KeyEvent e)
     {
         writefln("Keypressed");
     }
});
Apr 26 2006