Skip to content

Commit

Permalink
Restore modern delete key functionality in teraterm, pending determin…
Browse files Browse the repository at this point in the history
…ing what key combos other terminals use for delete.
  • Loading branch information
DESKTOP-M9CCUTI\ian committed Aug 4, 2024
1 parent d42f05f commit a1c413c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui/ui_term.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,17 @@ uint32_t ui_term_get_user_input(void)
switch(c)
{
case 0x08: // backspace
case 0x7F: // delete, but most terminals use this character as a BS, and use other combo for delete
if(!ui_term_cmdln_char_backspace())
{
printf("\x07");
}
break;
break;
case 0x7F: // delete
if(!ui_term_cmdln_char_delete())
{
printf("\x07");
}
break;
case '\x1B': // escape commands
rx_fifo_get_blocking(&c);
switch(c)
Expand Down Expand Up @@ -601,6 +606,7 @@ void ui_term_cmdln_arrow_keys(char *c)
}
break;
case '3': // 3~=delete
rx_fifo_get_blocking(c);
rx_fifo_get_blocking(&scrap);
if(scrap!='~') break;
if(!ui_term_cmdln_char_delete()) printf("\x07");
Expand Down

0 comments on commit a1c413c

Please sign in to comment.