aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/edbox.c9
-rw-r--r--src/irc.c6
-rw-r--r--src/irc.h2
3 files changed, 13 insertions, 4 deletions
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];