Skip to content

Instantly share code, notes, and snippets.

@vhbit
Last active August 29, 2015 13:57
Show Gist options
  • Save vhbit/9451761 to your computer and use it in GitHub Desktop.
Save vhbit/9451761 to your computer and use it in GitHub Desktop.
Russian input method for Dvorak keyboard on Mac

Put ru-mac-dv.el into $SHARE_DIR/emacs/$version/lisp/leim/quail

If Emacs is installed from Homebrew, SHARE_DIR will look like HOMEBREW_DIR/share, which in most cases is either /usr/local/share or ~/homebrew/share

For activation, put the following snippet into your custom.el:

(register-input-method 
   "russian-md" "Russian-Mac Dvorak" 'quail-use-package
   "RU-MD" "ЙЦУКЕН Russian Mac Dvorak layout"
   "quail/ru-mac-dv")
;;; ru-mac-dv.el -- Quail package for Mac dvorak
;;; Commentary:
;;; Code:
;; See comment above. This is the variant `winkeys' from `ru' in XKB.
(require 'quail)
(quail-define-package
"russian-md" "Russian-MacDvorak" "RU-MD" nil
"ЙЦУКЕН Russian Mac Dvorak layout"
nil t t t t nil nil nil nil nil t)
;; 1! 2" 3№ 4; 5% 6: 7? 8* 9( 0) -_ =+ \/ ёЁ
;; Й Ц У К Е Н Г Ш Щ З Х Ъ
;; Ф Ы В А П Р О Л Д Ж Э
;; Я Ч С М И Т Ь Б Ю .,
(quail-define-rules
("1" ?1)
("2" ?2)
("3" ?3)
("4" ?4)
("5" ?5)
("6" ?6)
("7" ?7)
("8" ?8)
("9" ?9)
("0" ?0)
("[" ?-)
("]" ?=)
("|" ?/)
("`" ?ё)
("'" ?й)
("," ?ц)
("." ?у)
("p" ?к)
("y" ?е)
("f" ?н)
("g" ?г)
("c" ?ш)
("r" ?щ)
("l" ?з)
("/" ?х)
("=" ?ъ)
("a" ?ф)
("o" ?ы)
("e" ?в)
("u" ?а)
("i" ?п)
("d" ?р)
("h" ?о)
("t" ?л)
("n" ?д)
("s" ?ж)
("-" ?э)
("\\" ?\\)
(";" ?я)
("q" ?ч)
("j" ?с)
("k" ?м)
("x" ?и)
("b" ?т)
("m" ?ь)
("w" ?б)
("v" ?ю)
("z" ?/)
("!" ?!)
("@" ?\")
("#" ?№)
("$" ?%)
("%" ?:)
("^" ?,)
("&" ?.)
("*" ?\;)
("(" ?()
(")" ?))
("{" ?_)
("}" ?+)
("~" ?Ё)
("\"" ?Й)
("<" ?Ц)
(">" ?У)
("P" ?К)
("Y" ?Е)
("F" ?Н)
("G" ?Г)
("C" ?Ш)
("R" ?Щ)
("L" ?З)
("?" ?Х)
("+" ?Ъ)
("A" ?Ф)
("O" ?Ы)
("E" ?В)
("U" ?А)
("I" ?П)
("D" ?Р)
("H" ?О)
("T" ?Л)
("N" ?Д)
("S" ?Ж)
("_" ?Э)
("|" ?|)
(":" ?Я)
("Q" ?Ч)
("J" ?С)
("K" ?М)
("X" ?И)
("B" ?Т)
("M" ?Ь)
("W" ?Б)
("V" ?Ю)
("Z" ??))
;; Local Variables:
;; coding: utf-8
;; End:
;;; ru-mac-dv.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment