Skip to content
Snippets Groups Projects
Commit fee3fdd0 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

New @-codes: GETKEY and WAIT:<milliseconds>

GETKEY waits indefinitely for any key press by the user (resolves issue #245).
WAIT:<n> waits for up to n-milliseconds for a key press and then continues on.

For both cases, the key pressed is not echoed or acted upon in any way. Ctrl-keys could be handled by global or built-in ctrl-key handlers, so those would be the exception.
parent 789a2543
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -699,6 +699,16 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool ...@@ -699,6 +699,16 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return(nulstr); return(nulstr);
} }
if(strcmp(sp, "GETKEY") == 0) {
getkey();
return(nulstr);
}
if(strncmp(sp, "WAIT:", 5) == 0) {
inkey(K_NONE, atoi(sp + 5));
return(nulstr);
}
if(!strcmp(sp,"PAUSE") || !strcmp(sp,"MORE")) { if(!strcmp(sp,"PAUSE") || !strcmp(sp,"MORE")) {
pause(); pause();
return(nulstr); return(nulstr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment