   Serial.begin(9600);
   pinMode(pedalPin1, INPUT);
   pinMode(pedalPin2, INPUT);
-  pinMode(ledPin1, OUTPUT);
+  pinMode(ledRedPin, OUTPUT);
+  pinMode(ledGreenPin, OUTPUT);
+  pinMode(ledBluePin, OUTPUT);
+  pinMode(modeButtonPin, INPUT);
   
 }
 

  int pedalEvent1 = digitalRead(pedalPin1);
  int pedalEvent2 = digitalRead(pedalPin2);

  if((lastPedalEvent1 == pedalEvent1) && (lastPedalEvent2 == pedalEvent2)) {
    return;
  }
  
  if((pedalEvent1 == HIGH) || (pedalEvent2 == HIGH)) {
    if(pedalEvent1 == HIGH) input(KEYCODE_A);
    if(pedalEvent2 == HIGH) input(KEYCODE_B);
    lastPedalEvent1 = pedalEvent1;
    lastPedalEvent2 = pedalEvent2;
    digitalWrite(ledPin1, HIGH);
  } else {
    releaseKey();
    lastPedalEvent1 = pedalEvent1;
    lastPedalEvent2 = pedalEvent2;    
    digitalWrite(ledPin1, LOW);
  }
}

void input(int keycode) {

const int KEYCODE_A = 0x04;
const int KEYCODE_B = 0x05;

const int KEYCODE_F8 = 0x41;
const int KEYCODE_F9 = 0x42;

const int KEYCODE_SPACE = 0x2c;

const int pedalPin1 = 2;
const int pedalPin2 = 3;
const int ledRedPin = 4;
const int ledGreenPin = 5;
const int ledBluePin = 6;
const int modeButtonPin = 7;

const int MODE_EMACS = 0;
const int MODE_INTELLIJ = 1;
const int MODE_INTERNET = 2;

int lastPedalEvent1 = 0;
int lastPedalEvent2 = 0;
int lastModeEvent = 1;

int mode = 3;

int DBG_MODE = 0;

