1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
extern volatile char key[128]; char keyStatus[128]; void refreshKeys() { int i; for (i = 0; i < 128; i++) if (key[i]) { if (keyStatus[i] < 2) keyStatus[i]++; else keyStatus[i] = 2; } else keyStatus[i] = 0; }