bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9751: 23.3; Alternative Keyboard Feature/Bug


From: Juri Linkov
Subject: bug#9751: 23.3; Alternative Keyboard Feature/Bug
Date: Tue, 25 Oct 2011 18:45:01 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)

>> The patch below at least works for this test case,
>
> Installed,

Thanks!  This old problem is finally solved:

http://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00091.html

Building the reverse mapping is possible now with a function like:

(defun reverse-input-method (input-method)
  "Build the reverse mapping of single letters from INPUT-METHOD."
  (interactive
   (list (read-input-method-name "Use input method (default current): ")))
  (if (and input-method (symbolp input-method))
      (setq input-method (symbol-name input-method)))
  (let ((current current-input-method)
        (modifiers '(nil (control) (meta) (control meta))))
    (when input-method
      (activate-input-method input-method))
    (when (and current-input-method quail-keyboard-layout)
      (dolist (map (cdr (quail-map)))
        (let* ((to (car map))
               (from (quail-get-translation
                      (cadr map) (char-to-string to) 1)))
          (when (and (characterp from) (characterp to))
            (dolist (mod modifiers)
              (define-key function-key-map
                (vector (append mod (list from)))
                (vector (append mod (list to)))))))))
    (when input-method
      (activate-input-method current))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]