Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ut-emx!mic From: mic@ut-emx.UUCP (Mic Kaczmarczik) Newsgroups: comp.emacs Subject: Re: Function Keys in MG2a Summary: They're doable. Keywords: MG FKEYS Message-ID: <18622@ut-emx.UUCP> Date: 20 Sep 89 05:44:54 GMT References: <467@cimshop.UUCP> Reply-To: mic@emx.utexas.edu (Mic Kaczmarczik) Organization: UT Austin Computation Center, Unix/VMS Services Lines: 41 In article <467@cimshop.UUCP> davidm@cimshop.UUCP (David Masterson) writes: > >I am using MG2a on a VMS system and am trying to figure out how to activate >the function keys on my terminal. I am more used to the manner that >MicroEmacs 3.9e used for function keys, so the mechanism in MG2a is rather >daunting. Can anyone help me understand what switches need to be compiled in, >how to attach a command to a function key (something of the form '^[[nn~' or >'^[Oa'), what 'define-key', 'global-set-key', and 'local-set-key' are for, and >how to set things up in a startup file ('.mg'?)? >David Masterson >uunet!cimshop!davidm You need to compile MG 2a with XKEYS defined. After that, MG will look for a file called .mg-TERM, where TERM is the value of the logical name TERM (e.g. .mg-vt100 for a vt100 terminal type). If found, it will read and evaluate that file just like .mg. This allows you to have different function key setups for different terminals, albeit in a slightly different manner than GNU Emacs does. I've included an example .mg-vt100 below, which defines the arrow keys in VT100 application mode. For more information, look in [.SYS.DEFAULT]README, which also explains the termcap terminal driver. Mic Kaczmarczik --------------------------------------------------------------------- ; ; Example key definition file for VT100 terminals using the termcap ; driver. This only works if XKEYS is defined during compilation. ; (global-set-key "\eOA" 'previous-line) ; up arrow (global-set-key "\eOB" 'next-line) ; down arrow (global-set-key "\eOC" 'forward-char) ; right arrow (global-set-key "\eOD" 'backward-char) ; left arrow ------------------------------------------------------------------------ Mic Kaczmarczik Internet: mic@emx.utexas.edu Unix/VMS Services BITNET: MIC@UTAIVC UT Austin Computation Center THEnet: UTAIVC::MIC Don't worry about life, son. It ain't nohow permanent. -- Walt Kelly