key bindings for Sun function keys

key bindings for Sun function keys

Post by Edward J. Hartne » Wed, 12 Aug 1992 01:30:40



I saw something about this a while ago, but wasn't smart enough to
save it. How do I do key bindings for the sun function keys in
GNU emacs?

Also, if you know that, does anyone have a set of bindings for the pgup, pgdn,
etc. keys for the sun? (for GNU emacs).

        Thanks!
--

 
 
 

key bindings for Sun function keys

Post by Mickey Fergus » Wed, 12 Aug 1992 00:58:06



Quote:>I saw something about this a while ago, but wasn't smart enough to
>save it. How do I do key bindings for the sun function keys in
>GNU emacs?

>Also, if you know that, does anyone have a set of bindings for the pgup, pgdn,
>etc. keys for the sun? (for GNU emacs).

The following is what I've done.  I use backspace for my backwards delete
key, and delete to delete the current dcursor key, so I've put them in here
as well.  I have all of the lines below in my .emacsrc file.

-----------    Cut here    -------------

;;; Set up keypad keys
; Provide for non-unique key combinations starting with ESC by extending
; the `esc-map'.

(defvar cursor-map-1 (make-keymap)
 "Keymap for cursor commands with ESC-[")
(fset 'Cursor-Map-1 cursor-map-1)
(define-key esc-map "[" 'Cursor-Map-1)

; Now define keys whose representations start with ESC.
; For example, typing Right-arrow generates <ESC>[C on this keyboard.

(define-key esc-map "[C"    'forward-char)            ; Right arrow
(define-key esc-map "[D"    'backward-char)           ; Left arrow
(define-key esc-map "[A"    'previous-line)           ; Up arrow
(define-key esc-map "[B"    'next-line)               ; Down arrow
(define-key esc-map "[214z" 'beginning-of-line)       ; Home key
(define-key esc-map "[220z" 'end-of-line)             ; End key
(define-key esc-map "[216z" 'scroll-down)             ; PgUp key
(define-key esc-map "[222z" 'scroll-up)               ; PgDn key
(define-key esc-map "[218z" 'recenter)                ; unmarked (5) key
(define-key esc-map "[195z" 'undo)                    ; Undo key
(define-key esc-map "[["    'backward-paragraph)      ; (restore this value)

; Map `help' to F1, save-and-exit to F3,
; backward (normal) delete to BackSpace, and forward (cursor) delete to DEL.

(define-key esc-map "[224z" 'help-for-help)           ; F1
(define-key esc-map "[226z" 'save-buffers-kill-emacs) ; F3

(global-set-key "\C-h" 'backward-delete-char-untabify)
(global-set-key "\177" 'delete-char)

; Map esc-^H to be backward-delete-word, since I expect that backward-delete-
; char(-untabify), which is bound to ^H now, to equate to backward-kill-word
; mapping to esc-^H.

(define-key esc-map "\C-h" 'backward-kill-word)

; The following commands are needed so that changes to the global map to
; redefine DEL don't get overridden locally.

(define-key lisp-interaction-mode-map "\177" nil)
(define-key emacs-lisp-mode-map       "\177" nil)
(define-key c-mode-map                "\177" nil)

; Now reset the backspace to do what DEL used to do

(define-key lisp-interaction-mode-map "\C-h" 'backward-delete-char-untabify)
(define-key emacs-lisp-mode-map       "\C-h" 'backward-delete-char-untabify)
(define-key c-mode-map                "\C-h" 'backward-delete-char-untabify)
(setq search-delete-char ?\b)

 
 
 

key bindings for Sun function keys

Post by John Griffi » Fri, 14 Aug 1992 19:20:01


Is it possible to use function keys plus control or meta?
For example would it be possible to have the right arrow move the cursor
forward, the controlled right arrow scroll to the right and the meta-ed
right arrow enlarge the current window to the right?

--
---
John Griffith
Seminar fuer Sprachwissenschaft
Universitaet Tuebingen

 
 
 

1. key binding to function keys

The title pretty much says it all.
Does anyone know how to bind the function keys (and pf keys) to a command.
I can do it interactively with global-set-key, but when I try to put the
commands in my .emacs file - it doesn't accept them.

        I'm using something like:
                (global-set-key "f1" 'next-line)

        and I've tried all the variations of the above that I can think of.

I got the 'fn' from C-h k then hitting the function key. It tells me that fn is
not defined.

Possibly I can do something with the keymap, but I don't know the commands for
it.

                        thanks

2. Netmeeting - Getting it to install from server should the user not have it already.

3. Function binding to Function key F1, F2 ...etc ?

4. MAC II CX and Daystar PowerCache??

5. why does C-[some function key] generate [some function key]?

6. Binding the Alt (not Meta) key on a Sun

7. Problem with binding key on Sun 4

8. Sun Forte and emacs key bindings

9. Dead key binding on German SUN keyboard

10. Binding the SUN/3 keys

11. binding meta key to another key?