why aren't 'esc' ~ 'break' recognized?

why aren't 'esc' ~ 'break' recognized?

Post by Alan Coopersmi » Sat, 21 Aug 1999 04:00:00




>sparc10, running solaris 2.5.1 (newly acquired). the escape key
>is not recognized as a break, it merely puts out the screen image

>there must be some place where the key mappings are doing this.
>where? how do i fix it, either in command mode or through admintool?

That's the expected behaviour of the ESCape key under UNIX terminal
applications.  Changing it would break many programs (anything using
emacs or vi editing keystrokes for a start).

Why do you think it should be "a break"?  And what do you mean by "a
break" anyway?

--
________________________________________________________________________

Univ. of California at Berkeley         http://soar.Berkeley.EDU/~alanc/

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Barry Margoli » Sat, 21 Aug 1999 04:00:00





>>sparc10, running solaris 2.5.1 (newly acquired). the escape key
>>is not recognized as a break, it merely puts out the screen image

>>there must be some place where the key mappings are doing this.
>>where? how do i fix it, either in command mode or through admintool?

>That's the expected behaviour of the ESCape key under UNIX terminal
>applications.  Changing it would break many programs (anything using
>emacs or vi editing keystrokes for a start).

>Why do you think it should be "a break"?  And what do you mean by "a
>break" anyway?

My memory could be failing me, but I think under early versions of AT&T
Unix (e.g. System III) ESC was used for what we now use Control-C for -- to
interrupt the current process.

If you want that, put:

stty intr '^['

in your .profile or .login.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Jeff Knode » Sat, 21 Aug 1999 04:00:00



: sparc10, running solaris 2.5.1 (newly acquired). the escape key
: is not recognized as a break, it merely puts out the screen image

:        

: there must be some place where the key mappings are doing this.
: where? how do i fix it, either in command mode or through admintool?

Moving up in the world from an old NCR? (Where the standard ctrl-c break
was mapped to the escape key).  While I strongly encourage you to just
change your habits to using control-c for 'break', you can certainly
make the escape key work.

What you are actually doing is mapping a non-alphanumeric character to a
tty function.  When your terminal tries to print an 'escape' character to
the screen (in fact, if you hold down control and hit [ it will generate
an 'escape' just as if you hit escape.) (Same thing as when 'return' gets
turned into ^m.)

if you do a 'stty -a' it will list all of your tty settings.  The last lines
will look something like:

erase  kill   werase rprnt  flush  lnext  susp   intr   quit   stop   eof
^H     ^U     ^?     ^R     ^O     ^V     ^Z/^Y  ^C     ^\     ^S/^Q  ^D    

You can use the command 'stty intr ^[' to give the escape key the behavior
of a control-c (though using VI will then become a real pain.. :) )
You can use the same mechanism to change what key you use to backspace
as well.

jk
p.s. putting the stty command in your .profile (or whatever shell init file
you choose) will save you typing it in each session.

