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.
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 'ns-power-off)
(cons 2 'ns-open-file)
(cons 3 'ns-open-temp-file)
(cons 4 'ns-drag-file)
(cons 5 'ns-drag-color)
(cons 6 'ns-drag-text)
(cons 7 'ns-change-font)
(cons 8 'ns-open-file-line)
;;; (cons 9 'ns-insert-working-text)
;;; (cons 10 'ns-delete-working-text)
(cons 11 'ns-spi-service-call)
(cons 12 'ns-new-frame)
(cons 13 'ns-toggle-toolbar)
(cons 14 'ns-show-prefs)
))))
(set-terminal-parameter frame 'x-setup-function-keys t)))