From: rzimmer@rhrk.uni-kl.de (Rainer Zimmer [Informatik])
Subject: Re: Home,End,PgUp,PgDn keys on SparcStation
Organization: University of Kaiserslautern, Germany
Date: Tue, 28 Jul 1992 11:12:17 GMT


I use the following file "sun-keybind.el" (in my load-path) and it works
file for me. In my .emacs (rc-file) i use the following lines for loading
the definitions.
Try it out...

--Rainer



.emacs:
===============================================================================

;;; ************ SPARC - Tastaturbelegung ***********************

(cond
 ((and (equal (getenv "HOSTTYPE") "sun4")
       (or (equal (getenv "TERM") "sun")
	   (equal (getenv "TERM") "xterm")))
  (load "sun-keybind")))



sun-keybind.el:
===============================================================================
;;; von   mal@coyote.draper.com (Mark Lamourine) bekommen
;;; modifiziert rzimmer@informatik.uni-kl.de (Rainer Zimmer)
;;; Try placing this in your ~/.emacs file.
;;; besser: dieses File einfach mit (load ...)
;;; -nach Abfrage- im .emacs file laden
; emacs script by David Oh (May 1990)
; based on script by John Carr on project Athena at MIT (Feb, 1989)
; on Sun Workstations (sparcs 1)
; the function and special keys emit "ESC [ string"
; the various keys map to different strings. For instance:

; F1                224z
; F2                225z   
; up arrow          A
; down arrow        B
; etc....

; First, define an empty keymap to hold the bindings.
(defvar fnkey-map (make-sparse-keymap) "Keymap for Function Keys" )

;Second, bind it to ESC- [ (which is the prefix used on the function keys
(define-key esc-map "[" fnkey-map)

; Third, bind functions to the various keys.  Note that you must use
; internal lisp function names, which are usually but not always the
; names used with meta-x.
; You can get them using ctrl-h k or a

(defun ignore-key ()
  "interactive version of ignore"
  (interactive)
  (ignore))

; definitions for the number pad  * on the right *
;(define-key fnkey-map "A" 'previous-line)		; the up arrow    (R8)
;(define-key fnkey-map "B" 'next-line)			; the down arrow  (R14)
;(define-key fnkey-map "C" 'forward-char)		; the right arrow (R12)
;(define-key fnkey-map "D" 'backward-char)		; the left arrow  (R10)

(define-key fnkey-map "216z" 'scroll-down)		; the PgUp key (R9)
(define-key fnkey-map "222z" 'scroll-up)		; the PgDn key (R15)
(define-key fnkey-map "214z" 'beginning-of-buffer)	; the Home key (R7)
(define-key fnkey-map "220z" 'end-of-buffer)		; the End  key (R13) 
(define-key fnkey-map "218z" 'recenter)                 ; centers page (R11)

(define-key fnkey-map "208z" 'toggle-read-only)		; (R1) Pause
(define-key fnkey-map "209z" 'switch-to-buffer)		; (R2) PrSc
(define-key fnkey-map "210z" 'overwrite-mode)		; (R3) ScrollLockBreak
(define-key fnkey-map "211z" 'call-last-kbd-macro)     	; (R4) [ = ]
(define-key fnkey-map "212z" 'start-kbd-macro)		; (R5) [ / ]
(define-key fnkey-map "213z" 'end-kbd-macro)		; (R6) [ * ]

; definitions for the command pad  * on the left *
(define-key fnkey-map "192z" 'kill-buffer-immed)	; the Stop key  (L1) ;
(define-key fnkey-map "193z" 'yank-pop)			; the Again key (L2)
(define-key fnkey-map "194z" 'set-mark-command)		; the Props key (L3) ;
(define-key fnkey-map "195z" 'undo)			; the Undo key  (L4)
(define-key fnkey-map "196z" 'ignore-key)		; the Front key (L5) ;
(define-key fnkey-map "197z" 'copy-region-as-kill)	; the Copy key  (L6)
(define-key fnkey-map "198z" 'ignore-key)		; the Open key  (L7) ;
(define-key fnkey-map "199z" 'yank)			; the Paste key (L8)
(define-key fnkey-map "200z" 'query-replace)		; the find key  (L9)
(define-key fnkey-map "201z" 'kill-region)		; the Cut key   (L10)
(define-key fnkey-map "-1z"  'find-doc)			; the Help key

; definitions for the function keys  * on top *
(define-key fnkey-map "224z" 'taglist)			; the F1 key
(define-key fnkey-map "225z" 'c++-buttons)		; the F2 key
(define-key fnkey-map "226z" 'goto-line)		; the F3 key
(define-key fnkey-map "227z" 'ignore-key)		; the F4 key
(define-key fnkey-map "228z" 'ignore-key)		; the F5 key
(define-key fnkey-map "229z" 'ignore-key)		; the F6 key
(define-key fnkey-map "230z" 'ignore-key)		; the F7 key
(define-key fnkey-map "231z" 'ignore-key)		; the F8 key
(define-key fnkey-map "232z" 'ignore-key)		; the F9 key
							; F10 == Help
							; F11 == Stop
							; F12 == Again

===============================================================================

-- 
Rainer Zimmer                <rzimmer@informatik.uni-kl.de>
Uni Kaiserslautern / FB Informatik / AG DVS       (Germany)