DIGITAL PINS spielen verrückt

Hallo,
vielen Dank erstmal für die vielen Antworten!
Ich habe jetzt alle Pins als INPUT_PULLUP definiert und dann abgefragt ob die Pins LOW sind, sodass dieser Code entsteht:

#include <Keyboard.h>
// Pins der Buttons
const int button1Pin = 2;
const int button2Pin = 4;
const int button3Pin = 7;
const int button4Pin = 8;


void setup() {
  // Festlegen der Pins als INPUT
  pinMode(button1Pin, INPUT_PULLUP);
  pinMode(button2Pin, INPUT_PULLUP);
  pinMode(button3Pin, INPUT_PULLUP);
  pinMode(button4Pin, INPUT_PULLUP);
  Keyboard.begin(); 
}

void loop() {

  if (digitalRead(button1Pin) == LOW) { //Wenn Button 1 gedrückt wird
    Keyboard.write('a');
    delay(100);
    Keyboard.write(KEY_RETURN);
    delay(1000);
  }

  if (digitalRead(button2Pin) == LOW) { //Wenn Button 2 gedrückt wird
    Keyboard.write('b');
    delay(100);
    Keyboard.write(KEY_RETURN);
    delay(1000);
  }
  
  if (digitalRead(button3Pin) == LOW) { //Wenn Button 3 gedrückt wird
    Keyboard.write('k');
    delay(100);
    Keyboard.write(KEY_RETURN);
    delay(1000);
  }
  
  if (digitalRead(button4Pin) == LOW) { //Wenn Button 4 gedrückt wird
    Keyboard.write(KEY_RETURN);
    delay(1000);
  }

}

Dies funktioniert auch ohne Probleme!

Jedoch frage ich mich warum die andere Lösung mit der Abfrage nach HIGH immer funktioniert hat und jetzt aufeinmal nicht mehr.

Auf jeden Fall kann ich jetzt erstmal weiter "basteln".

Vielen Dank!