Facebook Twitter Gplus YouTube RSS
Home Tech Typing Pāli in X11: customizing key mappings with .xmodmap
formats

Typing Pāli in X11: customizing key mappings with .xmodmap

Published on 2012/03/12, by in Tech.

After installing a unicode font, such as Gentium or Arial Unicode MS, the X Window System makes it easy to type Pāli without much effort and it can soon become second nature. To achieve this we’ll modify the X11 key mappings using the .xmodmap file. “xmodmap [is] utility for modifying keymaps and pointer button mappings in X” (man 1 xmodmap). We’ll also need to reference this change in .xinitrc.  Here’s an .xmodmap you can easily include and uses keys that are somewhat intuitive.  The ‘y’ is used for ñ since it sounds somewhat similar and ‘n’ is taken for ṇ.  Feel free to swap things around.

.xmodmap

! Make caps lock another left control, saves pinky finger
remove Lock = Caps_Lock
keysym Caps_Lock = Mode_switch

! Pāli unicode character mappings, cheat sheet at
! http://fsnow.com/pali/fonts/roman-table/

!-------------------------------------------------------
! latin capital letter a with macron             = U0100
! latin small letter a with macron               = U0101
keycode 0x26 = a A  U0101 U0100  p p U094b U0913

!-------------------------------------------------------
! latin capital letter i with macron             = U012A
! latin small letter i with macron               = U012B
keycode 0x1F = i I  U012B U012A  p p U0917 U0918

!-------------------------------------------------------
! latin capital letter u with macron             = U016A
! latin small letter u with macron               = U016B
keycode 0x1E = u U U016B U016A  p  p U0939 U0919

!-------------------------------------------------------
! latin capital letter m with dot below          = U1E42
! latin small letter m with dot below            = U1E43
keycode 0x3A = m M  U1E43 U1E42  p p U1E43 U1E42
! same as eng below
!-------------------------------------------------------
! latin capital letter eng                      = U014A
! latin small letter eng                        = U014B
keycode 0x2A = g G  U014B U014A  p p U0941 U0909

!-------------------------------------------------------
! latin capital letter n with tilde              = U00D1
! latin small letter n with tilde                = U00F1
! ñ sounds like nya so using y since n taken for n w/dot
keycode 0x1D = y Y  U00F1 U00D1  p p U00F1  U00D1

!-------------------------------------------------------
! latin capital letter t with dot below          = U1E6C
! latin small letter t with dot below            = U1E6D
keycode 0x1C = t T  U1E6D U1E6C  p p U0942  U090a

!-------------------------------------------------------
! latin capital letter d with dot below          = U1E0C
! latin small letter d with dot below            = U1E0D
keycode 0x28 = d D  U1E0D U1E0C  p p U094d U0905

!-------------------------------------------------------
! latin capital letter n with dot below          = U1E46
! latin small letter n with dot below            = UE147
keycode 0x39 = n N  U1E47 U1E46  p p U1E47 U1E46

!-------------------------------------------------------
! latin capital letter l with dot below          = U1E36
! latin small letter l with dot below            = U1E37
keycode 0x2E = l L  U1E37 U1E36  p p U0924 U0925

!-------------------------------------------------------
!-------------------------------------------------------
!-------------------------------------------------------
! The following keys are not used in Pāli but in Sanskrit
! which is sometimes referenced with discussing Pāli
!-------------------------------------------------------
!-------------------------------------------------------
!-------------------------------------------------------

!-------------------------------------------------------
! latin capital letter h with dot below          = U1E24
! latin small letter h with dot below            = U1E25
keycode 0x2B = h H  U1E25 U1E24  p p U092A U092b

!-------------------------------------------------------
! latin capital letter s with acute              = U015A
! latin small letter s with acute                = U015B
!keycode 0xNN = x X  U015B U015A  p p U015B U015A

!-------------------------------------------------------
! latin capital letter n with dot below          = U1E44
! latin small letter n with dot below            = U1E45
!keycode 0x39 = n N  U1E45 U1E44  p p U1E45 U1E44

!-------------------------------------------------------
! latin capital letter r with dot below          = U1E5A
! latin small letter r with dot below            = U1E5B
keycode 0x1B = r R  U1E5B U1E5A  p p U1E5B U1E5A

!-------------------------------------------------------
! latin capital letter s with dot below          = U1E62
! latin small letter s with dot below            = U1E63
keycode 0x27 = s S  U1E63 U1E62  p p U1E63 U1E62

 

.xinitrc

# add these lines to .xinitrc, if they're not already there
usermodmap=$HOME/.xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

 

 

Happy typing!

Share
 

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2016 Evam.Me