@Override
        public void keyPressed(KeyEvent e) {
            
            switch(e.getKeyCode())
            {
                case KeyEvent.VK_W:
                case KeyEvent.VK_UP: maincanvas.vport.scroll(Directions.N); break;
                case KeyEvent.VK_S:    
                case KeyEvent.VK_DOWN: maincanvas.vport.scroll(Directions.S);  break;
                case KeyEvent.VK_A:    
                case KeyEvent.VK_LEFT: maincanvas.vport.scroll(Directions.W); break;
                case KeyEvent.VK_D:    
                case KeyEvent.VK_RIGHT: maincanvas.vport.scroll(Directions.E); break;
                case KeyEvent.VK_SPACE: pause(); break;
            }
            maincanvas.repaint();
           // throw new UnsupportedOperationException("Not supported yet.");
        }