Page 1 of 1

Escape not printing in shell window

Posted: Sat Nov 02, 2013 6:04 pm
by my_pc_is_amiga
In 3.x, typing "ESC" key would insert a reverse [ in the shell window. This is not working in 4.1. The control-[ doesn't work either.

This is the ASCII code for escape:
0x1B = Ctrl-[ or Ctrl-{ or Escape

Re: Escape not printing in shell window

Posted: Sun Nov 03, 2013 2:48 am
by tonyw
That is right, the ESC character is not echoed to the console screen. If it were, you would have to erase it again when it was followed by the rest of the sequence.

Re: Escape not printing in shell window

Posted: Sun Nov 03, 2013 3:50 am
by my_pc_is_amiga
Please see attached using RunInUAE and loading the 3.1 Workbench. This is the steps that I did:

1) Redirect the keyboard input to a file
COPY * TO RAM:EscapeFile

2) Enter the Escape Sequences

3) Press Ctrl+\ to terminate keyboard output to the file.

On OS4, (1) and (3) work okay...but (2) doesn't work the same way anymore. When console has been redirected, the escape doesn't show up as you mentioned. And the only way to get the keyboard to echo back is to "backspace" it. The 3.1 way was pretty convienent to enter the commands -- would be nice to have that feature back. I am seeing other ctrl characters do get printed like ctrl-o. There must be a reason to filter some and others are okay to echo?

Re: Escape not printing in shell window

Posted: Sun Nov 03, 2013 4:10 am
by tonyw
I can't test the old 3.1 version, I don't have a binary of it that will run under OS4.

I do have the old 68k version V52.1, and I'll load it and test it later. That is the version that was translated into C and forms the basis for the current V53.1. If V53.1 (and later) beahve differently from that V52.1, then I'll accept it is a bug.

But the difference may be in C:Copy, not the console, depending on what C:Copy writes to the console. It may be that C:Copy receives the keyboard input in RAW mode and echoes its own characters directly to the console. Or DOS could be modifying the characters before they get to C:Copy.

I'll have a look at it.

[later edit]

The characters are not echoed to the console, so nothing is drawn on the screen. It may be a change in the way DOS works, or C:Copy.
I seem to remember (from years ago) that the meaning of the "*" character was changed. I'll tell the DOS guy about this complaint - he might be able to help.
[/later edit]

Re: Escape not printing in shell window

Posted: Sun Nov 03, 2013 9:44 pm
by xenic
I don't think it's a DOS or Copy issue. I use a KingCON console instead of the Amiga console and the old method still works (typing the escape key displays as reverse [). I think it's a console issue. However, you can get the same results with something like this:

echo "*E[2*"z*N*E[2w*N*E[1m*N" >ram:EscapeFile

Re: Escape not printing in shell window

Posted: Sun Nov 03, 2013 10:31 pm
by tonyw
If it works using KingCon, then that rules out the console, since KingCon uses the same console device. The only thing that is different with KingCon is that it replaces the con-handler.

I'll try the 68K version if I can find it in an old system backup...

[edit]
OK, I found an old 68K con-handler and it displays (echoes) the ESC character, whereas the later PPC con-handlers do not.

I'll write myself a bug report (#8551) so it's not forgotten.
[/edit]

Re: Escape not printing in shell window

Posted: Sat Nov 09, 2013 12:47 pm
by my_pc_is_amiga
Great thanks!