Re: Re: Slyedit
By: deon to Digital Man on Fri Jan 22 2021 09:33 am
> Re: Re: Slyedit
> By: Digital Man to deon on Thu Jan 21 2021 12:06 pm
>
> DM> It'd helpful to know the actual character value being sent when you hit
> DM> Ctrl-Space. If you go into the user terminal settings, where it prompt
> DM> you to hit backspace/delete, if you hit Ctrl-Space, what character
> DM> value does it report?
>
> So it appears to be sending NUL 0x00.
>
> In the terminal settings pressing Ctrl-Space for the "delete" character,
> yielded nothing.
>
> I got hold of a key scanning tool for the MAC, and it reports this for CTRL
> Space:
>
> Key Down
> Characters:
> Unicode:0 / 0x0
> Keys:^Space
> Key Code: 49 / 0x31
> Modifiers: 262401 / 0x40101
>
> And for comparison, the delete key shows this.
>
> Key Down
> Characters:
> Unicode:127 / 0x7f
> Keys:(backspace symbol)
> Key Code: 51 / 0x33
> Modifiers: 256 / 0x100
>
> So maybe ignoring a NUL character would be sufficient?
Currently, in JS, a console.inkey() timeout looks the same as the receipt of a NUL (ASCII 0) from the user.
I just committed a change so that a script can use a new mode flag (K_NUL) to differentiate between the 2 conditions and SlyEdit could make use of that. Or he could just ignore the empty string result of console.inkey().
--
digital man
Rush quote #62:
He's a restless young romantic, wants to run the big machine .. New World Man
Norco, CA WX: 60.6øF, 59.0% humidity, 7 mph NNE wind, 0.00 inches rain/24hrs
--- SBBSecho 3.12-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|