Escape not printing in shell window

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Escape not printing in shell window

Post 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
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1483
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Escape not printing in shell window

Post 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.
cheers
tony
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Re: Escape not printing in shell window

Post 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?
Attachments
Workbench3.1_Shell
Workbench3.1_Shell
escape3.1.jpg (29.76 KiB) Viewed 4027 times
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1483
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Escape not printing in shell window

Post 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]
cheers
tony
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 1:06 am

Re: Escape not printing in shell window

Post 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
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1483
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Escape not printing in shell window

Post 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]
cheers
tony
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Re: Escape not printing in shell window

Post by my_pc_is_amiga »

Great thanks!
Post Reply