Insert Pali and Sanskrit Characters with diacritical marks on Discourse and operating systems

Dhamma Greetings Robert (and everyone),

there are the described problems with that package, if one uses the “setup.exe”.

Flawless installation works, if one directly executes the msi-files.

Since is down, I put it on the drive of my OpenMailBox account:

Pali Keyboard Layout for Windows

Kind Regards

1 Like

Bhante Anandajoti just let me know of a Windows utility he has for this.

thank you, Piotr - i’ve just installed the EasyUnicode keyboard for the Mac from and i can say it works brilliantly - once you’ve downloaded it and dragged it into your Library folder, it works just as Bhante Sujato says the Unix one does: it’s as though inbuilt. English speakers can make it active and forget it - it’s a normal QWERTY keyboard until you press the Option key, at which point…

Buddhaṃ śaraṇaṃ gacchāmi
Dhammaṃ śaraṇaṃ gacchāmi
Sanghaṃ śaraṇaṃ gacchāmi…

mmm…or should i say “ṃṃṃ…”? :wink: it’s great. it took me only slightly longer to type that than it would have without diacriticals at all, and i’m sure i’ll get quicker as i get used to having it there. sādhu, sādhu, sādhu!

For those who use Linux without a desktop environment, there is also an easy solution. The following works on Debian GNU/Linux 8.

You can edit the XKB (X Keyboard) config file as the superuser:

# vi /etc/default/keyboard

The following line will map the Compose key to Caps Lock:


Then just restart the input subsystem like so:

# udevadm trigger --subsystem-match=input --action=change

Ãftéṝ ṭḥāṭ īṭ īś péṛṁāñēṇṭḹý ċḥãṅġēḍ.

1 Like

Cool, this works on Ubuntu too.

I’m wondering whether, since these settings are part of X, they’ll be broken/changed when the distros switch to Wayland/Myr.

Here is a bit of info.

Wayland: It looks like Wayland uses a config file called weston.ini, that accepts all the usual XKBOPTIONS stuff in a setting called keymap_options. That seems very easy and convenient.

Ubuntu+Mir: I tried the new beta of 16.04 LTS in a VM, and found that the “/etc/default/keyboard” file is still present, but mapping the compose key there and resetting the input subsystem does not work. Instead, as the root user, you should run:

# dpkg-reconfigure keyboard-configuration

This will give you a choice of compose keys using a nice dialog. After that, the program will automatically update “/etc/default/keyboard” and do some other things to enable the Compose key. In any case, it seems to work. It would be nice if they updated documentation like keyboard(5) as they change these things, though.

Update: The above “dpkg-reconfigure keyboard-configuration” also works on Debian, and is probably the more general and universal form that should be used to configure the Compose key on Debian or Ubuntu without using a desktop environment tool.


Thanks so much, that’s great to know. We should keep an eye on this and update as these roll out.

1 Like

If you like the compose-key solution that is built in on Linux, as has been mentioned above (you just need to define which key to use as the compose key), you can install WinCompose to get the same functionality on Windows. I have not tested it extensively, but it seems to work.

Nice to not have to learn different solutions, or spend time mapping keystrokes…

Hmm, after a bit of experimentation, it seems that, WinCompose doesn’t seem to completely work the same as the standard Unix/Linux bahaviour, at least on my system. Annoyingly ī doesn’t work. Neither does ō, but that’s not a problem for typing Pali…

Thanks for the solutions.
I think I’ll just stick to copy and paste from the list āīūṅñṭḍṇḷṃᾹŪṄÑḶṬ in a file opened in Notepad++.

