Noob here, need help with IR and 5V motor

Hey everyone! I just bought an Elegoo Starter Kit with an Uno R3, and I am new to code and Arduino IDE. I need help on a school project I am working on and need help programming a motor to spin based off an IR remote signal.

#include <IRLib.h>


#define skipLeft 0x52A3D41F
#define skipRight 0x20FE4DBB


int motor = 4;
IRrecv Receiver(11);
IRdecode Decoder;

void setup() {
  // put your setup code here, to run once:
  Receiver.enableIRIn();
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Receiver.GetResults(&Decoder))
  {
    Decoder.decode();
    switch (Decoder.value)
    {
      case skipLeft: digitalWrite(motor, LOW); break;
      case skipRight: digitalWrite(motor, HIGH); break;
    }
  }
  Receiver.resume();
}

Pretty much what I am wondering is if it is possible to click a button on the IR remote, and have it be programmed to run the motor until I click another button that is programmed to stop it. What would I need to change with the code to allow this?
Thank you in advance!

First off what remote are you using?

I cant find the exact specs of the remote I am using anywhere online. It is part of this kit my school bought:

Elegoo For Arduino UNO R3 Project Most Complete Starter Kit w/ Tutorial for MEGA2560 UNO NANO (63 Items) - Newegg.com.

I copied a code I found online and clicked the buttons and wrote down the hex values that popped up. In my code are the hex values I copied down for the left and right arrows.

Receiver.resume() should be called only after a code has been received and decoded. Else the receiver is reset all the time, doesn't have a chance to receive a complete code.