public void keyPressed(KeyEvent arg0) {

		switch (arg0.getKeyCode()) {
		case KeyEvent.VK_UP:
			upKey.setPressed(true);
			break;
		case KeyEvent.VK_DOWN:
			downKey.setPressed(true);
			break;
		case KeyEvent.VK_SPACE:
			spaceKey.setPressed(true);
			break;
		case KeyEvent.VK_LEFT:
			leftKey.setPressed(true);
			break;
		case KeyEvent.VK_RIGHT:
			rightKey.setPressed(true);
			break;
		}

		/*
		 * int keycode = arg0.getKeyCode();
		 * 
		 * // System.out.println("" + keycode);
		 * 
		 * ks.setKeypressed(keycode);
		 */

	}