(define (keys)
(local (k)
(while (!= (setq k (read-key)) 13)
(setq s (string k))
(println s))))
> (read-key) (read-key)
0
59
- first call returns 0, second call returns 59. /* thanks to Peter van Eerten for contributing this function */
/* included non-blocking ability 10.7.3, LM */
CELL * p_readKey(CELL * params)
{
#if defined(WINDOWS) || defined(OS2)
if(!isNil(evaluateExpression(params)) )
{
if(kbhit())
return(stuffInteger(getch()));
else
[b][u]return(stuffInteger(0));[/u][/b]
}
else
return(stuffInteger(getch()));
#else
...
/* not Windows or OS2 */
}
Quote from: marchildmann on August 07, 2023, 07:51:56 AMThank you Greg for managing the new forums!
Just re-registered because my previous nickname "hilti" was taken.
Cheers
Marc