• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/international/

Lines Matching defs:layout

186 (defsubst quail-show-layout ()
187 "Return `show-layout' flag of the current Quail package.
395 kbd-translate show-layout create-decode-map
438 user's keyboard layout to the standard keyboard layout. See the
439 documentation of `quail-keyboard-layout' and
440 `quail-keyboard-layout-standard' for more detail.
443 the user's keyboard layout visually with translated characters.
499 forget-last-selection deterministic kbd-translate show-layout
595 ;; Keyboard layout translation handlers.
598 ;; requires a particular keyboard layout. In this case, what we need
602 ;; information of his own keyboard layout, then translate it to the
603 ;; standard layout which we defined so that all Quail packages depend
606 (defconst quail-keyboard-layout-standard
614 "Standard keyboard layout of printable characters Quail assumes.
615 See the documentation of `quail-keyboard-layout' for this format.
616 This layout is almost the same as that of VT100,
620 (defconst quail-keyboard-layout-len 180)
624 (defvar quail-keyboard-layout-alist
626 (cons "standard" quail-keyboard-layout-standard)
665 "Alist of keyboard names and corresponding layout strings.
666 See the documentation of `quail-keyboard-layout' for the format of
667 the layout string.")
669 (defcustom quail-keyboard-layout quail-keyboard-layout-standard
670 "A string which represents physical key layout of a particular keyboard.
681 The command `quail-set-keyboard-layout' usually sets this variable."
686 quail-keyboard-layout-alist)
689 ;; A non-standard keyboard layout may miss some key locations of the
690 ;; standard layout while having additional key locations not in the
691 ;; standard layout. This alist maps those additional key locations to
693 ;; quail-set-keyboard-layout.
694 (defvar quail-keyboard-layout-substitution nil)
696 (defun quail-update-keyboard-layout (kbd-type)
697 (let ((layout (assoc kbd-type quail-keyboard-layout-alist)))
698 (if (null layout)
700 ;; layout interactively.
702 (setq quail-keyboard-layout (cdr layout))
703 (let ((i quail-keyboard-layout-len)
705 ;; Sum up additional key locations not in the standard layout in
709 (if (= (aref quail-keyboard-layout i) ? )
710 (if (/= (aref quail-keyboard-layout-standard i) ? )
712 (if (= (aref quail-keyboard-layout-standard i) ? )
714 (setq quail-keyboard-layout-substitution subst-list)
724 (defcustom quail-keyboard-layout-type "standard"
725 "Type of keyboard layout used in Quail base input method.
726 Available types are listed in the variable `quail-keyboard-layout-alist'."
730 quail-keyboard-layout-alist))
732 (quail-update-keyboard-layout value)
736 (defun quail-set-keyboard-layout (kbd-type)
737 "Set the current keyboard layout to the same as keyboard KBD-TYPE.
739 Since some Quail packages depends on a physical layout of keys (not
741 standard layout defined in `quail-keyboard-layout-standard'. This
742 function tells Quail system the layout of your keyboard so that what
747 quail-keyboard-layout-alist)))
749 (quail-update-keyboard-layout kbd-type)
750 (setq quail-keyboard-layout-type kbd-type))
753 "Translate CHAR to the one in the standard keyboard layout."
754 (if (eq quail-keyboard-layout quail-keyboard-layout-standard)
756 ;; `quail-keyboard-layout-standard'.
759 ;; Find the key location on the current keyboard layout.
760 (while (and (< i quail-keyboard-layout-len)
761 (/= char (aref quail-keyboard-layout i)))
763 (if (= i quail-keyboard-layout-len)
764 ;; CHAR is not in quail-keyboard-layout, which means that a
769 (let ((ch (aref quail-keyboard-layout-standard i)))
772 ;; layout. Check if the location is used to substitute
773 ;; for the other location of the standard layout.
774 (if (setq i (cdr (assq i quail-keyboard-layout-substitution)))
775 (aref quail-keyboard-layout-standard i)
785 (defun quail-insert-kbd-layout (kbd-layout)
786 "Insert the visual keyboard layout table according to KBD-LAYOUT.
787 The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
788 (let (done-list layout i ch)
791 (setq layout (string-to-vector kbd-layout)
793 (while (< i quail-keyboard-layout-len)
794 (setq ch (aref kbd-layout i))
806 (aset layout i translation))
818 (while (< i quail-keyboard-layout-len)
823 (setq lower (aref layout i)
824 upper (aref layout (1+ i)))
896 (defun quail-show-keyboard-layout (&optional keyboard-type)
897 "Show the physical layout of the keyboard type KEYBOARD-TYPE.
899 The variable `quail-keyboard-layout-type' holds the currently selected
903 quail-keyboard-layout-alist
906 (setq keyboard-type quail-keyboard-layout-type))
907 (let ((layout (assoc keyboard-type quail-keyboard-layout-alist)))
908 (or layout
912 (insert "Keyboard layout (keyboard type: "
915 (quail-insert-kbd-layout (cdr layout))))))
2434 (define-button-type 'quail-keyboard-layout-button
2436 'help-function '(lambda (layout)
2437 (help-setup-xref `(quail-keyboard-layout-button ,layout) nil)
2438 (quail-show-keyboard-layout layout))
2439 'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
2443 'help-echo (purecopy "mouse-2, RET: customize keyboard layout"))
2487 ;; Show keyboard layout if the current package requests it..
2488 (when (quail-show-layout)
2495 quail-keyboard-layout-type
2496 'quail-keyboard-layout-button
2497 quail-keyboard-layout-type)
2498 (insert "' layout,
2499 translation results in the following \"virtual\" keyboard layout:
2502 (quail-insert-kbd-layout quail-keyboard-layout))
2503 (insert "If your keyboard has a different layout, rearranged from
2507 'quail-keyboard-layout-button "standard")
2511 You can set the variable `quail-keyboard-layout-type' to specify
2512 the physical layout of your keyboard; the tables shown in
2514 physical keyboard layout as specified with that variable.
2517 "[customize keyboard layout]"
2518 'quail-keyboard-customize-button 'quail-keyboard-layout-type)
2531 (if (quail-show-layout)