1993-03-11 08:48:43 +00:00
|
|
|
|
;;; tvi970.el --- terminal support for the Televideo 970
|
|
|
|
|
|
2019-01-01 00:59:58 +00:00
|
|
|
|
;; Copyright (C) 1992, 2001-2019 Free Software Foundation, Inc.
|
2006-12-09 04:06:06 +00:00
|
|
|
|
|
2008-12-19 05:24:35 +00:00
|
|
|
|
;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>
|
1993-03-11 08:48:43 +00:00
|
|
|
|
;; Keywords: terminals
|
2008-12-19 05:24:35 +00:00
|
|
|
|
;; Created: January 1992
|
1993-03-11 08:48:43 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1993-03-11 08:48:43 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1993-03-11 08:48:43 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
1993-03-11 08:48:43 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
1992-02-04 02:27:43 +00:00
|
|
|
|
|
2007-10-22 15:20:35 +00:00
|
|
|
|
(defvar tvi970-terminal-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
|
|
|
|
|
;; Miscellaneous keys
|
|
|
|
|
(dolist (key-binding
|
|
|
|
|
'(;; These are set up by termcap or terminfo
|
|
|
|
|
;; ("\eOP" [kp-f1])
|
|
|
|
|
;; ("\eOQ" [kp-f2])
|
|
|
|
|
;; ("\eOR" [kp-f3])
|
|
|
|
|
;; ("\eOS" [kp-f4])
|
|
|
|
|
|
2017-10-10 05:53:19 +00:00
|
|
|
|
;; These might be set by terminfo.
|
2007-10-22 15:20:35 +00:00
|
|
|
|
("\e[H" [home])
|
|
|
|
|
("\e[Z" [backtab])
|
|
|
|
|
("\e[i" [print])
|
|
|
|
|
("\e[@" [insert])
|
|
|
|
|
("\e[L" [insertline])
|
|
|
|
|
("\e[M" [deleteline])
|
|
|
|
|
("\e[U" [next]) ;; actually the `page' key
|
|
|
|
|
|
2017-10-10 05:53:19 +00:00
|
|
|
|
;; These won't be set up by either.
|
2007-10-22 15:20:35 +00:00
|
|
|
|
("\eOm" [kp-subtract])
|
|
|
|
|
("\eOl" [kp-separator])
|
|
|
|
|
("\eOn" [kp-decimal])
|
|
|
|
|
("\eOM" [kp-enter])
|
|
|
|
|
|
2017-10-10 05:53:19 +00:00
|
|
|
|
;; These won't be set up by either.
|
2007-10-22 15:20:35 +00:00
|
|
|
|
("\e[K" [key_eol]) ;; Not an X keysym
|
|
|
|
|
("\e[J" [key_eos]) ;; Not an X keysym
|
|
|
|
|
("\e[2J" [key_clear]) ;; Not an X keysym
|
|
|
|
|
("\e[P" [key_dc]) ;; Not an X keysym
|
|
|
|
|
("\e[g" [S-tab]) ;; Not an X keysym
|
|
|
|
|
("\e[2N" [clearentry]) ;; Not an X keysym
|
|
|
|
|
("\e[2K" [S-clearentry]) ;; Not an X keysym
|
|
|
|
|
("\e[E" [?\C-j]) ;; Not an X keysym
|
|
|
|
|
("\e[g" [S-backtab]) ;; Not an X keysym
|
|
|
|
|
("\e[?1i" [key_sprint]) ;; Not an X keysym
|
|
|
|
|
("\e[4h" [key_sic]) ;; Not an X keysym
|
|
|
|
|
("\e[4l" [S-delete]) ;; Not an X keysym
|
|
|
|
|
("\e[Q" [S-insertline]) ;; Not an X keysym
|
|
|
|
|
("\e[1Q" [key_sdl]) ;; Not an X keysym
|
|
|
|
|
("\e[19l" [key_seol]) ;; Not an X keysym
|
|
|
|
|
("\e[19h" [S-erasepage]) ;; Not an X keysym
|
|
|
|
|
("\e[V" [S-page]) ;; Not an X keysym
|
|
|
|
|
("\eS" [send]) ;; Not an X keysym
|
|
|
|
|
("\e5" [S-send]) ;; Not an X keysym
|
|
|
|
|
))
|
|
|
|
|
(define-key map (car key-binding) (nth 1 key-binding)))
|
2017-09-13 22:52:52 +00:00
|
|
|
|
|
2007-10-22 15:20:35 +00:00
|
|
|
|
|
|
|
|
|
;; The numeric keypad keys.
|
|
|
|
|
(dotimes (i 10)
|
|
|
|
|
(define-key map (format "\eO%c" (+ i ?p))
|
|
|
|
|
(vector (intern (format "kp-%d" i)))))
|
|
|
|
|
;; The numbered function keys.
|
|
|
|
|
(dotimes (i 16)
|
|
|
|
|
(define-key map (format "\e?%c" (+ i ?a))
|
|
|
|
|
(vector (intern (format "f%d" (1+ i)))))
|
|
|
|
|
(define-key map (format "\e?%c" (+ i ?A))
|
|
|
|
|
(vector (intern (format "S-f%d" (1+ i))))))
|
|
|
|
|
map))
|
|
|
|
|
|
2005-07-27 18:02:08 +00:00
|
|
|
|
(defun terminal-init-tvi970 ()
|
|
|
|
|
"Terminal initialization function for tvi970."
|
2007-10-22 15:20:35 +00:00
|
|
|
|
;; Use inheritance to let the main keymap override these defaults.
|
|
|
|
|
;; This way we don't override terminfo-derived settings or settings
|
2012-09-17 05:41:04 +00:00
|
|
|
|
;; made in the init file.
|
2007-10-22 15:20:35 +00:00
|
|
|
|
(let ((m (copy-keymap tvi970-terminal-map)))
|
|
|
|
|
(set-keymap-parent m (keymap-parent input-decode-map))
|
|
|
|
|
(set-keymap-parent input-decode-map m))
|
2005-07-27 18:02:08 +00:00
|
|
|
|
(tvi970-set-keypad-mode 1))
|
1992-02-04 02:27:43 +00:00
|
|
|
|
|
|
|
|
|
|
2007-10-22 15:20:35 +00:00
|
|
|
|
;; Should keypad numbers send ordinary digits or distinct escape sequences?
|
2010-05-05 03:45:21 +00:00
|
|
|
|
(define-minor-mode tvi970-set-keypad-mode
|
2011-10-20 00:26:14 +00:00
|
|
|
|
"Toggle alternate keypad mode on TVI 970 keypad.
|
|
|
|
|
|
Fix minor quoting problems in doc strings
These were glitches regardless of how or whether we tackle the
problem of grave accent in doc strings.
* lisp/calc/calc-aent.el (math-restore-placeholders):
* lisp/ido.el (ido-ignore-buffers, ido-ignore-files):
* lisp/leim/quail/cyrillic.el ("bulgarian-alt-phonetic"):
* lisp/leim/quail/hebrew.el ("hebrew-new")
("hebrew-biblical-sil"):
* lisp/leim/quail/thai.el ("thai-kesmanee"):
* lisp/progmodes/idlw-shell.el (idlwave-shell-file-name-chars):
Used curved quotes to avoid ambiguities like ‘`''’ in doc strings.
* lisp/calendar/calendar.el (calendar-month-abbrev-array):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-cache-flush-fcn):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-copy)
(semantic-tag-components):
* lisp/cedet/srecode/cpp.el (srecode-semantic-handle-:cpp):
* lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-all-constp):
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine):
* lisp/emacs-lisp/generator.el (iter-next):
* lisp/gnus/gnus-art.el (gnus-treat-strip-list-identifiers)
(gnus-article-mode-syntax-table):
* lisp/net/rlogin.el (rlogin-directory-tracking-mode):
* lisp/net/soap-client.el (soap-wsdl-get):
* lisp/net/telnet.el (telnet-mode):
* lisp/org/org-compat.el (org-number-sequence):
* lisp/org/org.el (org-remove-highlights-with-change)
(org-structure-template-alist):
* lisp/org/ox-html.el (org-html-link-org-files-as-html):
* lisp/play/handwrite.el (handwrite-10pt, handwrite-11pt)
(handwrite-12pt, handwrite-13pt):
* lisp/progmodes/f90.el (f90-mode, f90-abbrev-start):
* lisp/progmodes/idlwave.el (idlwave-mode, idlwave-check-abbrev):
* lisp/progmodes/verilog-mode.el (verilog-tool)
(verilog-string-replace-matches, verilog-preprocess)
(verilog-auto-insert-lisp, verilog-auto-insert-last):
* lisp/textmodes/makeinfo.el (makeinfo-options):
* src/font.c (Ffont_spec):
Fix minor quoting problems in doc strings, e.g., missing quote,
``x'' where `x' was meant, etc.
* lisp/erc/erc-backend.el (erc-process-sentinel-2):
Fix minor quoting problem in other string.
* lisp/leim/quail/ethiopic.el ("ethiopic"):
* lisp/term/tvi970.el (tvi970-set-keypad-mode):
Omit unnecessary quotes.
* lisp/faces.el (set-face-attribute, set-face-underline)
(set-face-inverse-video, x-create-frame-with-faces):
* lisp/gnus/gnus-group.el (gnus-group-nnimap-edit-acl):
* lisp/mail/supercite.el (sc-attribs-%@-addresses)
(sc-attribs-!-addresses, sc-attribs-<>-addresses):
* lisp/net/tramp.el (tramp-methods):
* lisp/recentf.el (recentf-show-file-shortcuts-flag):
* lisp/textmodes/artist.el (artist-ellipse-right-char)
(artist-ellipse-left-char, artist-vaporize-fuzziness)
(artist-spray-chars, artist-mode, artist-replace-string)
(artist-put-pixel, artist-text-see-thru):
* lisp/vc/ediff-util.el (ediff-submit-report):
* lisp/vc/log-edit.el (log-edit-changelog-full-paragraphs):
Use double-quotes rather than TeX markup in doc strings.
* lisp/skeleton.el (skeleton-pair-insert-maybe):
Reword to avoid the need for grave accent and apostrophe.
* lisp/xt-mouse.el (xterm-mouse-tracking-enable-sequence):
Don't use grave and acute accents to quote.
2015-05-19 21:59:15 +00:00
|
|
|
|
In alternate keypad mode, the keys send distinct escape
|
2011-10-20 00:26:14 +00:00
|
|
|
|
sequences, meaning that they can have their own bindings,
|
1992-02-04 02:27:43 +00:00
|
|
|
|
independent of the normal number keys.
|
2011-10-20 00:26:14 +00:00
|
|
|
|
|
Fix minor quoting problems in doc strings
These were glitches regardless of how or whether we tackle the
problem of grave accent in doc strings.
* lisp/calc/calc-aent.el (math-restore-placeholders):
* lisp/ido.el (ido-ignore-buffers, ido-ignore-files):
* lisp/leim/quail/cyrillic.el ("bulgarian-alt-phonetic"):
* lisp/leim/quail/hebrew.el ("hebrew-new")
("hebrew-biblical-sil"):
* lisp/leim/quail/thai.el ("thai-kesmanee"):
* lisp/progmodes/idlw-shell.el (idlwave-shell-file-name-chars):
Used curved quotes to avoid ambiguities like ‘`''’ in doc strings.
* lisp/calendar/calendar.el (calendar-month-abbrev-array):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-cache-flush-fcn):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-copy)
(semantic-tag-components):
* lisp/cedet/srecode/cpp.el (srecode-semantic-handle-:cpp):
* lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-all-constp):
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine):
* lisp/emacs-lisp/generator.el (iter-next):
* lisp/gnus/gnus-art.el (gnus-treat-strip-list-identifiers)
(gnus-article-mode-syntax-table):
* lisp/net/rlogin.el (rlogin-directory-tracking-mode):
* lisp/net/soap-client.el (soap-wsdl-get):
* lisp/net/telnet.el (telnet-mode):
* lisp/org/org-compat.el (org-number-sequence):
* lisp/org/org.el (org-remove-highlights-with-change)
(org-structure-template-alist):
* lisp/org/ox-html.el (org-html-link-org-files-as-html):
* lisp/play/handwrite.el (handwrite-10pt, handwrite-11pt)
(handwrite-12pt, handwrite-13pt):
* lisp/progmodes/f90.el (f90-mode, f90-abbrev-start):
* lisp/progmodes/idlwave.el (idlwave-mode, idlwave-check-abbrev):
* lisp/progmodes/verilog-mode.el (verilog-tool)
(verilog-string-replace-matches, verilog-preprocess)
(verilog-auto-insert-lisp, verilog-auto-insert-last):
* lisp/textmodes/makeinfo.el (makeinfo-options):
* src/font.c (Ffont_spec):
Fix minor quoting problems in doc strings, e.g., missing quote,
``x'' where `x' was meant, etc.
* lisp/erc/erc-backend.el (erc-process-sentinel-2):
Fix minor quoting problem in other string.
* lisp/leim/quail/ethiopic.el ("ethiopic"):
* lisp/term/tvi970.el (tvi970-set-keypad-mode):
Omit unnecessary quotes.
* lisp/faces.el (set-face-attribute, set-face-underline)
(set-face-inverse-video, x-create-frame-with-faces):
* lisp/gnus/gnus-group.el (gnus-group-nnimap-edit-acl):
* lisp/mail/supercite.el (sc-attribs-%@-addresses)
(sc-attribs-!-addresses, sc-attribs-<>-addresses):
* lisp/net/tramp.el (tramp-methods):
* lisp/recentf.el (recentf-show-file-shortcuts-flag):
* lisp/textmodes/artist.el (artist-ellipse-right-char)
(artist-ellipse-left-char, artist-vaporize-fuzziness)
(artist-spray-chars, artist-mode, artist-replace-string)
(artist-put-pixel, artist-text-see-thru):
* lisp/vc/ediff-util.el (ediff-submit-report):
* lisp/vc/log-edit.el (log-edit-changelog-full-paragraphs):
Use double-quotes rather than TeX markup in doc strings.
* lisp/skeleton.el (skeleton-pair-insert-maybe):
Reword to avoid the need for grave accent and apostrophe.
* lisp/xt-mouse.el (xterm-mouse-tracking-enable-sequence):
Don't use grave and acute accents to quote.
2015-05-19 21:59:15 +00:00
|
|
|
|
When disabled, the terminal enters numeric keypad mode, in
|
2011-10-20 00:26:14 +00:00
|
|
|
|
which the keypad's keys act as ordinary digits."
|
2010-05-05 03:45:21 +00:00
|
|
|
|
:variable (terminal-parameter nil 'tvi970-keypad-numeric)
|
|
|
|
|
(send-string-to-terminal
|
|
|
|
|
(if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>")))
|
1992-02-04 02:27:43 +00:00
|
|
|
|
|
Provide 'term/name in lisp/term files.
* lisp/term/AT386.el, lisp/term/bobcat.el, lisp/term/cygwin.el:
* lisp/term/internal.el, lisp/term/iris-ansi.el, lisp/term/linux.el:
* lisp/term/lk201.el, lisp/term/news.el, lisp/term/ns-win.el:
* lisp/term/pc-win.el, lisp/term/rxvt.el, lisp/term/screen.el:
* lisp/term/sun.el, lisp/term/tty-colors.el, lisp/term/tvi970.el:
* lisp/term/vt100.el, lisp/term/vt200.el, lisp/term/w32-win.el:
* lisp/term/w32console.el, lisp/term/wyse50.el, lisp/term/x-win.el:
For consistency, provide 'term/name in all files that don't already.
2016-02-16 05:59:40 +00:00
|
|
|
|
(provide 'term/tvi970)
|
|
|
|
|
|
2001-07-16 12:23:00 +00:00
|
|
|
|
;;; tvi970.el ends here
|