Commit 8cbd7bed authored by Karoly Lorentey's avatar Karoly Lorentey
Browse files

Fix and/or simplify terminal initialization files.

* lisp/faces.el (tty-create-frame-with-faces): Set up faces and
  background mode only after the terminal has been initialized.
  (frame-set-background-mode): Handle the 'background-mode terminal
  parameter.
  (tty-run-terminal-initialization): Add type option.

* lisp/term/README: Update.
* lisp/term/rxvt.el: Simplify.
* lisp/term/xterm.el: Simplify and fix.
* lisp/term/*.el: Simplify and fix.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-564
parent b34c34da
......@@ -404,6 +404,8 @@ is probably not very interesting for anyone else.)
THINGS TO DO
------------
** See if `tty-defined-color-alist' needs to be terminal-local.
** emacsclient -t on the console does not work after su. You have to
use non-root accounts or start as root to see this.
......
......@@ -1598,11 +1598,13 @@ according to the `background-mode' and `display-type' frame parameters."
(and (window-system frame)
(x-get-resource "backgroundMode" "BackgroundMode")))
(bg-color (frame-parameter frame 'background-color))
(tty-type (frame-parameter frame 'tty-type))
(terminal-bg-mode (terminal-parameter frame 'background-mode))
(tty-type (tty-type frame))
(bg-mode
(cond (frame-background-mode)
(bg-resource
(intern (downcase bg-resource)))
(terminal-bg-mode)
((and (null (window-system frame))
;; Unspecified frame background color can only
;; happen on tty's.
......@@ -1826,8 +1828,6 @@ created."
(unwind-protect
(with-selected-frame frame
(tty-handle-reverse-video frame (frame-parameters frame))
(frame-set-background-mode frame)
(face-set-after-frame-default frame)
;; Make sure the kill and yank functions do not touch the X clipboard.
(modify-frame-parameters frame '((interprogram-cut-function . nil)))
......@@ -1835,6 +1835,8 @@ created."
(set-locale-environment nil frame)
(tty-run-terminal-initialization frame)
(frame-set-background-mode frame)
(face-set-after-frame-default frame)
(setq success t))
(unless success
(delete-frame frame)))
......@@ -1857,8 +1859,11 @@ the above example."
nil))))
type)
(defun tty-run-terminal-initialization (frame)
"Run the special initialization code for the terminal type of FRAME."
(defun tty-run-terminal-initialization (frame &optional type)
"Run the special initialization code for the terminal type of FRAME.
The optional TYPE parameter may be used to override the autodetected
terminal type to a different value."
(setq type (or type (tty-type frame)))
;; Load library for our terminal type.
;; User init file can set term-file-prefix to nil to prevent this.
(with-selected-frame frame
......@@ -1874,12 +1879,12 @@ the above example."
(and file
(or (assoc file load-history)
(load file t t)))))
(tty-type frame))
type)
;; Next, try to find a matching initialization function, and call it.
(tty-find-type #'(lambda (type)
(fboundp (setq term-init-func
(intern (concat "terminal-init-" type)))))
(tty-type frame))
type)
(when (fboundp term-init-func)
(funcall term-init-func))
(set-terminal-parameter frame 'terminal-initted term-init-func)))))
......
......@@ -31,10 +31,8 @@
(defun terminal-init-AT386 ()
"Terminal initialization function for AT386."
(if (boundp 'AT386-keypad-map)
nil
(let ((AT386-keypad-map (lookup-key local-function-key-map "\e[")))
;; The terminal initialization should already have set up some keys
(setq AT386-keypad-map (lookup-key local-function-key-map "\e["))
(if (not (keymapp AT386-keypad-map))
(error "What? Your AT386 termcap/terminfo has no keycaps in it"))
......
This directory contains files of elisp that customize Emacs for certain
terminal types.
When Emacs starts, it checks the TERM environment variable to see what type
of terminal the user is running on, checks for an elisp file named
"term/${TERM}.el", and if one exists, loads it. If that doesn't yield a file
that exists, the last hyphen and what follows it is stripped. If that doesn't
yield a file that exists, the previous hyphen is stripped, and so on until all
hyphens are gone. For example, if the terminal type is `aaa-48-foo', Emacs
will try first `term/aaa-48-foo.el', then `term/aaa-48.el' and finally
`term/aaa.el'. Each terminal specific file should contain a function
named terminal-init-TERMINALNAME (eg terminal-init-aaa-48 for
term/aaa-48.el) that Emacs will call in order to initialize the
terminal. The terminal files should not contain any top level forms
that are executed when the file is loaded, all the initialization
actions are performed by the terminal-init-TERMINALNAME functions.
When Emacs opens a new terminal, it checks the TERM environment variable to
see what type of terminal the user is running on, searches for an elisp file
named "term/${TERM}.el", and if one exists, loads it. If Emacs finds no
suitable file, then it strips the last hyphen and what follows it from TERM,
and tries again. If that still doesn't yield a file, then the previous hyphen
is stripped, and so on until all hyphens are gone. For example, if the
terminal type is `aaa-48-foo', Emacs will try first `term/aaa-48-foo.el', then
`term/aaa-48.el' and finally `term/aaa.el'. Emacs stops searching at the
first file found, and will not load more than one file for any terminal. Note
that it is not an error if Emacs is unable to find a terminal initialization
file; in that case, it will simply proceed with the next step without loading
any files.
Once the file has been loaded (or the search failed), Emacs tries to call a
function named `terminal-init-TERMINALNAME' (eg `terminal-init-aaa-48' for the
`aaa-48' terminal) in order to initialize the terminal. Once again, if the
function is not found, Emacs strips the last component of the name and tries
again using the shorter name. This search is independent of the previous file
search, so that you can have terminal initialization functions for a family of
terminals collected in a single file named after the family name, and users
may put terminal initialization functions directly in their .emacs files.
Note that an individual terminal file is loaded only once in an Emacs
session; if the same terminal type is opened again, Emacs will simply call the
initialization function without reloading the file. Therefore, all the actual
initialization actions should be collected in terminal-init-* functions; the
file should not contain any top-level form that is not a function or variable
declaration. Simply loading the file should not have any side effect.
Similarly, the terminal initialization function is called only once on any
given terminal, when the first frame is created on it. The function is not
called for subsequent frames on the same terminal. Therefore, terminal-init-*
functions should only modify terminal-local variables (such as
`local-function-key-map') and terminal parameters. For example, it is not
correct to modify frame parameters, since the modifications will only be
applied for the first frame opened on the terminal.
When writing terminal packages, there are some things it is good to keep in
mind.
......
;; -*- no-byte-compile: t -*-
(defun terminal-init-apollo ()
"Terminal initialization function for apollo."
(terminal-init-vt100))
(tty-run-terminal-initialization (selected-frame) "vt100"))
;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf
;;; apollo.el ends here
;; -*- no-byte-compile: t -*-
(defun terminal-init-bobcat ()
"Terminal initialization function for bobcat."
"Terminal initialization function for bobcat."
;; HP terminals usually encourage using ^H as the rubout character
(keyboard-translate ?\177 ?\^h)
(keyboard-translate ?\^h ?\177))
......
......@@ -3,7 +3,7 @@
;;; The Cygwin terminal can't really display underlines.
(defun terminal-init-cygwin ()
"Terminal initialization function for cygwin."
"Terminal initialization function for cygwin."
(tty-no-underline))
;; arch-tag: ca81ce67-3c41-4883-a29b-4c3d64a21191
......
......@@ -26,321 +26,314 @@
;;; Code:
(defvar iris-function-map nil
(defvar iris-function-map (make-sparse-keymap)
"Function key definitions for SGI xwsh and winterm apps.")
;; Make reloads faster.
(unless iris-function-map
(setq iris-function-map (make-sparse-keymap))
(define-key iris-function-map "\e[120q" [S-escape])
(define-key iris-function-map "\e[121q" [C-escape])
(define-key iris-function-map "\e[120q" [S-escape])
(define-key iris-function-map "\e[121q" [C-escape])
(define-key iris-function-map "\e[001q" [f1])
(define-key iris-function-map "\e[013q" [S-f1])
(define-key iris-function-map "\e[025q" [C-f1])
(define-key iris-function-map "\e[001q" [f1])
(define-key iris-function-map "\e[013q" [S-f1])
(define-key iris-function-map "\e[025q" [C-f1])
(define-key iris-function-map "\e[002q" [f2])
(define-key iris-function-map "\e[014q" [S-f2])
(define-key iris-function-map "\e[026q" [C-f2])
(define-key iris-function-map "\e[038q" [M-f2])
(define-key iris-function-map "\e[002q" [f2])
(define-key iris-function-map "\e[014q" [S-f2])
(define-key iris-function-map "\e[026q" [C-f2])
(define-key iris-function-map "\e[038q" [M-f2])
(define-key iris-function-map "\e[003q" [f3])
(define-key iris-function-map "\e[015q" [S-f3])
(define-key iris-function-map "\e[027q" [C-f3])
(define-key iris-function-map "\e[003q" [f3])
(define-key iris-function-map "\e[015q" [S-f3])
(define-key iris-function-map "\e[027q" [C-f3])
(define-key iris-function-map "\e[004q" [f4])
(define-key iris-function-map "\e[016q" [S-f4])
(define-key iris-function-map "\e[028q" [C-f4])
(define-key iris-function-map "\e[004q" [f4])
(define-key iris-function-map "\e[016q" [S-f4])
(define-key iris-function-map "\e[028q" [C-f4])
(define-key iris-function-map "\e[005q" [f5])
(define-key iris-function-map "\e[017q" [S-f5])
(define-key iris-function-map "\e[029q" [C-f5])
(define-key iris-function-map "\e[005q" [f5])
(define-key iris-function-map "\e[017q" [S-f5])
(define-key iris-function-map "\e[029q" [C-f5])
(define-key iris-function-map "\e[006q" [f6])
(define-key iris-function-map "\e[018q" [S-f6])
(define-key iris-function-map "\e[030q" [C-f6])
(define-key iris-function-map "\e[006q" [f6])
(define-key iris-function-map "\e[018q" [S-f6])
(define-key iris-function-map "\e[030q" [C-f6])
(define-key iris-function-map "\e[007q" [f7])
(define-key iris-function-map "\e[019q" [S-f7])
(define-key iris-function-map "\e[031q" [C-f7])
(define-key iris-function-map "\e[007q" [f7])
(define-key iris-function-map "\e[019q" [S-f7])
(define-key iris-function-map "\e[031q" [C-f7])
(define-key iris-function-map "\e[008q" [f8])
(define-key iris-function-map "\e[020q" [S-f8])
(define-key iris-function-map "\e[032q" [C-f8])
(define-key iris-function-map "\e[008q" [f8])
(define-key iris-function-map "\e[020q" [S-f8])
(define-key iris-function-map "\e[032q" [C-f8])
(define-key iris-function-map "\e[009q" [f9])
(define-key iris-function-map "\e[021q" [S-f9])
(define-key iris-function-map "\e[033q" [C-f9])
(define-key iris-function-map "\e[009q" [f9])
(define-key iris-function-map "\e[021q" [S-f9])
(define-key iris-function-map "\e[033q" [C-f9])
(define-key iris-function-map "\e[010q" [f10])
(define-key iris-function-map "\e[022q" [S-f10])
(define-key iris-function-map "\e[034q" [C-f10])
(define-key iris-function-map "\e[010q" [f10])
(define-key iris-function-map "\e[022q" [S-f10])
(define-key iris-function-map "\e[034q" [C-f10])
(define-key iris-function-map "\e[011q" [f11])
(define-key iris-function-map "\e[023q" [S-f11])
(define-key iris-function-map "\e[035q" [C-f11])
(define-key iris-function-map "\e[047q" [M-f11])
(define-key iris-function-map "\e[011q" [f11])
(define-key iris-function-map "\e[023q" [S-f11])
(define-key iris-function-map "\e[035q" [C-f11])
(define-key iris-function-map "\e[047q" [M-f11])
(define-key iris-function-map "\e[012q" [f12])
(define-key iris-function-map "\e[024q" [S-f12])
(define-key iris-function-map "\e[036q" [C-f12])
(define-key iris-function-map "\e[048q" [M-f12])
(define-key iris-function-map "\e[012q" [f12])
(define-key iris-function-map "\e[024q" [S-f12])
(define-key iris-function-map "\e[036q" [C-f12])
(define-key iris-function-map "\e[048q" [M-f12])
(define-key iris-function-map "\e[057q" [C-`])
(define-key iris-function-map "\e[115q" [M-`])
(define-key iris-function-map "\e[057q" [C-`])
(define-key iris-function-map "\e[115q" [M-`])
(define-key iris-function-map "\e[049q" [?\C-1])
(define-key iris-function-map "\e[058q" [?\M-1])
(define-key iris-function-map "\e[049q" [?\C-1])
(define-key iris-function-map "\e[058q" [?\M-1])
(define-key iris-function-map "\e[059q" [?\M-2])
(define-key iris-function-map "\e[059q" [?\M-2])
(define-key iris-function-map "\e[050q" [?\C-3])
(define-key iris-function-map "\e[060q" [?\M-3])
(define-key iris-function-map "\e[050q" [?\C-3])
(define-key iris-function-map "\e[060q" [?\M-3])
(define-key iris-function-map "\e[051q" [?\C-4])
(define-key iris-function-map "\e[061q" [?\M-4])
(define-key iris-function-map "\e[051q" [?\C-4])
(define-key iris-function-map "\e[061q" [?\M-4])
(define-key iris-function-map "\e[052q" [?\C-5])
(define-key iris-function-map "\e[062q" [?\M-5])
(define-key iris-function-map "\e[052q" [?\C-5])
(define-key iris-function-map "\e[062q" [?\M-5])
(define-key iris-function-map "\e[063q" [?\M-6])
(define-key iris-function-map "\e[063q" [?\M-6])
(define-key iris-function-map "\e[053q" [?\C-7])
(define-key iris-function-map "\e[064q" [?\M-7])
(define-key iris-function-map "\e[053q" [?\C-7])
(define-key iris-function-map "\e[064q" [?\M-7])
(define-key iris-function-map "\e[054q" [?\C-8])
(define-key iris-function-map "\e[065q" [?\M-8])
(define-key iris-function-map "\e[054q" [?\C-8])
(define-key iris-function-map "\e[065q" [?\M-8])
(define-key iris-function-map "\e[055q" [?\C-9])
(define-key iris-function-map "\e[066q" [?\M-9])
(define-key iris-function-map "\e[055q" [?\C-9])
(define-key iris-function-map "\e[066q" [?\M-9])
(define-key iris-function-map "\e[056q" [?\C-0])
(define-key iris-function-map "\e[067q" [?\M-0])
(define-key iris-function-map "\e[056q" [?\C-0])
(define-key iris-function-map "\e[067q" [?\M-0])
(define-key iris-function-map "\e[068q" [?\M--])
(define-key iris-function-map "\e[068q" [?\M--])
(define-key iris-function-map "\e[069q" [?\C-=])
(define-key iris-function-map "\e[070q" [?\M-=])
(define-key iris-function-map "\e[069q" [?\C-=])
(define-key iris-function-map "\e[070q" [?\M-=])
;; I don't know what to do with those.
;;(define-key iris-function-map "^H" [<del>])
;;(define-key iris-function-map "^H" [S-<del>])
;;(define-key iris-function-map "\177" [C-<del>])
;;(define-key iris-function-map "\e[071q" [M-<del>])
;; I don't know what to do with those.
;;(define-key iris-function-map "^H" [<del>])
;;(define-key iris-function-map "^H" [S-<del>])
;;(define-key iris-function-map "\177" [C-<del>])
;;(define-key iris-function-map "\e[071q" [M-<del>])
(define-key iris-function-map "\e[Z" [?\S-\t])
(define-key iris-function-map "\e[072q" [?\C-\t])
;; This only works if you remove the M-TAB keybing from the system.4Dwmrc
;; our your ~/.4Dwmrc, if you use the 4Dwm window manager.
(define-key iris-function-map "\e[073q" [?\M-\t])
(define-key iris-function-map "\e[Z" [?\S-\t])
(define-key iris-function-map "\e[072q" [?\C-\t])
;; This only works if you remove the M-TAB keybing from the system.4Dwmrc
;; our your ~/.4Dwmrc, if you use the 4Dwm window manager.
(define-key iris-function-map "\e[073q" [?\M-\t])
(define-key iris-function-map "\e[074q" [?\M-q])
(define-key iris-function-map "\e[074q" [?\M-q])
(define-key iris-function-map "\e[075q" [?\M-w])
(define-key iris-function-map "\e[075q" [?\M-w])
(define-key iris-function-map "\e[076q" [?\M-e])
(define-key iris-function-map "\e[076q" [?\M-e])
(define-key iris-function-map "\e[077q" [?\M-r])
(define-key iris-function-map "\e[077q" [?\M-r])
(define-key iris-function-map "\e[078q" [?\M-t])
(define-key iris-function-map "\e[078q" [?\M-t])
(define-key iris-function-map "\e[079q" [?\M-y])
(define-key iris-function-map "\e[079q" [?\M-y])
(define-key iris-function-map "\e[080q" [?\M-u])
(define-key iris-function-map "\e[080q" [?\M-u])
(define-key iris-function-map "\e[081q" [?\M-i])
(define-key iris-function-map "\e[081q" [?\M-i])
(define-key iris-function-map "\e[082q" [?\M-o])
(define-key iris-function-map "\e[082q" [?\M-o])
(define-key iris-function-map "\e[083q" [?\M-p])
(define-key iris-function-map "\e[083q" [?\M-p])
(define-key iris-function-map "\e[084q" [?\M-\[])
(define-key iris-function-map "\e[084q" [?\M-\[])
(define-key iris-function-map "\e[085q" [?\M-\]])
(define-key iris-function-map "\e[085q" [?\M-\]])
(define-key iris-function-map "\e[086q" [?\M-\\])
(define-key iris-function-map "\e[086q" [?\M-\\])
(define-key iris-function-map "\e[087q" [?\M-a])
(define-key iris-function-map "\e[087q" [?\M-a])
(define-key iris-function-map "\e[088q" [?\M-s])
(define-key iris-function-map "\e[088q" [?\M-s])
(define-key iris-function-map "\e[089q" [?\M-d])
(define-key iris-function-map "\e[089q" [?\M-d])
(define-key iris-function-map "\e[090q" [?\M-f])
(define-key iris-function-map "\e[090q" [?\M-f])
(define-key iris-function-map "\e[091q" [?\M-g])
(define-key iris-function-map "\e[091q" [?\M-g])
(define-key iris-function-map "\e[092q" [?\M-h])
(define-key iris-function-map "\e[092q" [?\M-h])
(define-key iris-function-map "\e[093q" [?\M-j])
(define-key iris-function-map "\e[093q" [?\M-j])
(define-key iris-function-map "\e[094q" [?\M-k])
(define-key iris-function-map "\e[094q" [?\M-k])
(define-key iris-function-map "\e[095q" [?\M-l])
(define-key iris-function-map "\e[095q" [?\M-l])
(define-key iris-function-map "\e[096q" [?\C-\;])
(define-key iris-function-map "\e[097q" [?\M-:]) ;; we are cheating
(define-key iris-function-map "\e[096q" [?\C-\;])
(define-key iris-function-map "\e[097q" [?\M-:]) ;; we are cheating
;; here, this is realy
;; M-;, but M-:
;; generates the same
;; string and is more
;; usefull.
(define-key iris-function-map "\e[098q" [?\C-'])
(define-key iris-function-map "\e[099q" [?\M-'])
(define-key iris-function-map "\e[098q" [?\C-'])
(define-key iris-function-map "\e[099q" [?\M-'])
(define-key iris-function-map "\e[100q" [?\M-\n])
(define-key iris-function-map "\e[100q" [?\M-\n])
(define-key iris-function-map "\e[101q" [?\M-z])
(define-key iris-function-map "\e[101q" [?\M-z])
(define-key iris-function-map "\e[102q" [?\M-x])
(define-key iris-function-map "\e[102q" [?\M-x])
(define-key iris-function-map "\e[103q" [?\M-c])
(define-key iris-function-map "\e[103q" [?\M-c])
(define-key iris-function-map "\e[104q" [?\M-v])
(define-key iris-function-map "\e[104q" [?\M-v])
(define-key iris-function-map "\e[105q" [?\M-b])
(define-key iris-function-map "\e[105q" [?\M-b])
(define-key iris-function-map "\e[106q" [M-n])
(define-key iris-function-map "\e[106q" [M-n])
(define-key iris-function-map "\e[107q" [M-m])
(define-key iris-function-map "\e[107q" [M-m])
(define-key iris-function-map "\e[108q" [?\C-,])
(define-key iris-function-map "\e[109q" [?\M-,])
(define-key iris-function-map "\e[108q" [?\C-,])
(define-key iris-function-map "\e[109q" [?\M-,])
(define-key iris-function-map "\e[110q" [?\C-.])
(define-key iris-function-map "\e[111q" [?\M-.])
(define-key iris-function-map "\e[110q" [?\C-.])
(define-key iris-function-map "\e[111q" [?\M-.])
(define-key iris-function-map "\e[112q" [?\C-/])
(define-key iris-function-map "\e[113q" [?\M-/])
(define-key iris-function-map "\e[112q" [?\C-/])
(define-key iris-function-map "\e[113q" [?\M-/])
(define-key iris-function-map "\e[139q" [insert])
(define-key iris-function-map "\e[139q" [S-insert])
(define-key iris-function-map "\e[140q" [C-insert])
(define-key iris-function-map "\e[141q" [M-insert])
(define-key iris-function-map "\e[139q" [insert])
(define-key iris-function-map "\e[139q" [S-insert])
(define-key iris-function-map "\e[140q" [C-insert])
(define-key iris-function-map "\e[141q" [M-insert])
(define-key iris-function-map "\e[H" [home])
(define-key iris-function-map "\e[143q" [S-home])
(define-key iris-function-map "\e[144q" [C-home])
(define-key iris-function-map "\e[H" [home])
(define-key iris-function-map "\e[143q" [S-home])
(define-key iris-function-map "\e[144q" [C-home])
(define-key iris-function-map "\e[150q" [prior])
(define-key iris-function-map "\e[151q" [S-prior]) ;; those don't seem
(define-key iris-function-map "\e[150q" [prior])
(define-key iris-function-map "\e[151q" [S-prior]) ;; those don't seem
;; to generate
;; anything
(define-key iris-function-map "\e[152q" [C-prior])
(define-key iris-function-map "\e[152q" [C-prior])
;; (define-key iris-function-map "^?" [delete]) ?? something else seems to take care of this.
(define-key iris-function-map "\e[P" [S-delete])
(define-key iris-function-map "\e[142q" [C-delete])
(define-key iris-function-map "\e[M" [M-delete])
;; (define-key iris-function-map "^?" [delete]) ?? something else seems to take care of this.
(define-key iris-function-map "\e[P" [S-delete])
(define-key iris-function-map "\e[142q" [C-delete])
(define-key iris-function-map "\e[M" [M-delete])
(define-key iris-function-map "\e[146q" [end])
(define-key iris-function-map "\e[147q" [S-end]) ;; those don't seem to
(define-key iris-function-map "\e[146q" [end])
(define-key iris-function-map "\e[147q" [S-end]) ;; those don't seem to
;; generate anything
(define-key iris-function-map "\e[148q" [C-end])
(define-key iris-function-map "\e[148q" [C-end])
(define-key iris-function-map "\e[154q" [next])
(define-key iris-function-map "\e[155q" [S-next])
(define-key iris-function-map "\e[156q" [C-next])
(define-key iris-function-map "\e[154q" [next])
(define-key iris-function-map "\e[155q" [S-next])
(define-key iris-function-map "\e[156q" [C-next])
(define-key iris-function-map "\e[161q" [S-up])
(define-key iris-function-map "\e[162q" [C-up])
(define-key iris-function-map "\e[163q" [M-up])
(define-key iris-function-map "\e[161q" [S-up])
(define-key iris-function-map "\e[162q" [C-up])
(define-key iris-function-map "\e[163q" [M-up])
(define-key iris-function-map "\e[158q" [S-left])
(define-key iris-function-map "\e[159q" [C-left])
(define-key iris-function-map "\e[160q" [M-left])
(define-key iris-function-map "\e[158q" [S-left])
(define-key iris-function-map "\e[159q" [C-left])
(define-key iris-function-map "\e[160q" [M-left])
(define-key iris-function-map "\e[164q" [S-down])
(define-key iris-function-map "\e[165q" [C-down])
(define-key iris-function-map "\e[166q" [M-down])
(define-key iris-function-map "\e[164q" [S-down])
(define-key iris-function-map "\e[165q" [C-down])
(define-key iris-function-map "\e[166q" [M-down])
(define-key iris-function-map "\e[167q" [S-right])
(define-key iris-function-map "\e[168q" [C-right])
(define-key iris-function-map "\e[169q" [M-right])
(define-key iris-function-map "\e[167q" [S-right])
(define-key iris-function-map "\e[168q" [C-right])
(define-key iris-function-map "\e[169q" [M-right])
;; Keypad functions, most of those are untested.
(define-key iris-function-map "\e[179q" [?\C-/])
(define-key iris-function-map "\e[180q" [?\M-/])
;; Keypad functions, most of those are untested.
(define-key iris-function-map "\e[179q" [?\C-/])
(define-key iris-function-map "\e[180q" [?\M-/])
(define-key iris-function-map "\e[187q" [?\C-*])
(define-key iris-function-map "\e[188q" [?\M-*])
(define-key iris-function-map "\e[187q" [?\C-*])
(define-key iris-function-map "\e[188q" [?\M-*])
(define-key iris-function-map "\e[198q" [?\C--])
(define-key iris-function-map "\e[199q" [?\M--])
(define-key iris-function-map "\e[198q" [?\C--])
(define-key iris-function-map "\e[199q" [?\M--])
;; Something else takes care of home, up, prior, down, left, right, next
;(define-key iris-function-map "\e[H" [home])
(define-key iris-function-map "\e[172q" [C-home])
;; Something else takes care of home, up, prior, down, left, right, next
;(define-key iris-function-map "\e[H" [home])
(define-key iris-function-map "\e[172q" [C-home])
;(define-key iris-function-map "\e[A" [up])
(define-key iris-function-map "\e[182q" [C-up])
;(define-key iris-function-map "\e[A" [up])
(define-key iris-function-map "\e[182q" [C-up])
;(define-key iris-function-map "\e[150q" [prior])
(define-key iris-function-map "\e[190q" [C-prior])
;(define-key iris-function-map "\e[150q" [prior])
(define-key iris-function-map "\e[190q" [C-prior])
(define-key iris-function-map "\e[200q" [?\C-+])
(define-key iris-function-map "\e[201q" [?\M-+])
(define-key iris-function-map "\e[200q" [?\C-+])