🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.terminals
Article #2100

Re: Recommendations for terminal with Meta key?

#2100
From: Julian Cowley
Date: Fri, 29 Jul 1988 10:20
239 lines
8350 bytes
In article <784@amethyst.ma.arizona.edu> rsm@amethyst.ma.arizona.edu (Robert Maier) writes:
>I plan on buying a new terminal for personal use.  Since I use Emacs a
>good bit, a Meta key is high on my list of requirements.  An escape
>key, even a reasonably placed one, is a poor substitute.
>
>Grepping for the `km' attribute (i.e., Meta key) in the Berkeley
>termcap file turns up only the following:
>
>	Mu|sun|Sun Microsystems Workstation console:
>	SD|supdup|SUPDUP virtual terminal:
>	MX|dmchat|dmchat version of datamedia 2500:
>	hz|2392|hp2392|hp2392a:
>	y7|t10|teleray 10 special:

Also try looking for the `MT' attribute.  This is another flag
for the meta key which I found by looking in the Emacs term.c
file.  I haven't seen it documented anywhere else but it does
turn up several entries in the /etc/termcap file.  On my system
(BSD), this is what I get:

	vs|xterm|vs100|xterm terminal emulator (X window system)
	D3|dm3025|datamedia 3025a:
	hz|2392|hp2392|hp2392a:      <-- repeat of above

So there you have two more choices to look at.

In the meantime, here is a source file for PC-Kermit that will
simulate a Meta key on an IBM PC standard keyboard.  Kermit is
the only comm program for IBMs I have found so far that actually lets
you customize the keyboard.  On top of that, Kermit is free.
To use this, you will need to have at least version 2.30, which
you should be able to find on your local host or on a local
bulletin board.  The previous versions of Kermit use a different
syntax for setting the scan codes.  If you are ambitious enough,
you could probably write a small program that could convert from
the new syntax to the old.

The original idea for this was some take files posted by Martin Neitzel
about a year ago.  They were written for an older version of Kermit, 
so the set commands were a bit different.  Also, they were set up to 
send two characters (ESC xx), which is not really emulating a true 
meta key.

Unfortunately, in the new versions of Kermit, they decided to
ignore certain scan codes (don't ask me why), so some of the more
important keys don't work.  These are any key combinations with
the following characters:

  [ ] { } ; : ' " ` ~ , . < > / ? \ | SPC DEL

M-ESC doesn't work, either.  To get around this, you'll just have
to use the old ESC key method.  You could probably set up the function
keys to fill in the gaps, but I didn't do this because I felt the
mapping should be a personal preference.

Don't forget to turn on the meta flag within Emacs, otherwise it
will just treat a meta key as a normal one.  You can turn on 
the meta flag permanently by putting the following in your .emacs file:

  (setq meta-flag t)

or by putting a :km attribute in the local TERMCAP entry for the 
terminal that you use.

While this is still not a complete Meta key emulation, it's better 
than nothing!  I'd still like to find out some answers to the original 
question about which terminals have a true Meta key.  Perhaps 
it would be a good idea for the FSF to distribute a list of 
terminals that have Meta keys in the etc/TERMS file.

Enjoy!

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Wrapped by Julian Cowley (julian@uhccux)
#   on Fri Jul 29 00:17:05 1988 GMT-10:00
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f emacs.tak -a "${1}" != "-c" ; then
  echo shar: Will not over-write existing file \"emacs.tak\"
else
echo shar: Extracting \"emacs.tak\" \(3310 characters\)
sed "s/^X//" >emacs.tak <<'END_OF_emacs.tak'
X; Emacs meta key simulation for PC-Kermit ver. 2.30 and greater
X;
X; Note that some key scan codes are ignored by Kermit, therefore
X; you will still have to use the ESC key.  These are key
X; combinations with any of the following keys:
X;
X;   [ ] { } ; : ' " , . < > / ? \ | ` ~ SPC DEL
X;
X; Written by Julian Cowley (julian@uhccux.uhcc.hawaii.edu), 7/28/88
X;
Xset key \3961 \128	; M-C-@ or M-C-SPC
Xset key \3358 \129	; M-C-a
Xset key \3376 \130	; M-C-b
Xset key \3374 \131	; M-C-c
Xset key \3360 \132	; M-C-d
Xset key \3346 \133	; M-C-e
Xset key \3361 \134	; M-C-f
Xset key \3362 \135	; M-C-g
Xset key \3363 \136	; M-C-h
Xset key \3351 \137	; M-C-i or M-C-TAB
Xset key \3364 \138	; M-C-j or M-C-LFD
Xset key \3365 \139	; M-C-k
Xset key \3366 \140	; M-C-l
Xset key \3378 \141	; M-C-m	or M-C-RET
Xset key \3377 \142	; M-C-n
Xset key \3352 \143	; M-C-o
Xset key \3353 \144	; M-C-p
Xset key \3344 \145	; M-C-q
Xset key \3347 \146	; M-C-r
Xset key \3359 \147	; M-C-s
Xset key \3348 \148	; M-C-t
Xset key \3350 \149	; M-C-u
Xset key \3375 \150	; M-C-v
Xset key \3345 \151	; M-C-w
Xset key \3373 \152	; M-C-x
Xset key \3349 \153	; M-C-y
Xset key \3372 \154	; M-C-z
X			; M-C-[ or M-ESC
X			; M-C-\
X			; M-C-]
Xset key \3965 \158	; M-C-^
Xset key \3970 \159	; M-C-_
X			; M-SPC
Xset key \2936 \161	; M-!
X			; M-"
Xset key \2938 \163	; M-#
Xset key \2939 \164	; M-$
Xset key \2940 \165	; M-%
Xset key \2942 \166	; M-&
X			; M-'
Xset key \2944 \168	; M-(
Xset key \2945 \169	; M-)
Xset key \2943 \170	; M-*
Xset key \2947 \171	; M-+
X			; M-,
Xset key \2434 \173	; M--
X			; M-.
X			; M-/
Xset key \2433 \176	; M-0
Xset key \2424 \177	; M-1
Xset key \2425 \178	; M-2
Xset key \2426 \179	; M-3
Xset key \2427 \180	; M-4
Xset key \2428 \181	; M-5
Xset key \2429 \182	; M-6
Xset key \2430 \183	; M-7
Xset key \2431 \184	; M-8
Xset key \2432 \185	; M-9
X			; M-:
X			; M-;
X			; M-<
Xset key \2435 \189	; M-=
X			; M->
X			; M-?
Xset key \2937 \192	; M-@
Xset key \2846 \193	; M-A
Xset key \2864 \194	; M-B
Xset key \2862 \195	; M-C
Xset key \2848 \196	; M-D
Xset key \2834 \197	; M-E
Xset key \2849 \198	; M-F
Xset key \2850 \199	; M-G
Xset key \2851 \200	; M-H
Xset key \2839 \201	; M-I
Xset key \2852 \202	; M-J
Xset key \2853 \203	; M-K
Xset key \2854 \204	; M-L
Xset key \2866 \205	; M-M
Xset key \2865 \206	; M-N
Xset key \2840 \207	; M-O
Xset key \2841 \208	; M-P
Xset key \2832 \209	; M-Q
Xset key \2835 \210	; M-R
Xset key \2847 \211	; M-S
Xset key \2836 \212	; M-T
Xset key \2838 \213	; M-U
Xset key \2863 \214	; M-V
Xset key \2833 \215	; M-W
Xset key \2861 \216	; M-X
Xset key \2837 \217	; M-Y
Xset key \2860 \218	; M-Z
X			; M-[
X			; M-\
X			; M-]
Xset key \2941 \222	; M-^
Xset key \2946 \223	; M-_
X			; M-`
Xset key \2334 \225	; M-a
Xset key \2352 \226	; M-b
Xset key \2350 \227	; M-c
Xset key \2336 \228	; M-d
Xset key \2322 \229	; M-e
Xset key \2337 \230	; M-f
Xset key \2338 \231	; M-g
Xset key \2339 \232	; M-h
Xset key \2327 \233	; M-i
Xset key \2340 \234	; M-j
Xset key \2341 \235	; M-k
Xset key \2342 \236	; M-l
Xset key \2354 \237	; M-m
Xset key \2353 \238	; M-n
Xset key \2328 \239	; M-o
Xset key \2329 \240	; M-p
Xset key \2320 \241	; M-q
Xset key \2323 \242	; M-r
Xset key \2335 \243	; M-s
Xset key \2324 \244	; M-t
Xset key \2326 \245	; M-u
Xset key \2351 \246	; M-v
Xset key \2321 \247	; M-w
Xset key \2349 \248	; M-x
Xset key \2325 \249	; M-y
Xset key \2348 \250	; M-z
X			; M-{
X			; M-|
X			; M-}
X			; M-~
X			; M-DEL
END_OF_emacs.tak
if test 3310 -ne `wc -c <emacs.tak`; then
    echo shar: \"emacs.tak\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0


Julian Cowley, U. of Hawaii at Manoa
julian@uhccux.uhcc.hawaii.edu
{uunet,ucbvax}!ucsd!nosc!uhccux!julian
julian@uhccux.bitnet
Technical Details
Message-ID: <2155@uhccux.uhcc.hawaii.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!ucsd!nosc!humu!uhccux!julian
References: <784@amethyst.ma.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!ucsd!nosc!humu!uhccux!julian
From: julian@uhccux.uhcc.hawaii.edu (Julian Cowley)
Newsgroups: comp.terminals,comp.emacs
Subject: Re: Recommendations for terminal with Meta key?
Summary: Kermit take file to simulate meta key on an IBM PC
Message-ID: <2155@uhccux.uhcc.hawaii.edu>
Date: 29 Jul 88 10:20:07 GMT
References: <784@amethyst.ma.arizona.edu>
Reply-To: julian@uhccux.uhcc.hawaii.edu (Julian Cowley)
Organization: University of Hawaii at Manoa
Lines: 238