Update SmartyKitApple1_KeyboardDriver.ino

Updated delay time to prevent repeating of keyboard input chars
This commit is contained in:
Sergei Panarin 2019-12-15 14:53:49 +03:00
parent 825c37505a
commit 4410f028e3

View File

@ -56,7 +56,7 @@ void loop() {
// read the next key // read the next key
char c = keyboard.read(); char c = keyboard.read();
/*
// check for some of the special keys // check for some of the special keys
if (c == PS2_ENTER) { if (c == PS2_ENTER) {
Serial.println(); Serial.println();
@ -83,6 +83,17 @@ void loop() {
// otherwise, just print all normal characters // otherwise, just print all normal characters
Serial.print(c); Serial.print(c);
} }
*/
//process Backspace, Left Arrow, Delete as Apple I backspace '_'
if (c == PS2_BACKSPACE) {
c = '_';
} else if (c == PS2_LEFTARROW) {
c = '_';
} else if (c == PS2_DELETE) {
c = '_';
}
//print c to register //print c to register
for (int count = 1; count <= 8 ; count++) for (int count = 1; count <= 8 ; count++)
@ -94,6 +105,6 @@ void loop() {
} }
digitalWrite(DataBus[7], HIGH); digitalWrite(DataBus[7], HIGH);
KBDCR_Enable(); KBDCR_Enable();
delay(20); delay(4);
} }
} }