[comp.unix.aix] Mapping DEL to ^?

flint@cutmcvax.cs.curtin.edu.au (Daniel Baldoni) (05/27/91)

The following question is being asked on behalf of an idiot lecturer:

	How can I remap the <DELETE> key on a HFT terminal so that
	it actually registers as a <DEL> character (decimal 127)?

Many of our staff are used to using <DEL> as their INTR generator
and don't like the idea of having to use ^C.

Our machine is an RS/6000-320 running at level 3001.

Thnanks for any information you can provide.


--
	Daniel Baldoni

--------------------------------------------+----------------------------------
Phone:    +61-9-351-7667                    | School of Computing Science,
InterNet: flint@cutmcvax.cs.curtin.edu.au   | Curtin University of Technology,
UUCP:     I have absolutely NO idea!        | GPO Box U1987,
ARPA:     flint%cutmcvax.cs.curtin.edu.au   | Perth,
           ... @uunet.UU.NET                | Western Australia, 6001
--------------------------------------------+----------------------------------
"Any time there's something so ridiculously dangerous that no rational human
 being would even consider trying it, they send for me"
  - Belgarion, "King of the Murgos" by David Eddings

czahl@opal.cs.tu-berlin.de (Christian Zahl) (05/28/91)

flint@cutmcvax.cs.curtin.edu.au (Daniel Baldoni) writes:


>The following question is being asked on behalf of an idiot lecturer:

>	How can I remap the <DELETE> key on a HFT terminal so that
>	it actually registers as a <DEL> character (decimal 127)?

>Many of our staff are used to using <DEL> as their INTR generator
>and don't like the idea of having to use ^C.

>Our machine is an RS/6000-320 running at level 3001.

>Thnanks for any information you can provide.

On a PS/2 there is a program called "defkey" which is interactive driven.
I did not know if it is also supported on the R6K!? A look in your Commands
Reference Vol. 1 will tell you.

But there are sone ioctl functions provided by the hft to remap it.

Hope it helps, Chris

zjdg11@hou.amoco.com (Jim Graham) (05/29/91)

In article <3502@opal.cs.tu-berlin.de> czahl@opal.cs.tu-berlin.de (Christian Zahl) writes:
>flint@cutmcvax.cs.curtin.edu.au (Daniel Baldoni) writes:
>
>>	How can I remap the <DELETE> key on a HFT terminal so that
>>	it actually registers as a <DEL> character (decimal 127)?
>
>On a PS/2 there is a program called "defkey" which is interactive driven.

There is an even easier way to do it....just enter the following commands
(note:  the ^? is <carat><?> --- same for the ^H)

$ stty intr '^?'
$ stty erase '^H'

and, of course, the $ is your prompt.  this could be added to your .profile
(or .login, .cshrc, .bashrc, etc.) and would be executed each time someone
logs on.


for more info on this, just type "man stty" for the man pages.

--

Standard disclaimer....These thoughts are mine, not my employer's, and I'm
on my time...not my employer's.

------------------------------------------------------------------------------
Share and Enjoy!  (Sirius Cybernetics Corporation, complaints division)
73, de n5ial

Internet:  grahj@gagme.chi.il.us          (NOTE DIFFERENT E-MAIL ADDRESS !!!)
Amateur Radio:
   TCP/IP:    jim@n5ial.ampr.org (44.72.47.193)
   Packet:    n5ial@wb9mjn (Chicago, IL USA)
------------------------------------------------------------------------------

czahl@opal.cs.tu-berlin.de (Christian Zahl) (05/29/91)

zjdg11@hou.amoco.com (Jim Graham) writes:

>In article <3502@opal.cs.tu-berlin.de> czahl@opal.cs.tu-berlin.de (Christian Zahl) writes:
>>flint@cutmcvax.cs.curtin.edu.au (Daniel Baldoni) writes:
>>
>>>	How can I remap the <DELETE> key on a HFT terminal so that
>>>	it actually registers as a <DEL> character (decimal 127)?
>>
>>On a PS/2 there is a program called "defkey" which is interactive driven.

>There is an even easier way to do it....just enter the following commands
>(note:  the ^? is <carat><?> --- same for the ^H)

>$ stty intr '^?'
>$ stty erase '^H'

>and, of course, the $ is your prompt.  this could be added to your .profile
>(or .login, .cshrc, .bashrc, etc.) and would be executed each time someone
>logs on.

That's only right while you are in the canonical Mode, where the lineediting
is active. If you also need it in various programs so you have to remap it
a described.

Chris.

-------------------------------------------------------------------------------
Christian Zahl - pure student         ! Technische Universitaet Berlin, Germany
EMAIL: czahl@opal.cs.tu-berlin.de

madd@world.std.com (jim frost) (06/04/91)

>>$ stty intr '^?'
>>$ stty erase '^H'

>That's only right while you are in the canonical Mode, where the lineediting
>is active. If you also need it in various programs so you have to remap it
>a described.

If you're using aixterm on 3.1.5 or later you must put in a
translation to get the delete key to look like delete instead of some
silly escape sequence.  Add this to your .Xdefaults:

aixterm*translations: <Key>Delete: string(0x7f)

Some people, like myself, remap the backspace key to delete (thus
making emacs work reasonably on the '6000).  Xmodmap used to work with
3.1.3 or earlier but aixterm seems to ignore it as of 3.1.5.  The fix
is the following translation:

aixterm*translations: <Key>BackSpace: string(0x7f)\n<Key>Delete: string(0x7f)

If you're using emacs on a 3151 you basically get to disable help to
get reasonable editting behavior.

Happy hacking,

jim frost
jimf@saber.com