home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / emacs / 2727 < prev    next >
Encoding:
Text File  |  1992-07-28  |  4.7 KB  |  120 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!mcsun!Germany.EU.net!ira.uka.de!rz.uni-karlsruhe.de!stepsun.uni-kl.de!sun.rhrk.uni-kl.de!rzimmer
  3. From: rzimmer@rhrk.uni-kl.de (Rainer Zimmer [Informatik])
  4. Subject: Re: Home,End,PgUp,PgDn keys on SparcStation
  5. Message-ID: <1992Jul28.111217.24710@rhrk.uni-kl.de>
  6. Organization: University of Kaiserslautern, Germany
  7. References: <62716@cup.portal.com>
  8. Date: Tue, 28 Jul 1992 11:12:17 GMT
  9. Lines: 109
  10.  
  11.  
  12. I use the following file "sun-keybind.el" (in my load-path) and it works
  13. file for me. In my .emacs (rc-file) i use the following lines for loading
  14. the definitions.
  15. Try it out...
  16.  
  17. --Rainer
  18.  
  19.  
  20.  
  21. .emacs:
  22. ===============================================================================
  23.  
  24. ;;; ************ SPARC - Tastaturbelegung ***********************
  25.  
  26. (cond
  27.  ((and (equal (getenv "HOSTTYPE") "sun4")
  28.        (or (equal (getenv "TERM") "sun")
  29.        (equal (getenv "TERM") "xterm")))
  30.   (load "sun-keybind")))
  31.  
  32.  
  33.  
  34. sun-keybind.el:
  35. ===============================================================================
  36. ;;; von   mal@coyote.draper.com (Mark Lamourine) bekommen
  37. ;;; modifiziert rzimmer@informatik.uni-kl.de (Rainer Zimmer)
  38. ;;; Try placing this in your ~/.emacs file.
  39. ;;; besser: dieses File einfach mit (load ...)
  40. ;;; -nach Abfrage- im .emacs file laden
  41. ; emacs script by David Oh (May 1990)
  42. ; based on script by John Carr on project Athena at MIT (Feb, 1989)
  43. ; on Sun Workstations (sparcs 1)
  44. ; the function and special keys emit "ESC [ string"
  45. ; the various keys map to different strings. For instance:
  46.  
  47. ; F1                224z
  48. ; F2                225z   
  49. ; up arrow          A
  50. ; down arrow        B
  51. ; etc....
  52.  
  53. ; First, define an empty keymap to hold the bindings.
  54. (defvar fnkey-map (make-sparse-keymap) "Keymap for Function Keys" )
  55.  
  56. ;Second, bind it to ESC- [ (which is the prefix used on the function keys
  57. (define-key esc-map "[" fnkey-map)
  58.  
  59. ; Third, bind functions to the various keys.  Note that you must use
  60. ; internal lisp function names, which are usually but not always the
  61. ; names used with meta-x.
  62. ; You can get them using ctrl-h k or a
  63.  
  64. (defun ignore-key ()
  65.   "interactive version of ignore"
  66.   (interactive)
  67.   (ignore))
  68.  
  69. ; definitions for the number pad  * on the right *
  70. ;(define-key fnkey-map "A" 'previous-line)        ; the up arrow    (R8)
  71. ;(define-key fnkey-map "B" 'next-line)            ; the down arrow  (R14)
  72. ;(define-key fnkey-map "C" 'forward-char)        ; the right arrow (R12)
  73. ;(define-key fnkey-map "D" 'backward-char)        ; the left arrow  (R10)
  74.  
  75. (define-key fnkey-map "216z" 'scroll-down)        ; the PgUp key (R9)
  76. (define-key fnkey-map "222z" 'scroll-up)        ; the PgDn key (R15)
  77. (define-key fnkey-map "214z" 'beginning-of-buffer)    ; the Home key (R7)
  78. (define-key fnkey-map "220z" 'end-of-buffer)        ; the End  key (R13) 
  79. (define-key fnkey-map "218z" 'recenter)                 ; centers page (R11)
  80.  
  81. (define-key fnkey-map "208z" 'toggle-read-only)        ; (R1) Pause
  82. (define-key fnkey-map "209z" 'switch-to-buffer)        ; (R2) PrSc
  83. (define-key fnkey-map "210z" 'overwrite-mode)        ; (R3) ScrollLockBreak
  84. (define-key fnkey-map "211z" 'call-last-kbd-macro)         ; (R4) [ = ]
  85. (define-key fnkey-map "212z" 'start-kbd-macro)        ; (R5) [ / ]
  86. (define-key fnkey-map "213z" 'end-kbd-macro)        ; (R6) [ * ]
  87.  
  88. ; definitions for the command pad  * on the left *
  89. (define-key fnkey-map "192z" 'kill-buffer-immed)    ; the Stop key  (L1) ;
  90. (define-key fnkey-map "193z" 'yank-pop)            ; the Again key (L2)
  91. (define-key fnkey-map "194z" 'set-mark-command)        ; the Props key (L3) ;
  92. (define-key fnkey-map "195z" 'undo)            ; the Undo key  (L4)
  93. (define-key fnkey-map "196z" 'ignore-key)        ; the Front key (L5) ;
  94. (define-key fnkey-map "197z" 'copy-region-as-kill)    ; the Copy key  (L6)
  95. (define-key fnkey-map "198z" 'ignore-key)        ; the Open key  (L7) ;
  96. (define-key fnkey-map "199z" 'yank)            ; the Paste key (L8)
  97. (define-key fnkey-map "200z" 'query-replace)        ; the find key  (L9)
  98. (define-key fnkey-map "201z" 'kill-region)        ; the Cut key   (L10)
  99. (define-key fnkey-map "-1z"  'find-doc)            ; the Help key
  100.  
  101. ; definitions for the function keys  * on top *
  102. (define-key fnkey-map "224z" 'taglist)            ; the F1 key
  103. (define-key fnkey-map "225z" 'c++-buttons)        ; the F2 key
  104. (define-key fnkey-map "226z" 'goto-line)        ; the F3 key
  105. (define-key fnkey-map "227z" 'ignore-key)        ; the F4 key
  106. (define-key fnkey-map "228z" 'ignore-key)        ; the F5 key
  107. (define-key fnkey-map "229z" 'ignore-key)        ; the F6 key
  108. (define-key fnkey-map "230z" 'ignore-key)        ; the F7 key
  109. (define-key fnkey-map "231z" 'ignore-key)        ; the F8 key
  110. (define-key fnkey-map "232z" 'ignore-key)        ; the F9 key
  111.                             ; F10 == Help
  112.                             ; F11 == Stop
  113.                             ; F12 == Again
  114.  
  115. ===============================================================================
  116.  
  117. -- 
  118. Rainer Zimmer                <rzimmer@informatik.uni-kl.de>
  119. Uni Kaiserslautern / FB Informatik / AG DVS       (Germany)
  120.