The easiest way to type transliterated Sanskrit I have found is to use the small app aText.
aText is a text expander app. It can replace or extend any text you typed. This will probably also work with other text expanders like TypeIt4Me, TextExpander and others. aText costs 5 Euro in the Mac App Store. I would recommend to buy it from the developers site (http://www.trankynam.com/atext/) though as that version is more capable as it is not restricted by the Mac sandboxing.
Once installed you find the aText symbol on the right hand side of the Finder’s menu bar.
All you need to do now is to create a new group.
- Choose “Show aText” to open aText if it is not already open.
- Click on “New Group”.
- Give the group a name like “Sanskrit Transliteration”.
- Make sure the “Expand” pop up is set to “Immediately”.
- Choose “Any character” for the pop up “If abbreviation is placed after”.
This is important as this makes sure you can type along without having to type a trigger key like space, tab or return, thus ensuring a normal typing.
Now you can set up the shortcut snippets.
- Make sure you have selected the Sanskrit Transliteration group you just created.
- Click on the + icon to create a new snippet.
- Type the abbreviation you want to use into the abbreviation field, for instance type t. to get a ṭ.
- Type the actual character the abbreviation should get replaced with, the ṭ.
- Continue to create new snippets until you have covered all special latin characters used.
Following screenshot shows you what snippets I use.
For any accent under a character the accent-indicator (dot, hypen, etc.) is used after the latin character.
For any accent above a character the accent-indicator is used before the character.
So a dot below a character is always written r. l. m. h. t. d. n.
This gets replaced then by ṛ ḷ ṃ ḥ ṭ ḍ ṇ
For a dot above, type the dot before the character like .m to get ṃ
For a macron type a hyphen before the characters: -a -i -u and -r. and -l.
You get ā ī ū ṝ ḹ
For ṝ and ḹ you will get a small pop up from which you can select if it should be expanded to ṝ and ḹ or ṛ and ḷ
To get the ñ type ~n
To get the ś type ‘s
Use the systems character palette to insert the special characters ṭ ḍ and so on.
If you don’t need to write in Transliteration anymore, disable aText in its menu so you don’t get this replacements when typing in other languages.
Now you can write transliterated Sanskrit in all applications, at least all applications that behave properly and are using the standard Mac frameworks for programming their apps, which should be the vast majority.