Newer
Older
break;
case CIO_KEY_F(3):
conn_send("\033Ow",3,0);
break;
case CIO_KEY_F(4):
conn_send("\033Ox",3,0);
break;
case 0x3000: /* ALT-B - Scrollback */
#ifdef PCM
if(!confirm("View scrollback?",NULL))
continue;
#endif
break;
case 0x2e00: /* ALT-C - Capture */
#ifdef PCM
if(!confirm("Go to capture control menu?",NULL))
continue;
#endif
break;
case 0x2000: /* ALT-D - Download */
#ifdef PCM
if(!confirm("Begin download?",NULL))
continue;
#endif
zmodem_download(bbs->dldir);
case 0x2100: /* ALT-F */
#ifdef PCM
if(!confirm("Go to font control menu?",NULL))
continue;
#endif
font_control(bbs);
case 0x2600: /* ALT-L */
#ifdef PCM
if(!confirm("Send login credentials?",NULL))
continue;
#endif
conn_send(bbs->user,strlen(bbs->user),0);
conn_send("\r",1,0);
SLEEP(10);
conn_send(bbs->password,strlen(bbs->password),0);
conn_send("\r",1,0);
if(bbs->syspass[0]) {
SLEEP(10);
conn_send(bbs->syspass,strlen(bbs->syspass),0);
conn_send("\r",1,0);
}
#ifdef PCM
if(!confirm("Go to music control menu?",NULL))
continue;
#endif
case 0x1600: /* ALT-U - Upload */
#ifdef PCM
if(!confirm("Begin upload?",NULL))
continue;
#endif
begin_upload(bbs->uldir, FALSE);
if(cio_api.mode!=CIOLIB_MODE_CURSES
&& cio_api.mode!=CIOLIB_MODE_CURSES_IBM
&& cio_api.mode!=CIOLIB_MODE_ANSI) {
ch[0]=key;
conn_send(ch,1,0);
break;
}
/* FALLTHROUGH for curses/ansi modes */
case 0x2d00: /* Alt-X - Exit */
case 0x2300: /* Alt-H - Hangup */
{
char *opts[3]={
"Yes"
,"No"
,""
};
char *buf;
struct text_info txtinfo;
gettextinfo(&txtinfo);
buf=(char *)malloc(txtinfo.screenheight*txtinfo.screenwidth*2);
gettext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
i=0;
init_uifc(FALSE, FALSE);
if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"Disconnect... Are you sure?",opts)==0) {
uifcbail();
free(buf);
cterm_write("\x0c",1,NULL,0,NULL); /* Clear screen into scrollback */
scrollback_lines=cterm.backpos;
return(key==0x2d00 /* Alt-X? */);
}
uifcbail();
puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
window(txtinfo.winleft,txtinfo.wintop,txtinfo.winright,txtinfo.winbottom);
textattr(txtinfo.attribute);
gotoxy(txtinfo.curx,txtinfo.cury);
free(buf);
case 19: /* CTRL-S */
if(cio_api.mode!=CIOLIB_MODE_CURSES
&& cio_api.mode!=CIOLIB_MODE_CURSES_IBM
&& cio_api.mode!=CIOLIB_MODE_ANSI) {
ch[0]=key;
conn_send(ch,1,0);
break;
}
/* FALLTHROUGH for curses/ansi modes */
i=wherex();
j=wherey();
case -1:
#ifdef PCM
if(!confirm("Disconnect?",NULL))
continue;
#endif
cterm_write("\x0c",1,NULL,0,NULL); /* Clear screen into scrollback */
scrollback_lines=cterm.backpos;
cterm_end();
#ifdef PCM
if(!confirm("Begin upload?",NULL))
continue;
#endif
begin_upload(bbs->uldir, FALSE);
#ifdef PCM
if(!confirm("Begin download?",NULL))
continue;
#endif
zmodem_download(bbs->dldir);
#ifdef PCM
if(!confirm("Got to capture control menu?",NULL))
continue;
#endif
capture_control(bbs);
break;
case 8:
#ifdef PCM
if(!confirm("Go to music control menu?",NULL))
continue;
#endif
#ifdef PCM
if(!confirm("Go to font control menu?",NULL))
continue;
#endif
font_control(bbs);
break;
case 10:
#ifdef PCM
if(!confirm("Disconnect?",NULL))
continue;
#endif
cterm_write("\x0c",1,NULL,0,NULL); /* Clear screen into scrollback */
scrollback_lines=cterm.backpos;
cterm_end();
conn_close();
gotoxy(i,j);
case 0x9800: /* ALT-Up */
#ifdef PCM
if(!confirm("Increase simulated BPS rate?",NULL))
continue;
#endif
if(speed)
speed=rates[get_rate_num(speed)+1];
else
speed=rates[0];
break;
case 0xa000: /* ALT-Down */
#ifdef PCM
if(!confirm("Decrease simulated BPS rate?",NULL))
continue;
#endif
i=get_rate_num(speed);
if(i==0)
speed=0;
else
speed=rates[i-1];
break;
case '\b':
key='\b';
/* FALLTHROUGH to default */
default:
if(key<256) {
ch[0]=key;
}
}