🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188802

Re: how to bind vt100 keypad?

#188802
From: Dan_Jacobson
Date: Thu, 11 Jul 1991 05:40
29 lines
1890 bytes
>>>>> "KH" == Ken-Huang Lin <klg0582@uxa.cso.uiuc.edu> writes:

KH> 1) where is the keymap that defines the vt100 keypad and how do I
KH> change it so that it has system-wide effect?

.../lisp/term/vt100.el

KH> 2) how can one redefine the those keypad keys in his own .emacs file?
KH> I try something like
KH> (global-set-key "\eOt" 'end-of-buffer)
KH> without success.

You should do it inside term-setup-hook.  See .../lisp/keypad.el for a
better than hardwired approach you have above.  Here's some of my
term-setup-hook:

(setq term-setup-hook
      (function (lambda ()
	;additional keypad bindings:
	(define-key function-keymap "2" 'scroll-up)	      ;keypad 2
	(define-key function-keymap "4" 'beginning-of-buffer) ;keypad 4
	(define-key function-keymap "5" 'other-window)	      ;keypad 5
	(define-key function-keymap "6" 'end-of-buffer)	      ;keypad 6
	(define-key function-keymap "8" 'scroll-down)	      ;keypad 8
	(define-key function-keymap "," 'call-last-kbd-macro) ;keypad comma
	(define-key function-keymap "-" 'overwrite-mode)      ;keypad minus

	(if (fboundp 'enable-arrow-keys)(enable-arrow-keys))
)))
Technical Details
Message-ID: <1991Jul11Th013942.Dan_Jacobson@ATT.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1
References: <1991Jul11.023001.13986@ux1.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,9d5753c39e070f06
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-07-11 05:24:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1
From: Dan_Jacobson@ATT.COM
Newsgroups: gnu.emacs.help
Subject: Re: how to bind vt100 keypad?
Message-ID: <1991Jul11Th013942.Dan_Jacobson@ATT.COM>
Date: 11 Jul 91 05:40:04 GMT
References: <1991Jul11.023001.13986@ux1.cso.uiuc.edu>
Sender: danj1@cbnewse.cb.att.com (daniel.jacobson)
Reply-To: Dan_Jacobson@ihlpz.ATT.COM
Organization: AT&T-BL, Naperville IL, USA
Lines: 29
In-Reply-To: klg0582@uxa.cso.uiuc.edu's message of Thu, 11 Jul 1991 02: 30:01 GMT