In emacs, I use the
Typo package, plus this quail set up:
(require 'quail)
;;; Unified latin input method:
(quail-define-package
"unilat-gk" "Universal Latin (GK)" "" nil
"A universal Latin input method.
Defines key combos for inputting Turkish, Italian, French,
Portuguese, Spanish, German, Latin, and Nordic Germanics.")
(eval
`(quail-define-rules
;; Turkish I and umlauts, cedillas circumflecis
("i" ?i) ("i;" ?ı) ("o;" ?ö) ("u;" ?ü) ("c;" ?ç) ("g;" ?ğ) ("s;" ?ş)
("I;" ?İ) ("O;" ?Ö) ("U;" ?Ü) ("C;" ?Ç) ("G;" ?Ğ) ("S;" ?Ş) ("A^" ?Â)
("E^" ?Ê) ("U^" ?Û) ("I^" ?Î) ("O^" ?Ô)
("a^" ?â) ("e^" ?ê) ("i^" ?î) ("u^" ?û) ("o^" ?ô)
;; Acute and breve
("a\\" ?à) ("e\\" ?è) ("i\\" ?ì) ("o\\" ?ò) ("u\\" ?ù)
("A\\" ?À) ("E\\" ?È) ("I\\" ?Ì) ("O\\" ?Ò) ("U\\" ?Ù)
("a/" ?á) ("e/" ?é) ("i/" ?í) ("o/" ?ó) ("u/" ?ú)
("A/" ?Á) ("E/" ?É) ("I/" ?Í) ("O/" ?Ó) ("U/" ?Ú)
;; Macron
("a_" ?ā) ("e_" ?ē) ("i_" ?ī) ("o_" ?ō) ("u_" ?ū)
("A_" ?Ā) ("E_" ?Ē) ("I_" ?Ī) ("O_" ?Ō) ("U_" ?Ū)
;; Tilde
("a~" ?ã) ("e~" ?ẽ) ("i~" ?ĩ) ("o~" ?õ) ("u~" ?ũ) ("n~" ?ñ)
("A~" ?Ã) ("E~" ?Ẽ) ("I~" ?Ĩ) ("O~" ?Õ) ("U~" ?Ũ) ("N~" ?Ñ)
;; Ordinal
("a&" ?ª) ("o&" ?º)
;; Various
("I:" ?Ï) ("i:" ?ï) ("a:" ?ä) ("A:" ?Ä) ("e:" ?ë) ("E:" ?Ë) ("a0" ?å)
("A0" ?Å) ("o$" ?ø) ("O$" ?Ø) ("sZ" ?ß) ("o£" ?œ) ("O£" ?Œ) ("a£" ?æ)
("A£" ?Æ)
;; Escaping.
,@(mapcar
(lambda (letter)
(list (format "%c#" letter) letter))
(string-to-list "aeiouAEIOUscgnSCGN"))))
The last pair of toplevels have to be evaluated one after another, ‘quail-define-rules’ modifies the last created quail package. Stupid, but what can one do…
I use the ‘#’ character to escape the combination, i.e. a# inserts a literally. Otherwise I'd have to use C-g to interrupt a combination, which doesn't work well with macroes, i.e. stops the recording.
I use a British Q keyboard, so I need this too:
(add-to-list 'quail-keyboard-layout-alist
`("gb" . ,(concat " "
" 1!2\"3£4$5%6^7&8*9(0)-_=+ "
" qQwWeErRtTyYuUiIoOpP[{]} "
" aAsSdDfFgGhHjJkKlL;:'@#~ "
" \\|zZxXcCvVbBnNmM,<.>/? "
" ")))
(quail-set-keyboard-layout "gb")
And in ‘~/.xombrero.conf’:
external_editor = emacsclient <file>
When I hit C-i in any input field, a buffer with name like ‘xombreroALP5BY’ pops up in my already running emacs instance, then I edit, and hit ‘C-x #’ to send text to xombrero (technically not so, but works like that).
Hope I didn't skip anything, if it doesn't work, please tell.