Skip to content

Commit 4e34356

Browse files
committed
uart input ignored bug fix
1 parent 646897d commit 4e34356

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cpython/lib/optional/pydos_ui_lilygokbd.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def serial_bytes_available(self):
4646
if self._key[0] != 0:
4747
retval = 1
4848
self._touched = True
49+
else:
50+
retval = self.uart_bytes_available()
4951
else:
5052
retval = 1
5153

@@ -65,6 +67,10 @@ def read_keyboard(self,num):
6567
retval = chr(self._key[0])
6668
self._touched = False
6769
num -= 1
70+
else:
71+
if self.uart_bytes_available():
72+
retval = stdin.read(1)
73+
num -= 1
6874

6975
return retval
7076

@@ -238,4 +244,4 @@ def input(disp_text=None):
238244
else:
239245
print(" \x08",end="")
240246

241-
return keys
247+
return keys

0 commit comments

Comments
 (0)