public void keyPressed(int k) {
   if (player.getMovable()) {
     if (k == KeyEvent.VK_LEFT) player.setLeft(true);
     if (k == KeyEvent.VK_RIGHT) player.setRight(true);
     if (k == KeyEvent.VK_W) player.setJumping(true);
     if (k == KeyEvent.VK_R) player.setScratching();
     if (k == KeyEvent.VK_F) player.setFiring();
   }
 }
 public void keyReleased(int k) {
   if (k == KeyEvent.VK_LEFT) player.setLeft(false);
   if (k == KeyEvent.VK_RIGHT) player.setRight(false);
   if (k == KeyEvent.VK_W) player.setJumping(false);
 }