;; mr-itrans.mim -- Marathi input method with ITRANS method
;; Original keymap was based on Hindi Itrans layout, modified by Red Hat.
;; Copyright (C) 2003, 2004, 2005, 2006
;;   National Institute of Advanced Industrial Science and Technology (AIST)
;;   Registration Number H15PRO112

;; This file is part of the m17n contrib; a sub-part of the m17n
;; library.

;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.

;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Lesser General Public License for more details.

;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

(input-method mr itrans)

(description "Marathi input method by ITRANS transliteration.
For the detail of ITRANS, see the page:
  <http://www.aczoom.com/itrans/>

Author: Rahul Bhalerao <rbhalera@redhat.com>
")

(title "क")

(map
 (starter
  (".") ("~") ("#") ("$") ("^") ("*") ((S-\ )) ((C-@))
  ("0") ("1") ("2") ("3") ("4")
  ("5") ("6") ("7") ("8") ("9")
  ("A") ("C") ("D") ("E") ("G") ("H") ("I") ("J") ("K") ("L")
  ("M") ("N") ("O") ("R") ("S") ("T") ("U") ("Y")
  ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i")
  ("j") ("k") ("l") ("m") ("n") ("o") ("p") ("q") ("r")
  ("s") ("t") ("u") ("v") ("w") ("x") ("y") ("z"))

 (consonant
  ("k" "क्")
  ("kh" "ख्")
  ("g" "ग्")
  ("gh" "घ्")
  ("~N" "ङ्")
  ("N^" "ङ्")
  ("ch" "च्")
  ("Ch" "छ्")			      ; not in ITRANS Devenagari table
  ("chh" "छ्")
  ("j" "ज्")
  ("jh" "झ्")
  ("~n" "ञ्")
  ("JN" "ञ्")
  ("T" "ट्")
  ("Th" "ठ्")
  ("D" "ड्")
  ("Dh" "ढ्")
  ("N" "ण्")
  ("t" "त्")
  ("th" "थ्")
  ("d" "द्")
  ("dh" "ध्")
  ("n" "न्")
  ("nh" "ऩ्")			      ; not in ITRANS Devenagari table
  ("p" "प्")
  ("ph" "फ्")
  ("b" "ब्")
  ("bh" "भ्")
  ("m" "म्")
  ("y" "य्")
  ("r" "र्")
  ("rh" "ऱ्")			      ; not in ITRANS Devenagari table
  ("l" "ल्")
  ("L" "ळ्")
  ("ld" "ळ्")
  ("v" "व्")
  ("w" "व्")
  ("sh" "श्")
  ("Sh" "ष्")
  ("shh" "ष्")
  ("s" "स्")
  ("h" "ह्")
  ("q" "क़्")
  ("K" "ख़्")
  ("G" "ग़्")
  ("J" "ज़्")
  ("z" "ज़्")
  (".D" "ड़्")
  (".Dh" "ढ़्")
  ("f" "फ़्")
  ("Y" "य़्")			      ; not in ITRANS Devanagari table
  ("yh" "य़्")			      ; not in ITRANS Devanagari table
  ("j~n" "ज्ञ्")
  ("GY" "ज्ञ्")
  ("dny" "ज्ञ्")		      ; not in ITRANS Devanagari table
  ("x" "क्ष्"))

 (independent
  ("a" "अ")
  ("aa" "आ")
  ("A" "आ")
  ("i" "इ")
  ("ii" "ई")
  ("I" "ई")
  ("u" "उ")
  ("uu" "ऊ")
  ("U" "ऊ")
  ("RRi" "ऋ")
  ("R^i" "ऋ")
  ("LLi" "ऌ")			      ; not in ITRANS Devanagari table
  ("L^i" "ऌ")			      ; not in ITRANS Devanagari table
  (".c" "ऍ")			      ; not in ITRANS Devanagari table
  ("e.c" "ऍ")
  ("ee" "ऎ")			      ; not in ITRANS Devanagari table
  ("E" "ऎ")			      ; not in ITRANS Devanagari table
  ("e" "ए")
  ("ai" "ऐ")
  ("o.c" "ऑ")
  ("oo" "ऒ")			      ; not in ITRANS Devanagari table
  ("O" "ऒ")			      ; not in ITRANS Devanagari table
  ("o" "ओ")
  ("au" "औ")
  ("RRI" "ॠ")			      ; not in ITRANS Devanagari table
  ("R^I" "ॠ")			      ; not in ITRANS Devanagari table
  ("LLI" "ॡ")			      ; not in ITRANS Devanagari table
  ("L^I" "ॡ")			      ; not in ITRANS Devanagari table
  (".N" "ँ")
  (".n" "ं")
  ("M" "ं")
  ("H" "ः")
  (".a" "ऽ")
  (".h" "्")
  ("AUM" "ॐ")
  ("OM" "ॐ")
  (".." "।")			      ; not in ITRANS Devanagari table
  ("0" "०")
  ("1" "१")
  ("2" "२")
  ("3" "३")
  ("4" "४")
  ("5" "५")
  ("6" "६")
  ("7" "७")
  ("8" "८")
  ("9" "९")
  ("#" "्र")			      ; not in ITRANS Devanagari table
  ("$" "र्")			      ; not in ITRANS Devanagari table
  ("^" "त्र")			      ; not in ITRANS Devanagari table
  ("*" "श्र")			      ; not in ITRANS Devanagari table
  ("]" "़")			      ; not in ITRANS Devanagari table
  ((S-\ ) "‌")			      ; not in ITRANS Devanagari table
  ((C-@) "‍"))			      ; not in ITRANS Devanagari table

 (dependent
  ("a" (delete @-) "")
  ("aa" (delete @-) "ा")
  ("A" (delete @-) "ा")
  ("i" (delete @-) "ि")
  ("ii" (delete @-) "ी")
  ("I" (delete @-) "ी")
  ("u" (delete @-) "ु")
  ("uu" (delete @-) "ू")
  ("U" (delete @-) "ू")
  ("RRi" (delete @-) "ृ")
  ("R^i" (delete @-) "ृ")
  ("LLi" (delete @-) "ॢ")	      ; not in ITRANS Devanagari table
  ("L^i" (delete @-) "ॢ")	      ; not in ITRANS Devanagari table
  (".c" (delete @-) "ॅ")	      ; not in ITRANS Devanagari table
  ("e.c" (delete @-) "ॅ")
  ("ee" (delete @-) "ॆ")	      ; not in ITRANS Devanagari table
  ("E" (delete @-) "ॆ")		      ; not in ITRANS Devanagari table
  ("e" (delete @-) "े")
  ("ai" (delete @-) "ै")
  ("o.c" (delete @-) "ॉ")
  ("oo" (delete @-) "ॊ")	      ; not in ITRANS Devanagari table
  ("O" (delete @-) "ॊ")		      ; not in ITRANS Devanagari table
  ("o" (delete @-) "ो")
  ("au" (delete @-) "ौ")
  ("RRI" (delete @-) "ॄ")	      ; not in ITRANS Devanagari table
  ("R^I" (delete @-) "ॄ")	      ; not in ITRANS Devanagari table
  ("LLI" (delete @-) "ॣ")	      ; not in ITRANS Devanagari table
  ("L^I" (delete @-) "ॣ"))	      ; not in ITRANS Devanagari table

 (return
  ((Return)))

 (backspace
  ((BackSpace) (undo))))

(state
 (init
  (starter (pushback 1) (shift intermediate)))

 (intermediate
  (consonant (shift second))
  (independent (shift init))
  (backspace)
  (return (shift init)))

 (second
  (consonant)
  (dependent (shift init))
  (backspace)
  (return (shift init))))

;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; End:
