 
 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) 


int getKeymapIndex(void)
{
  int index = EEPROM.read(offsetof(struct EEPROMlayout, keymapIndex));
  return (index >= nrKeymaps) ? 0 : index; // Also handle invalid values
}


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

/*
 * Input buffering
