Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 09:39 pm
DM> These appear to be the relevant lines, in SlyEdit.js:
So I had a play and didnt get anywhere. (SlyEdit uses getkey(), not inkey()).
require("sbbsdefs.js", "K_NOCRLF");
foo = console.getkey(K_NUL);
writeln('GETKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')');
bar = console.getkey(K_NONE);
writeln('GETKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')');
foo = console.inkey(K_NUL,10000);
writeln('INKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')');
bar = console.inkey(K_NONE,10000);
writeln('INKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')');
console.pause();
So I put together this script and ran it with ;exec ?testkey
And got this result:
GETKEY (K_NULL): ["\u000d"] (13)
GETKEY (K_NONE): ["\u000d"] (13)
INKEY (K_NULL): [""] (NaN)
INKEY (K_NONE): [""] (NaN)
The first 2 times I pressed CTRL-Space and nothing happened, so I pressed enter (hence the 0x0d).
The next two times, I only pressed CTRL-Space and they both yieled the same result.
Have I missed something?
...лоеп
... The only good government.is a bad one in a hell of a fright.
---
ю Synchronet ю Alterant | an SBBS in Docker on Pi!
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|