Commit fee3fdd0 authored by Rob Swindell's avatar Rob Swindell 💬
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
......@@ -699,6 +699,16 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
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")) {
pause();
return(nulstr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment