public boolean setCommand(int key_code, boolean value) {
    switch (key_code) {
      case KeyEvent.VK_A:
        is_moving_forward = value;
        break;
      case KeyEvent.VK_Z:
        is_moving_backward = value;
        break;
      case KeyEvent.VK_X:
        is_strafing_left = value;
        break;
      case KeyEvent.VK_V:
        is_strafing_right = value;
        break;
      case KeyEvent.VK_LEFT:
        is_turning_clockwise = value;
        break;
      case KeyEvent.VK_RIGHT:
        is_turning_counter_clockwise = value;
        break;
      case KeyEvent.VK_CONTROL:
        is_firing_cannon = value;
        break;
      case KeyEvent.VK_SPACE:
        is_firing_secondary = value;
        break;
      default:
        return false;
    }
    return true;
  }