accfa26
;; hi-typewriter.mim -- Devanagari input method with typewriter method
accfa26
;; Copyright (C) 2005
accfa26
;;   National Institute of Advanced Industrial Science and Technology (AIST)
accfa26
;;   Registration Number H15PRO112
accfa26
accfa26
;; This file is part of the m17n contrib; a sub-part of the m17n
accfa26
;; library.
accfa26
accfa26
;; The m17n library is free software; you can redistribute it and/or
accfa26
;; modify it under the terms of the GNU Lesser General Public License
accfa26
;; as published by the Free Software Foundation; either version 2.1 of
accfa26
;; the License, or (at your option) any later version.
accfa26
accfa26
;; The m17n library is distributed in the hope that it will be useful,
accfa26
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
accfa26
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
accfa26
;; Lesser General Public License for more details.
accfa26
accfa26
;; You should have received a copy of the GNU Lesser General Public
accfa26
;; License along with the m17n library; if not, write to the Free
accfa26
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
accfa26
;; 02111-1307, USA.
accfa26
accfa26
(input-method hi typewriter)
accfa26
accfa26
(description "Hindi input method with `typewriter' method.
accfa26
Still experimental.
accfa26
")
accfa26
accfa26
(title "क")
accfa26
accfa26
(map
accfa26
 (consonant
accfa26
 
accfa26
  ((KP_1) "१")
accfa26
  ((KP_2) "२")
accfa26
  ((KP_3) "३")
accfa26
  ((KP_4) "४")
accfa26
  ((KP_5) "५")
accfa26
  ((KP_6) "६")
accfa26
  ((KP_7) "७")
accfa26
  ((KP_8) "८")
accfa26
  ((KP_9) "९")
accfa26
  ((KP_0) "०")
accfa26
  ((KP_Decimal) ".")
accfa26
  ((KP_Divide) "/")
accfa26
  ((KP_Multiply) "*")
accfa26
  ((KP_Add) "+")
accfa26
  ((KP_Subtract) "-") 
accfa26
 
accfa26
  ("!" ?ऍ)
accfa26
  ("+" ?ऋ)
accfa26
  ("Q" ?औ)
accfa26
  ("W" ?ऐ)
accfa26
  ("E" ?आ)
accfa26
  ("R" ?ई)
accfa26
  ("T" ?ऊ)
accfa26
  ("Y" ?भ)
accfa26
  ("y" ?ब)
accfa26
  ("U" ?ङ)
accfa26
  ("u" ?ह)
accfa26
  ("I" ?घ)
accfa26
  ("i" ?ग)
accfa26
  ("O" ?ध)
accfa26
  ("o" ?द)
accfa26
  ("P" ?झ)
accfa26
  ("p" ?ज)
accfa26
  ("{" ?ढ)
accfa26
  ("[" ?ड)
accfa26
  ("}" ?ञ)
accfa26
  ("A" ?ओ)
accfa26
  ("S" ?ए)
accfa26
  ("D" ?अ)
accfa26
  ("F" ?इ)
accfa26
  ("G" ?उ)
accfa26
  ("H" ?फ)
accfa26
  ("h" ?प)
accfa26
  ("J" ?ऱ)
accfa26
  ("j" ?र)
accfa26
  ("K" ?ख)
accfa26
  ("k" ?क)
accfa26
  ("L" ?थ)
accfa26
  ("l" ?त)
accfa26
  (":" ?छ)
accfa26
  (";" ?च)
accfa26
  ("\"" ?ठ)
accfa26
  ("'" ?ट)
accfa26
  ("|" ?ऑ)
accfa26
  ("~" ?ऒ)
accfa26
  ("Z" ?ऎ)
accfa26
  ("C" ?ण)
accfa26
  ("c" ?म)
accfa26
  ("V" ?ऩ)
accfa26
  ("v" ?न)
accfa26
  ("B" ?ऴ)
accfa26
  ("b" ?व)
accfa26
  ("N" ?ळ)
accfa26
  ("n" ?ल)
accfa26
  ("M" ?श)
accfa26
  ("m" ?स)
accfa26
  ("<" ?ष)
accfa26
  ("/" ?य))
accfa26
 (halant
accfa26
  ("d" ?्))
accfa26
 (vowel-I
accfa26
  ("f" ?ि))
accfa26
 (else
accfa26
  ("1" ?१)
accfa26
  ("@" ?ॅ)
accfa26
  ("2" ?२)
accfa26
  ("#" ?#)
accfa26
  ("3" ?३)
accfa26
  ("$" ?$)
accfa26
  ("4" ?४)
accfa26
  ("5" ?५)
accfa26
  ("6" ?६)
accfa26
  ("7" ?७)
accfa26
  ("8" ?८)
accfa26
  ("(" ?\()
accfa26
  ("9" ?९)
accfa26
  (")" ?\))
accfa26
  ("0" ?०)
accfa26
  ("_" ?ः)
accfa26
  ("-" ?-)
accfa26
  ("=" ?ृ)
accfa26
  ("q" ?ौ)
accfa26
  ("w" ?ै)
accfa26
  ("e" ?ा)
accfa26
  ("r" ?ी)
accfa26
  ("t" ?ू)
accfa26
  ("]" ?़)
accfa26
  ("a" ?ो)
accfa26
  ("s" ?े)
accfa26
  ("g" ?ु)
accfa26
  ("\\" ?ॉ)
accfa26
  ("`" ?ॊ)
accfa26
  ("z" ?ॆ)
accfa26
  ("X" ?ँ)
accfa26
  ("x" ?ं)
accfa26
  ("," ?,)
accfa26
  (">" ?।)
accfa26
  ("." ?.)
accfa26
  ("?" ?य़)))
accfa26
accfa26
(state
accfa26
 (init
accfa26
  (consonant)
accfa26
  (halant)
accfa26
  (else)
accfa26
  (vowel-I (shift after-vowel-I)))
accfa26
accfa26
 (after-vowel-I
accfa26
  (consonant
accfa26
   ;; The current preedit is "IC".  Reorder it to "CI".
accfa26
   (move @<) (delete @+) (move @>) (insert "ि")
accfa26
   ;; Keep on reading the following [HC]* sequence.
accfa26
   (shift after-consonant))
accfa26
  (vowel-I
accfa26
   ;; Delete the lastly inserted I and rehandle it in `init' state.
accfa26
   (delete @-) (pushback 1) (shift init))
accfa26
  (nil (shift init)))
accfa26
accfa26
 (after-consonant
accfa26
  (halant
accfa26
   ;; The current preedit is "C[HC]*IH".  Reorder it to "C[HC]*HI".
accfa26
   (move @-) (delete @-) (move @>) (insert "ि")
accfa26
   ;; Keep on reading the following C[HC]* sequence.
accfa26
   (shift after-consonant-halant)))
accfa26
accfa26
 (after-consonant-halant
accfa26
  (consonant
accfa26
   ;; The current preedit is "C[HC]*HIC".  Reorder it to "C[HC]+I".
accfa26
   (move @-) (delete @-) (move @>) (insert "ि")
accfa26
   ;; Keep on reading the following [HC]* sequence.
accfa26
   (shift after-consonant))))