 
 byte keyboard_getState()
 {
-  long now = (long) millis();           // Note: without interrupts millis() stops counting
+  word now = (word) millis();           // Note: without interrupts millis() stops counting
   for (;;) {
     word value = readPs2Buffer();
     if (value == 0) {                   // Buffer is empty
-      long hold = 35;                   // Hold ASCII keys for 3 frames (less than repetition rate)
+      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) 

//  bit 10   : stop bit (1)
void ps2interrupt()
{

  int nextBit = digitalRead(keyboardDataPin);

  long now = (long) millis();   // millis() stops when interrupts are disabled,
                                // but that is ok, because we will reset n
                                // after every vPulse (through allowPs2())


 flags &= ~(breakFlag | extendedFlag)

static word flags = 0;
static byte ascii = 0;
static word lastChange;

// XXX Put variables in a class for better scoping

