Xref: utzoo comp.emacs:4218 comp.unix.xenix:3277 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ucsd!ucsdhub!hp-sdd!ncr-sd!serene!rfarris From: rfarris@serene.CTS.COM (Rick Farris) Newsgroups: comp.emacs,comp.unix.xenix Subject: Using an key with Emacs and Xenix Summary: You can replace sequences with the key Keywords: emacs xenix alt unipress Message-ID: <167@serene.CTS.COM> Date: 10 Sep 88 06:08:01 GMT Reply-To: rfarris@serene.cts.com (Rick Farris) Organization: Serenity BBS, Del Mar, Ca. Lines: 62 In article <156@serene.CTS.COM> I wrote: % Can anyone tell me how I can use my alt-key on my pc instead of % prefixes? I would really like to be able to substitute say % for delete-word for -. I received a number of replies. Mike Khaw (mkhaw%teknowledge.arpa) replied: % If your alt key turns on the high-bit in an 8-bit byte, the comm. line % and Xenix terminal driver must support 8-bit data. In addition, your % "terminal type" under Xenix needs a termcap entry that includes the % "km" (key meta) capability. If emacs uses terminfo instead, I'm not sure % what the answer is. Keith Gabryelski (...crash!elgar!ag) added: % Closer inspection into Sco Xenix documention (RTFM) revealed a very % robust keyboard mapping scheme. Using mapkey(M) and its counter parts % mapstr(M), and mapscrn(M) you (the system administrator) can set your % console keyboard to do most anything. You can also setup keyboard % maps on a per screen basis. % % Several keymaps are supplied with your sco xenix system. They are in % the directory /usr/lib/keyboard and are used to remap keyboards for % use in other countries. % % Below is the mapkey file I have installed on my system. This map % makes the alt-key a true "Meta-key". I have this mapkey loaded at % boot time from /etc/rc. % % A meta key is similar to a control key in that you hold it down and % press another key to get a key not usually available on you keyboard % EXCEPT instead of sending a value from 0x00 (^@) to 0x1F (^_) [the % control characters] the meta key will send a value from 0x80 (~^@) % to 0xFF (~^?) [the meta-characters]. % % I have included a program called "octopus" which when run will give % you information on the keys sent from the keyboard. In Summary: You have to add "km" to your terminfo/cap entry, and recompile it. Use the mapkey (Xenix) command to map a new keymap into your terminal. And finally, (in Unipress Emacs) you have to set the variable "use-meta-bit" to 1. Now keystrokes work just like - keystrokes. I have Keith Gabryelski's "metakey" keyboard map, and would be happy to mail copies to anyone who'd like one. I'll also send his "octopus" program that accepts your keystrokes and shows (in several formats) exactly what is being returned. My next project will be to add significant functionality to the "ansi" term driver as supplied by SCO. _______________________________ Rick Farris | rfarris@serene.cts.com | Voice (619) 259-6793 POB M | !serene!rfarris | BBS 259-7757 Del Mar, CA 92014 |_______________________________| serene.UUCP 259-3704 If carpenters built buildings the way most programmers write programs, the first woodpecker that came along would destroy civilization. . .