I'm using the following function, adapted from a ru_emacs posting:
(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) (setq normal-local-function-key-map (copy-keymap local-function-key-map)) (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 local-function-key-map (vector (append mod (list from))) (vector (append mod (list to))))))))) (when input-method (activate-input-method current)))) (defadvice* ignore-reverse-input-method around (read-passwd quoted-insert) (let ((local-function-key-map normal-local-function-key-map)) ad-do-it)) (reverse-input-method 'russian-computer)
Caveat: some previously unbound combinations in the English layout will also be remapped this way, e.g. M-"
to M-@
. As it does not extend to any already bound combinations, not much of a problem IMO.