Function: quail-keyboard-translate
quail-keyboard-translate is a byte-compiled function defined in
quail.el.gz.
Signature
(quail-keyboard-translate CHAR)
Documentation
Translate CHAR to the one in the standard keyboard layout.
Source Code
;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
(defun quail-keyboard-translate (char)
"Translate CHAR to the one in the standard keyboard layout."
(if (eq quail-keyboard-layout quail-keyboard-layout-standard)
;; All Quail packages are designed based on
;; `quail-keyboard-layout-standard'.
char
(let ((i 0))
;; Find the key location on the current keyboard layout.
(while (and (< i quail-keyboard-layout-len)
(/= char (aref quail-keyboard-layout i)))
(setq i (1+ i)))
(if (= i quail-keyboard-layout-len)
;; CHAR is not in quail-keyboard-layout, which means that a
;; user typed a key which generated a character code to be
;; handled out of Quail. Just return CHAR and make
;; quail-execute-non-quail-command handle it correctly.
char
(let ((ch (aref quail-keyboard-layout-standard i)))
(if (= ch ?\ )
;; This location not available in the standard keyboard
;; layout. Check if the location is used to substitute
;; for the other location of the standard layout.
(if (setq i (cdr (assq i quail-keyboard-layout-substitution)))
(aref quail-keyboard-layout-standard i)
;; Just return CHAR as well as above.
char)
ch))))))