[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inputting characters with specialist diacritic marks in emacs

From: Sven Bretfeld
Subject: Re: Inputting characters with specialist diacritic marks in emacs
Date: Thu, 21 Jan 2016 21:31:11 +0100
User-agent: mu4e 0.9.15; emacs 24.5.1 writes:

> My makeshift solution is to use the "global-set-key" function to bind 
> individual characters to keys, e.g.,
> (global-set-key (kbd "C-c y") (lambda () (interactive) (insert "ñ")))
> (global-set-key (kbd "C-c t") (lambda () (interactive) (insert "ṭ")))
> (global-set-key (kbd "C-c d") (lambda () (interactive) (insert "ḍ")))


Here is what I've been using for years to type Sanskrit, Pali and
Tibetan. The M-a prefix feels quite natural after short. I just hit it
with thumb and middle finger of the left hand. Stefan's sanskrit.el
package is brilliant but might be overkill. Too many different prefixes
to remember for my taste. Using one easy-to-reach prefix for everything
and adding an intuitive follow-up key (i for ī, I for Ī) seems more easy
to me.



(define-key global-map [(meta a)] nil) ;;Alt-a als Präfix freigeben
(define-key org-mode-map [(meta a)] nil) ;; auch für orgmode

(defun insert-lang-a ()
(ucs-insert #x0101))
(global-set-key "\M-aa" 'insert-lang-a)

(defun insert-lang-i ()
(ucs-insert #x012B))
(global-set-key "\M-ai" 'insert-lang-i)

(defun insert-lang-u ()
(ucs-insert #x016B))
(global-set-key "\M-au" 'insert-lang-u)

(defun insert-punkt-r ()
(ucs-insert #x1E5B))
(global-set-key "\M-ar" 'insert-punkt-r)

(defun insert-punkt-l ()
(ucs-insert #x1E37))
(global-set-key "\M-al" 'insert-punkt-l)

(defun insert-lang-e ()
(ucs-insert #x0113))
(global-set-key "\M-ae" 'insert-lang-e)

(defun insert-lang-o ()
(ucs-insert #x014D))
(global-set-key "\M-ao" 'insert-lang-o)

(defun insert-nga ()
(ucs-insert #x1E45))
(global-set-key "\M-ag" 'insert-nga)

(defun insert-nya ()
(ucs-insert #x00F1))
(global-set-key "\M-ac" 'insert-nya)

(defun insert-punkt-t ()
(ucs-insert #x1E6D))
(global-set-key "\M-at" 'insert-punkt-t)

(defun insert-punkt-d ()
(ucs-insert #x1E0D))
(global-set-key "\M-ad" 'insert-punkt-d)

(defun insert-punkt-n ()
(ucs-insert #x1E47))
(global-set-key "\M-an" 'insert-punkt-n)

(defun insert-sha ()
(ucs-insert #x015B))
(global-set-key "\M-ax" 'insert-sha)

(defun insert-punkt-s ()
(ucs-insert #x1E63))
(global-set-key "\M-as" 'insert-punkt-s)

(defun insert-zha ()
(ucs-insert #x017A))
(global-set-key "\M-az" 'insert-zha)

(defun insert-punkt-m ()
(ucs-insert #x1E43))
(global-set-key "\M-am" 'insert-punkt-m)

(defun insert-punkt-h ()
(ucs-insert #x1E25))
(global-set-key "\M-ah" 'insert-punkt-h)

(defun insert-lang-a-gr ()
(ucs-insert #x0100))
(global-set-key "\M-aA" 'insert-lang-a-gr)

(defun insert-lang-i-gr ()
(ucs-insert #x012A))
(global-set-key "\M-aI" 'insert-lang-i-gr)

(defun insert-lang-u-gr ()
(ucs-insert #x016A))
(global-set-key "\M-aU" 'insert-lang-u-gr)

(defun insert-punkt-r-gr ()
(ucs-insert #x1E5A))
(global-set-key "\M-aR" 'insert-punkt-r-gr)

(defun insert-lang-e-gr ()
(ucs-insert #x0112))
(global-set-key "\M-aE" 'insert-lang-e-gr)

(defun insert-lang-o-gr ()
(ucs-insert #x014C))
(global-set-key "\M-aO" 'insert-lang-o-gr)

(defun insert-nga-gr ()
(ucs-insert #x1E44))
(global-set-key "\M-aG" 'insert-nga-gr)

(defun insert-nya-gr ()
(ucs-insert #x00D1))
(global-set-key "\M-aC" 'insert-nya-gr)

(defun insert-punkt-t-gr ()
(ucs-insert #x1E6C))
(global-set-key "\M-aT" 'insert-punkt-t-gr)

(defun insert-punkt-d-gr ()
(ucs-insert #x1E0C))
(global-set-key "\M-aD" 'insert-punkt-d-gr)

(defun insert-punkt-n-gr ()
(ucs-insert #x1E46))
(global-set-key "\M-aN" 'insert-punkt-n-gr)

(defun insert-sha-gr ()
(ucs-insert #x015A))
(global-set-key "\M-aX" 'insert-sha-gr)

(defun insert-punkt-s-gr ()
(ucs-insert #x1E62))
(global-set-key "\M-aS" 'insert-punkt-s-gr)

(defun insert-zha-gr ()
(ucs-insert #x0179))
(global-set-key "\M-aZ" 'insert-zha-gr)

(defun insert-punkt-m-gr ()
(ucs-insert #x1E42))
(global-set-key "\M-aM" 'insert-punkt-m-gr)

(defun insert-punkt-h-gr ()
(ucs-insert #x1E24))
(global-set-key "\M-aH" 'insert-punkt-h-gr)

(defun insert-lang-ae-gr ()
(ucs-insert #x01DF))
(global-set-key "\M-ap" 'insert-lang-ae-gr)

(defun insert-degree ()
(ucs-insert #xB0))
(global-set-key "\M-a|" 'insert-degree)


Sven Bretfeld
Department of Philosophy and Religious Studies
NTNU Trondheim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]