projects
/
dosemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1103e6e
)
Fixed Backspace key handling on Unix
author
Robert Pengelly
<robertapengelly@hotmail.com>
Tue, 20 Oct 2026 16:42:55 +0000
(17:42 +0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Tue, 20 Oct 2026 16:42:55 +0000
(17:42 +0100)
interrupts.c
patch
|
blob
|
history
diff --git
a/interrupts.c
b/interrupts.c
index 6f2fba7a8c8fc87311cae2623eaa49abfa488e3a..f20270c7b28e5db80cbb58dd5a0dd72f9535267a 100644
(file)
--- a/
interrupts.c
+++ b/
interrupts.c
@@
-1338,6
+1338,10
@@
static int host_read_key_from (FILE *source) {
ch = read (fd, &byte, 1) == 1 ? byte : EOF;
+ if (ch == 0x7F) {
+ ch = 0x08;
+ }
+
if (ch == 0x1B) {
FD_ZERO (&ready);
@@
-1500,7
+1504,13
@@
static int host_poll_key_from (FILE *source) {
}
if (changed_termios) {
+
tcsetattr (fd, TCSANOW, &oldt);
+
+ if (ch == 0x7F) {
+ ch = 0x08;
+ }
+
}
}
@@
-1618,6
+1628,10
@@
static int bios_read_key (CPU8086 *cpu, int wait) {
ch = byte;
+ if (ch == 0x7F) {
+ ch = 0x08;
+ }
+
if (ch == 0x1B) {
FD_ZERO (&ready);