Skip to content

Commit

Permalink
Shell and CON: Support DEL key.
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Dec 30, 2017
1 parent 540ad13 commit b949328
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/dos/dev_con.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ bool device_CON::Read(Bit8u * data,Bit16u * size) {
/* PC-98 does NOT return scan code, but instead returns nothing or
* control/escape code */
switch (reg_ah) {
case 0x39: // DEL
dev_con_readbuf[0] = 0x1B; dev_con_readbuf[1] = 0x44; dev_con_pos=0; dev_con_max=2;
break;
case 0x3A: // up arrow
data[count++] = 0x0B;
break;
Expand Down Expand Up @@ -410,7 +413,6 @@ bool device_CON::Read(Bit8u * data,Bit16u * size) {
break;
#if 0
// INS 0x1B 0x50 0x1B 0x50 0x1B 0x50
// DEL 0x1B 0x44 0x1B 0x44 0x1B 0x44
// ROLL UP -- -- --
// POLL DOWN-- -- --
// COPY -- -- --
Expand Down
4 changes: 3 additions & 1 deletion src/shell/shell_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ void DOS_Shell::InputCommand(char * line) {
}
else if (c == 0x1B) { /* escape */
DOS_ReadFile(input_handle,&c,&n);
if (c == 0x53) // F1
if (c == 0x44) // DEL
cr = 0x5300;
else if (c == 0x53) // F1
cr = 0x3B00;
else if (c == 0x54) // F2
cr = 0x3C00;
Expand Down

0 comments on commit b949328

Please sign in to comment.