Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37589 > unrolled thread
| Started by | luserdroog <luser.droog@gmail.com> |
|---|---|
| First post | 2019-10-20 21:40 -0700 |
| Last post | 2019-10-22 14:26 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.javascript
Simulating a terminal interface. luserdroog <luser.droog@gmail.com> - 2019-10-20 21:40 -0700
Re: Simulating a terminal interface. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-21 15:08 -0700
Re: Simulating a terminal interface. Arno Welzel <usenet@arnowelzel.de> - 2019-10-22 14:24 +0200
Re: Simulating a terminal interface. Arno Welzel <usenet@arnowelzel.de> - 2019-10-22 14:26 +0200
| From | luserdroog <luser.droog@gmail.com> |
|---|---|
| Date | 2019-10-20 21:40 -0700 |
| Subject | Simulating a terminal interface. |
| Message-ID | <7f389caa-a37f-45d0-ae09-d104c9cef21b@googlegroups.com> |
I've been playing with a toy project with idle dreams of making a PostScript interpreter app. But for starters I need a very basic command-line type of interface. I've had a couple of thoughts about different ways to do this. 1. Have a text input and "accept" the value and clear it on ENTER. Append the accepted line to a div. 2. Have 2 divs and a fixed '|' character between them representing the cursor. Then I could allow for basic cursor movement and editing by using the two divs and a "buffer gap" algorithm (or is it a pattern?). 3. Something else beyond my imagination?? I tried both 1 and 2 (with no editing, just responding to ENTER). Option 2 looks prettier on the screen without any help. But the js to handle option 1 is vastly simpler. Any thoughts or advice in this area?
[toc] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2019-10-21 15:08 -0700 |
| Message-ID | <6106ed25-6772-4b13-8616-3eb9952d9aae@googlegroups.com> |
| In reply to | #37589 |
On Sunday, October 20, 2019 at 11:40:17 PM UTC-5, luserdroog wrote: > I've been playing with a toy project with idle dreams of > making a PostScript interpreter app. But for starters I need > a very basic command-line type of interface. > > I've had a couple of thoughts about different ways to do this. > > 1. Have a text input and "accept" the value and clear it on ENTER. > Append the accepted line to a div. > > 2. Have 2 divs and a fixed '|' character between them representing > the cursor. Then I could allow for basic cursor movement and editing > by using the two divs and a "buffer gap" algorithm (or is it a pattern?). > > 3. Something else beyond my imagination?? > > I tried both 1 and 2 (with no editing, just responding to ENTER). > Option 2 looks prettier on the screen without any help. But the js > to handle option 1 is vastly simpler. > > Any thoughts or advice in this area? Here's 20 minutes of thought: https://codepen.io/mlhaufe/pen/JjjEoaZ
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-10-22 14:24 +0200 |
| Message-ID | <h18aogF7nooU1@mid.individual.net> |
| In reply to | #37589 |
On 21.10.19 06:40, luserdroog wrote: > I've been playing with a toy project with idle dreams of > making a PostScript interpreter app. But for starters I need > a very basic command-line type of interface. > > I've had a couple of thoughts about different ways to do this. This may give you some ideas: <https://github.com/shellinabox/shellinabox> -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-10-22 14:26 +0200 |
| Message-ID | <h18ar8F7nooU2@mid.individual.net> |
| In reply to | #37598 |
On 22.10.19 14:24, Arno Welzel wrote: > On 21.10.19 06:40, luserdroog wrote: > >> I've been playing with a toy project with idle dreams of >> making a PostScript interpreter app. But for starters I need >> a very basic command-line type of interface. >> >> I've had a couple of thoughts about different ways to do this. > > This may give you some ideas: > > <https://github.com/shellinabox/shellinabox> More specific: <https://github.com/shellinabox/shellinabox/blob/master/shellinabox/vt100.jspp> -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web