Operating System - HP-UX
1748022 Members
4803 Online
108757 Solutions
New Discussion юеВ

Disabling "alt-b" through stty

 
SOLVED
Go to solution
Eric Lipede
Frequent Advisor

Disabling "alt-b" through stty

Hi there

does anyone know how to disable the key sequence "Alt-b".

Im on a v11-2 itanium box with that sequence currently jumping to the begining of the line at the prompt. It also breaks out of the package im using.


My current stty settings are
root@lonunix1-/ujobs/flag_dir/open_ports: stty -a
speed 38400 baud; line = 0;
rows = 44; columns = 137
min = 1; time = 0;
intr = ^C; quit = ^\; erase = DEL; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
root@lonunix1-/ujobs/flag_dir/open_ports:


does anyone know what stty sequence i need to issue to disable? Many thks
Quod sum eris
3 REPLIES 3
Bill Hassell
Honored Contributor
Solution

Re: Disabling "alt-b" through stty

ALT-B is not an ASCII character. The only special ASCII characters are created with the CTRL key. The ALT key is only recognized by Windows (or Mac, etc) and your application program. Note that there are many, many emulation programs that run on PCs and some are 'quirky' at best. You'll need to consult your emulator's documentation to see what the character is actually doing. It may be that ALT-b is sending some special codes to HP-UX, and you can decode these by using xd, something like this:

xd -xc

This will not give you any prompt, but as you type the special characters, finish the input with CTRL-d and you'll see the hex (and visible ASCII codes) on the line. Hint: 0a is the carriage return (\n) and the rest of the characters can be decoded with the ascii man page.


Bill Hassell, sysadmin
Eric Lipede
Frequent Advisor

Re: Disabling "alt-b" through stty

Nice one

I got the following results...
# xd -xc
"keyboard break key press" <----
ctrl-d (2ce)

then the returned values were....

0000000 1a00
1a
0000001


how would i disable/ trap these ?
Many thks in advance
Quod sum eris
Dennis Handly
Acclaimed Contributor

Re: Disabling "alt-b" through stty

>I got the following results...
# xd -xc
"keyboard break key press" <----
ctrl-d (2ce)

What did you type? (Using "2ce" instead of the word "twice" is not conductive to effective communication.)
Yes, I had to use control-D twice. Why did you mention "break key"?

>then the returned values were....
0000000 1a00

This is a control-Z.
I typically have that as: stty susp ^z