public void keyPressed(KeyEvent key) {

		if(!PAUSED){
			if (key.getKeyCode() == 37) {
				player.setLeft(true);
				player.setRight(false);

			}
			if (key.getKeyCode() == 39) {
				player.setRight(true);
				player.setLeft(false);

			}
			if (key.getKeyCode() == 38) {
				up = true;
				cursor = true;

			}

			if (key.getKeyCode() == 40) {
				down = true;
				cursor = false;

			}
			if (key.getKeyCode() == 87) {
				player.setJump(true);
			}

			if (key.getKeyCode() == 70) {
				player.setShoot(true);
			}
			if (key.getKeyCode() == 10) {
				select = true;

			}
			if (key.getKeyCode() == KeyEvent.VK_E) {
				player.setJetpack(true);
			}

			if (key.getKeyCode() == KeyEvent.VK_P) {
				player.setPosition(109, 300);
			}
		}
		
		
		if (key.getKeyCode() == KeyEvent.VK_SPACE){
			if(!PAUSED){
				pauseGame = true;
				PAUSED = true;
			}else{
				pauseGame = false;
				PAUSED = false;
			}
		}

	}