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