// THERE IS NO NEED FOR DEBOUNCE HERE

unsigned long elapsedTime;

byte k1;
byte k2;
byte k3;
byte k4;

const String STRING_TO_BE_TRANSMITTED = "Test String 1-2-3";

void setup() {
  pinMode(4, INPUT_PULLUP);
  pinMode(5, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(7, INPUT_PULLUP);
  
  Serial.begin(115200);
}

void loop() {
  elapsedTime = millis();
  
  k1 = digitalRead(7);
  k2 = digitalRead(6);
  k3 = digitalRead(5);
  k4 = digitalRead(4);

  if (k1 == LOW) {
    Serial.println(elapsedTime);
  }

  if (k2 == LOW) {
    Serial.println(elapsedTime / 1000);
  }

  if (k3 == LOW) {
    Serial.println(STRING_TO_BE_TRANSMITTED);
  }
}