process_request (p_request request)
{
  select ()
  {
    case request->scan_code == SC_LEFT:  send_response (request, DO_MOVE_LEFT);  break;
    case request->scan_code == SC_RIGHT: send_response (request, DO_MOVE_RIGHT); break;
    case request->scan_code == SC_UP:    send_response (request, DO_MOVE_UP);    break;
    case request->scan_code == SC_DOWN:  send_response (request, DO_MOVE_DOWN);  break;
  }
  else
  {
    send_response (request, DO_ERR_REQUEST);
  }
}