From 6521e971cdb772c53256d84a54c8d7b2d1ffa632 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 1 Mar 2026 02:00:23 -0500 Subject: Scrollback! --- src/edbox.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/edbox.c') diff --git a/src/edbox.c b/src/edbox.c index 9231b50..0903cb9 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -4,6 +4,7 @@ #include "addrs.h" #include "screen.h" #include "edbox.h" +#include "keyclick.h" /* TODO: tab completion */ @@ -37,7 +38,7 @@ void edbox_show(void) { scr_waitvcount(116); - *dlist_bottom_lms = addr; + *dlist_status_lms = addr; show_cursor(); } @@ -96,6 +97,7 @@ void edbox_readline(char *dest, char len) { } static void special_keystroke(char c) { + keyclick(); OS.ch = 0xff; edbox_putc(c); } @@ -178,11 +180,9 @@ void edbox_keystroke(void) { ; edbox_show(); - hide_cursor(); - OS.invflg = c = 0; + c = 0; - /* XXX: these keys don't click. */ switch(OS.ch) { case 0xa0: /* key: ctrl [ */ c = 0x7b; /* ascii: { */ @@ -197,6 +197,12 @@ void edbox_keystroke(void) { case 0x9c: /* key: ctrl ESC */ c = 0x7e; /* ascii: ~ */ break; + case 0x3c: /* caps */ + OS.shflok ^= 0x40; + keyclick(); + break; + case 0x7c: /* shift-caps */ + case 0xbc: /* ctrl-caps */ case 0x27: /* atari key */ case 0x67: /* ...w/shift */ case 0x97: /* ...w/ctrl */ @@ -207,6 +213,8 @@ void edbox_keystroke(void) { break; } + hide_cursor(); + if(c) { special_keystroke(c); } else { -- cgit v1.2.3