ITEM: S8076L

How to re-map dsusp char from ctl-y to something else?



Question:

On a pts stty -a shows dsusp mapped to ctl-y.  How can I remap
it to something a little harder to hit by accident, such as
ctl-;?  Is there any way to set this globally, without say 
putting it in a user's .profile or /etc/profile?

Response:

You can change the dsusp character using the stty command.
However, you can't change it to CTRL-; since there is no
control code for control semicolon.

To test this:

>stty -a
speed 9600 baud; 25 rows; 80 columns; 
intr = \^C; quit = \^\\; erase = \^H; kill = \^U; eof = \^D; eol = \^@
eol2 = \^@; start = \^Q; stop = \^S; susp = \^Z; dsusp = \^Y; reprint = \^R
discard = \^O; werase = \^W; lnext = \^V
-parenb -parodd cs8 -cstopb hupcl cread -clocal -parext 
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc 
ixon -ixany ixoff imaxbel 
isig icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -flusho pending iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 

>stty dsusp [HOLD ALT AND SHIFT KEYS] 031

This sets the dsusp character to decimal 031 which is a 
CTRL _  (\^_).

>stty -a

speed 9600 baud; 25 rows; 80 columns; 
intr = \^C; quit = \^\\; erase = \^H; kill = \^U; eof = \^D; eol = \^@
eol2 = \^@; start = \^Q; stop = \^S; susp = \^Z; dsusp = \^_; reprint = \^R
discard = \^O; werase = \^W; lnext = \^V
-parenb -parodd cs8 -cstopb hupcl cread -clocal -parext 
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc 
ixon -ixany ixoff imaxbel 
isig icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -flusho pending iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 

This change is on a per tty or pts basis and is a temporary change.
The same change could be made permanently per-tty (only TTY) via
SMIT chgtty and selecting to change POSIX attributes:

 DELAYED SUSPEND PROCESS character                  [\^y]                      

  Indicates the DSUSP (delayed suspend process) special character is     x
  recognized on input if job control is supported and the ISIG           x
  character is set. The DSUSP special character, like the SUSP           x
  character, generates a SIGTSTP signal; but the signal is set when a    x
  process in the foreground process group attempts to read the DSUSP     x
  character rather than when DSUSP is typed. If ISIG is set, the DSUSP   x
  character is discarded when processed.


        Though it is likely the default could be changed from
        control-y to something else in ODM (in the file PdAt)
        I would highly caution you against it, BUT:

        cd /etc/objrepos
        cp PdAt PdAt.bak
        odme PdAt
        Select retrieve/edit objects
        Scroll down to tty, hit the tab key to \^y and change
        the y to whatever you would like.

        


Support Line: How to re-map dsusp char from ctl-y to something else? ITEM: S8076L
Dated: March 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:36
Comments or suggestions? Contact us