 //  bit 10   : stop bit (1)
 void ps2interrupt()
 {
-
-  int nextBit = digitalRead(keyboardDataPin);
-
-  long now = (long) millis();   // millis() stops when interrupts are disabled,
+  byte nextBit = digitalRead(keyboardDataPin);
+
+  word now = (word) millis();   // millis() stops when interrupts are disabled,
                                 // but that is ok, because we will reset n
                                 // after every vPulse (through allowPs2())
 

 */
static int bitBuffer;
static byte _n;
static long lastClock;

/*
 * Input buffering


byte keyboard_getState()
{
  word now = (word) millis();           // Note: without interrupts millis() stops counting
  for (;;) {
    word value = readPs2Buffer();
    if (value == 0) {                   // Buffer is empty
      word hold = 35;                   // Hold ASCII keys for 3 frames (less than repetition rate)
      if (ascii == (255^buttonStart))   // [Ctrl-Alt-Del] maps to [Start] for 2 seconds
        hold = 2500;
      if (now - lastChange > hold) 
