Simple tweak to capacitive code

Hi,

I currently have the capacitive sensor ide running on my leonardo.
http://playground.arduino.cc/Main/CapacitiveSensor

I am using one piece of copper, per the example video

and my serial monitor is tracking the touches.

What I need to happen when someone touches the copper, is for the computer to read a serial keyboard code letter F.

I need the letter F to continue writing until the copper is no longer touched.

I will eventually use this to trigger a video to play / stop. Play when copper is touched (read F) and stop when the copper is left alone.

Can someone help me out?

Thanks

tried using this for reference?

I have, in fact i’ve used this code to write letters for another project. I just cant get the two to merge together.

void setup() {
  // make pin 2 an input and turn on the
  // pullup resistor so it goes high unless
  // connected to ground:
  pinMode(2, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(10, INPUT_PULLUP);
  pinMode(12, INPUT_PULLUP);
  Keyboard.begin();
}

void loop() {
  //if the button is pressed
  if(digitalRead(2)==LOW){
    //Send an ASCII '1',
    Keyboard.press('1');
    delay(125);
    Keyboard.release('1');
    delay(100);
  }  
  //if the button is pressed
  if(digitalRead(4)==LOW){
    //Send an ASCII '3',
    Keyboard.press('3');
    delay(125);
    Keyboard.release('3');
    delay(100);
  }
  //if the button is pressed
  if(digitalRead(6)==LOW){
    //Send an ASCII '4',
    Keyboard.press('4');
    delay(125);
    Keyboard.release('4');
    delay(100);
  }
  //if the button is pressed
  if(digitalRead(8)==LOW){
    //Send an ASCII '6',
    Keyboard.press('6');
    delay(125);
    Keyboard.release('6');
    delay(100);
  }
  //if the button is pressed
  if(digitalRead(10)==LOW){
    //Send an ASCII '7',
    Keyboard.press('7');
    delay(125);
    Keyboard.release('7');
    delay(100);
  }
  //if the button is pressed
  if(digitalRead(12)==LOW){
    //Send an ASCII '9',
    Keyboard.press('9');
    delay(125);
    Keyboard.release('9');
    delay(100);
  }
}

chuco61:
I have, in fact i've used this code to write letters for another project. I just cant get the two to merge together.

what do you mean by that?