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