Post by Dennis Boone7P would stop the escape, because it's not printable. 7B would block a
0x9b type CSI.
But the real proof is to just set the line to 8B and try it.
I've tried all three, with no success. SET TTI 8B however had some odd
effects, the output text has lots of accented characters in it. From
looking at a few it looks like the PDP11 is writing to the console
sending 7-bit characters with the parity in bit 7. The console receives
those 8-bit characters and happily displays them as 8-bit characters -
including CHR$128-CHR$255 when bit 7 is set.
As an aside, I've got E11 to send function and editing keypressed as
it has a DEFINE KEYPRESS command, which I used to build a list of
keypress strings. I've attached it at the end for posterity if anybody
else is looking for the same information.
However, I prefer to get this working with SIMH as SIMH allows me to
specify what console program to use, E11 uses it's own internal
console which is rather limited. I start up SIMH with AnsiCon which
gives a large ANSI implementation.
Another issue that is coming up (which I'm sure I knew the answer to
back in the 1980s) is that ANSI keypress sequences are:
"<esc>[blah blah terminator" - function/editing key
"<esc>" *nothing* - Escape key or Ctrl-[
But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
wait if there is nothing there, so that I can do something like:
read(stdin,&c,1);
if (c != 27) return c;
if (nothingpending(stdin)) return c;
while (thing) {
read(stdin,&nextc,1);
...
What magic do I need to implement nothingpending(stdin) ? The
equivalent of DOS/Window's kbhit(). I had thought the natual
method would be reading fstat(stdin), maybe expecting 'size'
to change, but nothing changes except the timestamps.
jgh
----8<----
Keypress definitions for E11 to specify DEC VT character sequences
for function and editing keys. Add these to your appropriate *.ini
file used to start up E11.
----8<----
define keypress 2 = number '2"'
define keypress ` = number "'@"
define keypress ' = number "#~"
define keypress F1 = if shift then chr$(27)+"[11;2~" else if ctrl then CHR$(27)+"[11;5~" else chr$(27)+"[11~" endif endif
define keypress F2 = if shift then chr$(27)+"[12;2~" else if ctrl then CHR$(27)+"[12;5~" else chr$(27)+"[12~" endif endif
define keypress F3 = if shift then chr$(27)+"[13;2~" else if ctrl then CHR$(27)+"[13;5~" else chr$(27)+"[13~" endif endif
define keypress F4 = if shift then chr$(27)+"[14;2~" else if ctrl then CHR$(27)+"[14;5~" else chr$(27)+"[14~" endif endif
define keypress F5 = if shift then chr$(27)+"[15;2~" else if ctrl then CHR$(27)+"[15;5~" else chr$(27)+"[15~" endif endif
define keypress F6 = if shift then chr$(27)+"[17;2~" else if ctrl then CHR$(27)+"[17;5~" else chr$(27)+"[17~" endif endif
define keypress F7 = if shift then chr$(27)+"[18;2~" else if ctrl then CHR$(27)+"[18;5~" else chr$(27)+"[18~" endif endif
define keypress F8 = if shift then chr$(27)+"[19;2~" else if ctrl then CHR$(27)+"[19;5~" else chr$(27)+"[19~" endif endif
define keypress F9 = if shift then chr$(27)+"[20;2~" else if ctrl then CHR$(27)+"[20;5~" else chr$(27)+"[20~" endif endif
define keypress F10 = if shift then chr$(27)+"[21;2~" else if ctrl then CHR$(27)+"[21;5~" else chr$(27)+"[21~" endif endif
define keypress F11 = if shift then chr$(27)+"[23;2~" else if ctrl then CHR$(27)+"[23;5~" else chr$(27)+"[23~" endif endif
define keypress F12 = if shift then chr$(27)+"[24;2~" else if ctrl then CHR$(27)+"[24;5~" else chr$(27)+"[24~" endif endif
define keypress HOME = if shift then chr$(27)+"[1;2~" else if ctrl then CHR$(27)+"[1;5~" else chr$(27)+"[1~" endif endif
define keypress INS = if shift then chr$(27)+"[2;2~" else if ctrl then CHR$(27)+"[2;5~" else chr$(27)+"[2~" endif endif
define keypress DEL = if shift then chr$(27)+"[3;2~" else if ctrl then CHR$(27)+"[3;5~" else chr$(27)+"[3~" endif endif
define keypress END = if shift then chr$(27)+"[4;2~" else if ctrl then CHR$(27)+"[4;5~" else chr$(27)+"[4~" endif endif
define keypress PGUP = if shift then chr$(27)+"[5;2~" else if ctrl then CHR$(27)+"[5;5~" else chr$(27)+"[5~" endif endif
define keypress PGDN = if shift then chr$(27)+"[6;2~" else if ctrl then CHR$(27)+"[6;5~" else chr$(27)+"[6~" endif endif
----8<----