I use the Kindle (the old model with keyboard) to access the Pali suttas (from but found that I can’t search it as I don’t know how to enter diacritics on the Kindle (BTW a quick search showed some ways for the newer Kindles).
Searching on Adobe PDF is fine (but it doesn’t take into account the diacritics).

How universally acceptable are the following symbols:

Recently I found another source for the suttas (+ vinaya) at which is more complete and am contemplating converting the diacritics in them into the symbols for .mobi (kindle version) so that they can be searched more easily. Maybe the same for a kindle Paali dictionary, eventually.

This is the velthuis system. It’s essentially useless now, it was invented for a time before Unicode. It was intended as a simple way of writing the diacritical characters, which would then be converted to the proper forms for printing. It’s not meant for actual display of texts.

They have the same suttas—Pali ones at least—as SC, but no translations. What they have extra is later texts, so they’re useful for checking commentaries.

You’re thinking of downgrading masses of texts which are already correctly coded into something else: maybe the universe is telling you something! :wink: A kindle is fine for just reading straight text, but not for searching for Pali passages. There are better tools.

1 Like

Thank you, Bhante Sujato!

It’ll be cool to be able to carry along the ‘hover-over’ dictionary capabilities of SuttaCentral offline; just like the dictionary lookup on Kindle.
What is needed would be Kindle version:
1 - A Pali-English dictionary (not a normal .mobi, but tab-delimited entries for a start)
2 - .mobi versions of Dhamma-Vinaya

A bit beyond my know-how at present as to how it is to be done.
But, I wonder at whether Kindle is able to handle the alphabet arrangements of Paali.

BTW, and both don’t have the 'nti corrected, unlike SuttaCentral.
I wasn’t sure if they were both similar and was thinking of having both copies on the Kindle for double checking.

Hmm… Perhaps I should just concentrate on making the CPED a .mobi (normal document, not dictionary) first since I know how to do that. Small steps.

It would be, not sure how this is done, though. As a general rule, support for any advanced functions is poor in ereaders, so for now we are thinking of ebooks as just plain read only documents. The fun stuff is on the web.

As for SC generally, our plan going forward is to support epub but not mobi. This is because mobi is a proprietary format and it’s closely tied to one platform. Epub is an open standard. However it’s a simple matter to convert epub to mobi, so we can leave that for users.


It would be, not sure how this is done, though.

1 - A Pali-English dictionary (not a normal .mobi, but tab-delimited entries for a start - I’ve found instructions on the internet but got sidetracked )
2 - .mobi versions of Dhamma-Vinaya (we have some of this)

All that is needed is to change the dictionary setting to point to the new dictionary on a Kindle and voila: point to a word and the dictionary entry would appear, just like SuttaCentral. The default English dictionary is adequate and I’ve tried it with a downloaded ‘Jane Austen’ library and it works fine.

Hi Waiyin,

You may find useful Pāli input pads:

1 Like

Bhante Sujato, greetings and salutation. There is actually another way to input romanized Pāḷi and Sanskrit in Linux simply by typing the Velthuis equivalent. I have used this on Linux Mint, Ubuntu GNOME, and Ubuntu Mate. To my knowledge it also works on Bodhi Linux. It’s a little bit more lengthy to setup compare to simply using compose key, but I find it easier to type the letters without having to press the compose key for each character. Here’s the procedure (based on Linux Mint but easily adapted to the various Ubuntu flavors):

  1. From Synaptic package manager, type “ibus” in the quick filter box.

  2. From the resulting packages, mark “ibus”, “ibus-m17n” and “ibus-table” for installation.

  3. Go to Menu-Preference-Input Method. Select IBus as input method. The IBus icon will appear in the system tray.

  4. Go to Menu-Preference-IBus Preferences. Select Input Method tab, click Add and in the list of languages, select Sanskrit then IAST.

5 To switch to typing Sanskrit/Pāḷi, click the IBus icon on the system tray and select Sanskrit-IAST. You can also easily switch between English and Sanskrit by pressing <super>+<spacebar> each time. This key combination is configurable in IBus Preferences under General tab.

  1. Once you switch to Sanskrit-IAST you are ready to type in Pāḷi or Sanskrit. Just use the Velthuis transliteration scheme (except for ṅ where you type ;n instead of `n). For example if you type aa, it will automatically be converted to ā. You can find the full listing of the characters that it handle and how to input it in /usr/share/m17n/sa-iast.mim.

  2. One last word of caution: Remember to switch back to English (<super>+<spacebar>) after you are done with Sanskrit or Pāḷi. Otherwise if you type “I have been to the bazaar” it will appear as “I have bēn to the bazār.”


Thanks, I had no idea this was possible. I’ve added it now for Ubuntu, here are the instructions.

sudo apt install ibus ibus-gtk ibus-qt4 ibus-m17n ibus-table

(Not sure if all these are strictly necessary!) Then:

System Settings ⇨ Text Entry ⇨ Input sources to use ⇨ ⊞ ⇨ Sanskrit IAST

In the same window, ensure that “Show current input source in the menu bar” is checked. (It should be on by default.)

Now you can change input language to Sanskrit via the icon in the top bar.

It works great in most applications. However, not in Sublime Text :disappointed: It’s a known limitation, and there are workarounds for CJK languages, which may well help.

It is certainly easier and faster to input this way if you’re typing just Pali/Sanskrit. But if it’s an occasional Pali word you need—which is the case for most of us, I assume—it’s not really usable, as you have to constantly switch languages. Anyway, it’s a great option to have in your toolkit.

Bhante, part of my posting did not come through correctly because, I think, I used angle brackets which must have been interpreted as a HTML element. Anyway, besides the icon in the top bar, I mentioned that you can also easily switch between English and Sanskrit by pressing super+spacebar each time. This key combination is configurable in IBus Preferences under General tab. In my case I configured it to use ctrl+spacebar instead because I find this easier to type. Using this keyboard shortcut it is easy to switch between languages. In my case I have only English and Sanskrit. So the shortcut serves like a a quick toggle switch between the two. But if you use more languages then of course it takes more keystroke to get to the language you want to use.

Yes, that certainly makes it easier.

I’ve fixed the code issue for you in your post. You can use backticks (`) to make HTML code show up in Markdown.

Thank you, bhante.

1 Like