Re: Re: Slyedit
By: deon to Digital Man on Fri Jan 22 2021 10:34 pm
> 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 K_NUL optoin won't do anything different with older builds of sbbs. Did you get and build the latest sbbs code from git?
--
digital man
Sling Blade quote #26:
Karl: kaiser blade, ax handle with long blade on it shaped kinda like a banana.
Norco, CA WX: 61.6øF, 61.0% humidity, 3 mph NE wind, 0.00 inches rain/24hrs
--- SBBSecho 3.12-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|