433 MHz 4 button remote to teensy 2

Hey all, I am trying to interface a 4 button RF remote to the teensy and have it output some keyboard commands.

I have buttons A, B, C and D

I hook up the teensy Vcc and GND to receiver Vcc and GND. I have A to Pin 1, B to Pin 2, C to Pin 3, D to Pin 4. I also have VT from RF receiver to pin 11 to toggle the boards LED when I press the RF remote buttons.

my “real” need are:
A = Pin 1 = send KEY_F3
B = Pin 2 = send KEY_F2
C = Pin 3 = send MODIFIERKEY_CTRL / KEY_R
D = Pin 4 = send KEY_F6

If I use the code below to test the RF buttons, I get a continuous string of letters abcdabcdabcd… I don’t even have to push the buttons on the RF remote. If I do push a button, the string stops momentarily and then continues.

void setup() {
Serial.begin(9600);
pinMode(1, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
delay(4000);
}

void loop() {
if (digitalRead(1) == HIGH) {
delay(10);
} else {
Keyboard.set_key1(KEY_A);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
}
if (digitalRead(2) == HIGH) {
delay(10);
} else {
Keyboard.set_key1(KEY_B);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
}
if (digitalRead(3) == HIGH) {
delay(10);
} else {
Keyboard.set_key1(KEY_C);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();

delay(500);
}
if (digitalRead(4) == HIGH) {
delay(10);
} else {
Keyboard.set_key1(KEY_D);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
}
delay(10);
}

If I use the code below, I get button presses for A, B, C, D

// constants won't change. They're used here to 
// set pin numbers:
enum Buttons {
  LEFT=1,
  DOWN=2,
  UP=3,
  RIGHT=4,
  numButtons
};

uint8_t buttonValues[] = { 'a','b','c','d',' ' };

// Variables will change:
int buttonState;             // the current reading from the input pin
int lastButtonState = 0;     // the previous reading from the input pin
int lastReading = 0;         // last debounced reading - changed after debounce interval

// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers

void setup() {
  for (int i=LEFT; i < numButtons; ++i) {
    pinMode(i, INPUT);
    digitalWrite(i, HIGH);  // pullup resistor
  }
  Keyboard.begin();
  Serial.begin(9600);
  Serial.println("ready");
}

void loop() {
  // read the state of the switch into a local variable:
  int reading = 0;
  
  for (int buttonPin = LEFT; buttonPin < numButtons; ++buttonPin) {
    reading <<= 1;
    reading |= digitalRead(buttonPin);
  }

  // check to see if you just pressed the button 
  // (i.e. the input went from LOW to HIGH),  and you've waited 
  // long enough since the last press to ignore any noise:  

  // If the switch changed, due to noise or pressing:
  if (reading != lastButtonState) {
    // reset the debouncing timer
    lastDebounceTime = millis();
    Serial.print("reading ");Serial.println(reading,BIN);
  } 
  
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:
    buttonState = reading ^ lastReading;
    lastReading = reading;
    if (buttonState) {
      Serial.print("buttonState ");Serial.println(buttonState,BIN);
    }
    uint8_t bp = 1 << (numButtons - LEFT - 1);
    for (int i=0; bp; bp >>= 1, ++i) {
      if (buttonState & bp) {
        uint8_t v = buttonValues[i];
        if (reading & bp) {
          if (v == ' ') {
            Keyboard.set_modifier(0);
            Keyboard.set_key1(0);
            Keyboard.send_now();
          } 
        } else {
          if (v == ' ') {
            Keyboard.set_modifier(MODIFIERKEY_CTRL|MODIFIERKEY_ALT|MODIFIERKEY_GUI);
            Keyboard.set_key1(KEY_W);
            Keyboard.send_now();          
          } else {
            Keyboard.print((char)v);
          }
        }
      }
    }
  }

  // save the reading.  Next time through the loop,
  // it'll be the lastButtonState:
  lastButtonState = reading;
}

So I need a combination of both scripts. I “think” I need to debounce the buttons, and the second script is doing that. As a total newb, I can not tell what parts of the scripts to merge to get my desired result.