Emacs: Xah Fly Keys, Russian Layout

By Xah Lee. Date: . Last updated: .

2024-04-23 a russian layout is added to xah fly keys.

the following is contributed by users. i don't know how useful it is.


and here's a useful add on for Russians.

(defun reverse-input-method (input-method)
  "Build the reverse mapping of single letters from INPUT-METHOD.

A VERY usefull function to use Russian key with modifier keys Ctrl, Alt,
etc and for leader key sequence also. For example Ctrl+ц → Ctrl+w

 2018-10-27 from URL `https://www.alexkorablev.ru/2017/06/10/emacs-got-keys/'"
  (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 local-function-key-map
                (vector (append mod (list from)))
                (vector (append mod (list to)))))))))
    (when input-method
      (activate-input-method current))))

(reverse-input-method 'russian-computer)

emacs, Xah Fly Keys, customization