Use the escape key when typing the stty command in, rather than the literal
carrat (^) followed by an open square bracket ([) (if this gives you problems,
you can type control-v esc which will cause the escape to not be interpreted).

--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=+
|  This isn't hell, but I can see it from here.          | "Cover Me; I'm     |

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Steve Bellen » Sun, 22 Aug 1999 04:00:00




>x-no-archive: yes


>....
>:
>:My memory could be failing me, but I think under early versions of AT&T
>:Unix (e.g. System III) ESC was used for what we now use Control-C for -- to
>:interrupt the current process.
>:
>:If you want that, put:
>:
>:stty intr '^['
>:
>:in your .profile or .login.
>:

>no, that is not it. i have intr ^C in my .profile.

>sample problem. running ksh, i want to cycle back through the history
>file. on every other unix machine with history, i type

>    'esc' followed by 'k'

>and that puts me at the bottom of the history file, and each
>successive 'k' moves me up the file one.

Type "set -o vi" and try again.
--

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Jeff Knode » Tue, 24 Aug 1999 04:00:00



: x-no-archive: yes



: well, when i hold down the control key and [, i get exactly the same
: thing i get when i hit escape. but i still can't get to cycle back
: through history in ksh with it! so it is not escape as a command -
: it is the same as if i hold down the a key and i get a sent to the
: screen.  this is NOT what happens on other systems.

Ok, Different problem.  You don't want escape to generate an interrupt,
which is what the previous message sounded like.  The behavior you're
describing sounds like you want to be running the shell in VI editor mode.

First, make certain what you are actually running as your shell (bourne
shell (/bin/sh) just does not do much in the way of command line editing.)
If its KSH or a derivative, do a set -o vi.  This will allow you
to use VI-like sequences to edit the command line (and peruse the history.)

The syntax may vary, depending upon the shell you are using. (Check the man
page for the shell.)

jk

jk
--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=+
|  This isn't hell, but I can see it from here.          | "Cover Me; I'm     |

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Supak Laile » Wed, 25 Aug 1999 04:00:00



>sample problem. running ksh, i want to cycle back through the history
>file. on every other unix machine with history, i type
>    'esc' followed by 'k'
>and that puts me at the bottom of the history file, and each
>successive 'k' moves me up the file one.
>what i get instead  is a screen symbol
>    ^[k

First, make sure that you're actually working on ksh. It's not the
default shell for Solaris.

Second, use command "set -o vi" to turn on command line editing

Supak
--
--
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 
 
 

why aren't 'esc' ~ 'break' recognized?

Post by Tlalo » Tue, 31 Aug 1999 04:00:00


Even though I'm not from Kansas, you really have balls using the signature
you are using and not being able to perform such a simple task. Anyway, at
the command prompt you type
$ set -o vi
Then, if you want to permanently set vi as your command line editor,
you'll have to include  in your .profile
EDITOR=/bin/vi
export EDITOR
otherwise every time you leave the console the set -o vi will disappear.
And the export is to export the set -o vi to child shells.

> x-no-archive: yes



> :>sparc10, running solaris 2.5.1 (newly acquired). the escape key
> :>is not recognized as a break, it merely puts out the screen image
> :>      
> :>there must be some place where the key mappings are doing this.
> :>where? how do i fix it, either in command mode or through admintool?
> :
> :That's the expected behaviour of the ESCape key under UNIX terminal
> :applications.  Changing it would break many programs (anything using
> :emacs or vi editing keystrokes for a start).
> :
> :Why do you think it should be "a break"?  And what do you mean by "a
> :break" anyway?

> sample problem: using ksh, i want to cycle back through history with

>         'esck'

> which works everywhere but on this sparc10 with its setup. all i get
> is the screen symbol

>         ^[k

> not very useful. i assume that what is being sent everywhere elsein
> unix is a break sequence followed by a k which calls up the previous
> entry in the history file.

> however, in vi, the esc key is recognized as a break, since it stops
> input, for instance. so vi has the ability to recognize esc, but the
> ordinary terminal emulation doesn't.
> --
> Kansas has finally resolved the Y2K problems. Next year will be 1700.

>         to send me email, remove 'syzygy.' from my address

 
 
 

1. Why can't I 'startx' except as 'root'?

                  ^^^^^^^^^^^^^^^^^^^^^^^^

That's it. The server must be suid root to allow normal users to start
X . Go into /usr/X11R6/bin and change the permissions for the Xserver
executable accordingly - e.g. if using the S3 server, that would be
XF86_S3 .

Michael

--

**************************************************************************
* "Real computer scientists don't program in assembler. They don't write *
*  in anything less portable than a number two pencil."                  *

2. Xboard Problem

3. OS5 'All licenses are in use' but aren't

4. Latest sources or SRPMS

5. ksh script leaving 'running jobs' that aren't

6. Cartridge Tape Questions

7. 'Hogs' created by 'Break' from terminal servers - HELP!

8. Linux on ABC late-night news.

9. Slackware 'setup' and 'pkgtool' broke!

10. Issuing 'echo <ESC>[r' from .cshrc doesn't work, HELP

11. Why aren't users' processes going away (Solaris 2.4)

12. x86: Why aren't SCSI ID's 8-15 enabled?

13. Why did 'nobody' do a 'find'