Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!nuchat!sugar!karl From: karl@sugar.UUCP (Karl Lehenbauer) Newsgroups: comp.unix.xenix,comp.emacs Subject: Hack for MicroEMACS to support fkeys/keypad under Message-ID: <1132@sugar.UUCP> Date: Sat, 28-Nov-87 19:39:50 EST Article-I.D.: sugar.1132 Posted: Sat Nov 28 19:39:50 1987 Date-Received: Tue, 1-Dec-87 02:40:20 EST Organization: Sugar Land UNIX - Houston, TX Lines: 119 Keywords: Microport MicroEMACS function keys hack Xref: mnetor comp.unix.xenix:1228 comp.emacs:2445 This is a context diff of a hack to make MicroEMACS function keys work under Microport Unix System V/286. You also have to replace your ANSI keyboard mappings, defined in '/etc/rc.d/keybrd.rc' with one I've included as a shell archive at the end. Yes, it's gross, but it makes the function, arrow keys, and miscellaneous keypad keys work. Consult keybrd.rc for their definitions. This adds a Microport entry to estruct.h for #if's: *** estruct.orig Fri Nov 27 20:37:19 1987 --- estruct.h Fri Nov 27 20:37:06 1987 *************** *** 49,50 #define FINDER 0 /* Macintosh OS */ --- 49,51 ----- #define FINDER 0 /* Macintosh OS */ + #define MICROPORT 1 /* Sys V/286, set USG too */ This causes uEMACS to recognize ASCII decimal character 31 (^_) as a function key prefix character. It was the only I could figure out that uEMACS didn't use for something that @#$%&* /etc/setkey would accept (/etc/setkey doesn't conform to its manpage, either. Perhaps Microport sysv/286 2.2 will. *** input.orig Thu Nov 26 20:00:35 1987 --- input.c Fri Nov 27 20:29:47 1987 *************** *** 305,306 #if AMIGA --- 305,313 ----- + #if MICROPORT + if (c == 31) { /* Apply SPEC prefix, it's control underscore */ + c = tgetc(); + return(SPEC | c); + } + #endif + #if AMIGA --------------------- Here's the shar for keybrd.rc. There are probably better mappings for some of these. I don't know 'cuz I'm new to EMACS. ------------------- cut here ------------------- : #! /bin/sh # This is a shell archive, created on Sugar Land Unix (..!uunet!nuchat!sugar) # (bbs: 713-933-2440) by karl (Karl Lehenbauer) on Sat Nov 28 16:24:35 1987 # Remove anything before the "#! /bin/sh" line, then unpack it by saving # it into a file and typing "sh file". If you do not have sh, you need # unshar, a dearchiving program which is widely available. In the absolute # wost case, you can crack the files out by hand. # If the archive is complete, you will see the message "End of archive." # at the end. # This archive contains the following files... # 'keybrd.rc' # To extract them, run the following through /bin/sh echo x - keybrd.rc sed 's/^X//' > keybrd.rc << '//END_OF_FILE' X: /bin/sh X# @(#) MicroEMACS keybrd.rc X# set up the keyboard as hacked for MicroEMACS X# X/etc/setkey ins "^C" # insert character X/etc/setkey up "^P" # up cursor X/etc/setkey down "^N" # down cursor X/etc/setkey left "^B" # left (backward) cursor X/etc/setkey right "^F" # right (forward) cursor X/etc/setkey shift left "^[B" # left word X/etc/setkey shift right "^[F" # right word X/etc/setkey home "^[<" # go to start of file X/etc/setkey end "^[>" # go to end of file X/etc/setkey alt ins "^A^M^B" # insert line X/etc/setkey alt del "^A^[ ^N^W" # delete line X/etc/setkey ctrl del "^D" # delete character X/etc/setkey ctrl up "^X^P" # scroll up X/etc/setkey ctrl down "^X^N" # scroll down X/etc/setkey pgup "^Z" # page up X/etc/setkey pgdn "^V" # page down X#/etc/setkey shift tab "^[[Z" # backtab X#/etc/setkey prtsc "^[[i" # copy to primary aux dev (print screen) X/etc/setkey ctrl left "^[3^[B" # jump left X/etc/setkey ctrl right "^[3^[F" # jump right X/etc/setkey f1 "^_;" # function 1 X/etc/setkey f2 "^_<" # function 2 X/etc/setkey f3 "^_=" # function 3 X/etc/setkey f4 "^_>" # function 4 X/etc/setkey f5 "^_?" # function 5 X/etc/setkey f6 "^_@" # function 6 X/etc/setkey f7 "^_A" # function 7 X/etc/setkey f8 "^_B" # function 8 X/etc/setkey f9 "^_C" # function 9 X/etc/setkey f10 "^_D" # function 10 X/etc/setkey shift f1 "^_T" # function 1 shifted X/etc/setkey shift f2 "^_U" # function 2 shifted X/etc/setkey shift f3 "^_V" # function 3 shifted X/etc/setkey shift f4 "^_W" # function 4 shifted X/etc/setkey shift f5 "^_X" # function 5 shifted X/etc/setkey shift f6 "^_Y" # function 6 shifted X/etc/setkey shift f7 "^_Z" # function 7 shifted X/etc/setkey shift f8 "^_[" # function 8 shifted X/etc/setkey shift f9 "^_\\" # function 9 shifted X/etc/setkey shift f10 "^_]" # function 10 shifted X X/etc/setkey alt f10 "^[xhelp^M" # get help //END_OF_FILE echo "End of archive." # end of archive. exit 0 --