Function: x-setup-function-keys

x-setup-function-keys is a byte-compiled function defined in common-win.el.gz.

Signature

(x-setup-function-keys FRAME)

Documentation

Set up function-key-map on the graphical frame FRAME.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/term/common-win.el.gz
(defun x-setup-function-keys (frame)
  "Set up `function-key-map' on the graphical frame FRAME."
  ;; Don't do this twice on the same display, or it would break
  ;; normal-erase-is-backspace-mode.
  (unless (terminal-parameter frame 'x-setup-function-keys)
    ;; Map certain keypad keys into ASCII characters that people usually expect.
    (with-selected-frame frame
      (let ((map (copy-keymap x-alternatives-map)))
        (set-keymap-parent map (keymap-parent local-function-key-map))
        (set-keymap-parent local-function-key-map map))
      (when (featurep 'ns)
	(setq system-key-alist
	      (list
	       ;; These are special "keys" used to pass events from C to lisp.
	       (cons  1 (make-non-key-event 'ns-power-off))
	       (cons  2 (make-non-key-event 'ns-open-file))
	       (cons  3 (make-non-key-event 'ns-open-temp-file))
	       (cons  4 (make-non-key-event 'ns-drag-file))
	       (cons  5 (make-non-key-event 'ns-drag-color))
	       (cons  6 (make-non-key-event 'ns-drag-text))
	       (cons  8 (make-non-key-event 'ns-open-file-line))
;;;	       (cons  9 (make-non-key-event 'ns-insert-working-text))
;;;	       (cons 10 (make-non-key-event 'ns-delete-working-text))
	       (cons 11 (make-non-key-event 'ns-spi-service-call))
	       (cons 12 (make-non-key-event 'ns-new-frame))
	       (cons 13 (make-non-key-event 'ns-toggle-toolbar))
	       (cons 14 (make-non-key-event 'ns-show-prefs))))))
    (set-terminal-parameter frame 'x-setup-function-keys t)))