aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-21 02:49:05 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-21 02:49:05 -0400
commit2f8babf83a0c3ed8d8b26fa9b13b540b6f54fd3f (patch)
tree6468ae5b7b6a5c3a01cddcd31cb50125855dd236
parent3d015eaa5b94b66a80cfc31e6f95780cb00a2e4c (diff)
downloadfujinet-chat-2f8babf83a0c3ed8d8b26fa9b13b540b6f54fd3f.tar.gz
Esc now acts as a latch for the Start key (irssi-like, plus easier for XEGS/1200XL users).
-rw-r--r--TODO14
-rw-r--r--src/edbox.c9
-rw-r--r--src/irc.c6
-rw-r--r--src/irc.h2
4 files changed, 26 insertions, 5 deletions
diff --git a/TODO b/TODO
index a8eb4c3..0423e87 100644
--- a/TODO
+++ b/TODO
@@ -12,11 +12,23 @@ FujiChat features, we're almost at parity!
Other stuff:
+- Make ctrl-insert toggle between insert and typeover mode (The_Doctor__).
+- Make control + 1 through 7 switch windows (same as Start), because
+ the XEGS and 1200XL Start keys are hard to reach while typing (brad
+ and MarkG).
+- Also, make Escape a "start key toggle". Not only XEGS and 1200XL will
+ benefit: I *still* catch myself trying to type Esc+Number or Esc+A
+ because Irssi uses that.
+- Filter out the rest of the keystrokes that causes cgetc() to block.
+ Includes ctrl-/, ctrl-8, ctrl-9, maybe others (The_Doctor__).
+- Disable the Break key. It doesn't seem to hurt anything when you
+ press Break, but it makes the edit window disappear for a split
+ second.
- Stop using ASCII translation on the FujiNet. It's turning a outgoing
~ into a ^H (since ATASCII's backspace is DEL in regular ASCII). In
theory IRC servers always send us \r\n, we can support non-conforming
servers that just use \n without much trouble, too.
-- Load/save config files to N:SD//.FujiNetChat or such. Since we *have*
+- Load/save config files to N:SD///.FujiNetChat or such. Since we *have*
to have a FujiNet anyway, might as well make better use of it.
- Rewrite the incoming message parser! It needs to work more like
the command parser in cmd.c: know how many arguments to expect, and
diff --git a/src/edbox.c b/src/edbox.c
index d5728c2..d3b0b11 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -236,6 +236,7 @@ static void normal_keystroke(void) {
}
void edbox_keystroke(void) {
+ extern char start_latch;
char c;
while(OS.ch == 0xff)
@@ -266,9 +267,14 @@ void edbox_keystroke(void) {
c = 0x7d; /* ascii: } */
break;
case 0x1c: /* key: ESC */
- c = 0x60; /* ascii: ` */
+ keyclick();
+ if(!edbox_len) edbox_hide();
+ start_latch = 1;
+ return;
break;
case 0x5c: /* key: shift ESC */
+ c = 0x60; /* ascii: ` */
+ break;
case 0x9c: /* key: ctrl ESC */
c = 0x7e; /* ascii: ~ */
break;
@@ -277,7 +283,6 @@ void edbox_keystroke(void) {
case 0xbc: /* ctrl-caps */
OS.shflok ^= 0x40;
keyclick();
- OS.ch = 0xff;
return;
break;
case 0x27: /* atari key */
diff --git a/src/irc.c b/src/irc.c
index 8536d2c..91784b7 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -29,6 +29,7 @@ int msg_argcount;
char irc_away = 0;
char bell_type;
char hide_motd;
+char start_latch = 0;
static char msgbuf[MAX_MSG] = { 0 };
static char *msg; /* with source removed */
@@ -923,6 +924,9 @@ static void start_keystroke(void) {
i = cgetc();
+ start_latch = 0;
+ if(i == CH_ESC) return;
+
if(i >= '1' && i <= '7') {
s = i - '1';
if(s != scr_current) {
@@ -1013,7 +1017,7 @@ static void keystroke(void) {
txbuf_send_str("AWAY");
irc_away = 0;
}
- if(GTIA_READ.consol == 6) { /* start pressed */
+ if(GTIA_READ.consol == 6 || start_latch) { /* start pressed */
start_keystroke();
} else {
edbox_keystroke();
diff --git a/src/irc.h b/src/irc.h
index 0035444..783c223 100644
--- a/src/irc.h
+++ b/src/irc.h
@@ -44,13 +44,13 @@ void fn_disconnect(void);
/**** irc.c */
#define MAX_MSG_ARGS 8
-extern char bell_type;
extern char numbuf[10];
extern char *msg_src, *msg_cmd, *msg_dest, *msg_text;
extern char *msg_args[MAX_MSG_ARGS];
extern int msg_argcount;
extern char irc_away;
extern char bell_type;
+extern char start_latch;
extern char last_pm_nick[33];
extern char last_chan[33];