select_action (p_request request)
{
  select ()
  {
    case request->scan_code == SC_LEFT:  return move_left;
    case request->scan_code == SC_RIGHT: return move_right;
    case request->scan_code == SC_UP:    return move_up;
    case request->scan_code == SC_DOWN:  return move_down;
  }
  else
  {
    error (DO_ERR_REQUEST);
  }
}