Request for Comments Single-Byte Input Method, so called, I presume, because the IM only produces single-byte encodings, English, and one other language, like Greek or Russian. The real SIM is specialized by the Greek Input Method(=GIM), the Cyrillic Input Method, the Thai Input Method etc.
The GIM beeps when an invalid sequence is entered, and the sequence is disgarded, a peculiar reason to design another IM, I think. Maybe the GIM can be used for more than Greek, by those typists who want to be stopped when they make a mistake. Not me, I'm in a hurry. My intuition tells me not to throw away keystrokes. Six of one, half-a-dozen of the other. I assume the unadorned SIM can handle all the Latin languages, like Spanish, French, German. I didn't see any Spanish IM, French IM, or German IM. I need an IM which acts like the SIM, but which produces Unicode characters (utf-8). I also want to be able to switch between more than two writing systems, and one of them is polytonic Greek. I haven't seen anything like this described in console KEYMAPS. (Why not just run X? I need multi-lingual access to a network server and we don't want to run X, for security reasons. Case closed.) The state table I am using is written as a Lisp list <attached>, one which can be easily translated by a recursive descent parser. The output of the parser is a sorted array of state-transition records, which will permit the scanner to binary search the state table. Building the state table separately will allow the scanner to start faster. It will also reduce the size/complexity of the scanner. (By the way, the Windows "keyboard driver" is an array, and it must be searched by the scanner to determine the next state (no direct lookups). Therefore, the "keyboard driver" could be distributed as a (pre-compiled) DLL, which would be "attached" by their "input method" at run time. Microsoft, publish your interface!) Each keymap in my source file is identified by a keysym. No problem, the keysym can be written symbolically. Pressing the keysym causes the keymap to change. This action outputs any unfinished characters, changes the keymap, then resets the state of the scanner (to Start i.e. 0). This design would "universalize" the SIM, allowing me to define all my keymaps in a single file. (You would only need to change IMs, if the nature of the writing system required another, different beast, like CJKV.) The 'Universal IM' wraps up all IMs installed on a system. Finally, the VC multiplexer reserves certain keys to switch between consoles. I wonder how that works. Regards, Elvis PS My state-table looks something like this: state, keysym, value, next ========================== 0, 30, 0x3b1, 960 0, 35, 0x3b7, 961 0, 47, 0x3c9, 962 0, 53, '/', 967 0, 267, ')', 969 0, 286, 0x391, 963 0, 291, 0x397, 964 0, 299, '|', 966 0, 303, 0x3a9, 965 0, 542, -1, 0 0, 798, -1, 0 0, 1054, -1, 0 0, 1310, -1, 0 960, 30, 0x1fb3, 0 961, 35, 0x1fc3, 0 962, 47, 0x1ff3, 0 963, 286, 0x1fdc, 0 964, 291, 0x1fcc, 0 965, 303, 0x1ffc, 0 966, 30, 0x1fb3, 0 966, 35, 0x1fc3, 0 966, 47, 0x1ff3, 0 966, 286, 0x1fbc, 0 966, 291, 0x1fcc, 0 966, 303, 0x1ffc, 0 967, 30, 0x , 0 967, 35, 0x , 0 967, 47, 0x1f7d, 0 967, 286, 0x , 0 967, 299, 0x , 0 967, 303, 0x1ffb, 0 967, 299, -1, 968 968, 30, 0x , 0 968, 35, 0x , 0 968, 47, 0x1ff3, 0 968, 286, 0x , 0 968, 542, 0x , 0 968, 798, 0x , 0 968, 1054, 0x , 0 968, 1310, 0x , 0 968, 1566, 0x , 0 968, 1822, 0x , 0 969, 30, '?', 0 969, 35, '?', 0 969, 43, -1, 973 969, 47, '?', 0 969, 53, -1, 971 969, 286, '?', 0 969, 291, '?', 0 969, 297, -1, 975 969, 299, -1, 970 969, 303, '?', 0 970, 30, '?', 0 970, 35, '?', 0 970, 47, '?', 0 971, 30, '?', 0 971, 35, '?', 0 971, 47, '?', 0 971, 299, -1, 972 972, 30, '?', 0 972, 35, '?', 0 972, 47, '?', 0 973, 30, '?', 0 973, 35, '?', 0 973, 47, '?', 0 973, 299, -1, 974 974, 30, '?', 0 974, 35, '?', 0 974, 47, '?', 0 975, 30, '?', 0 975, 35, '?', 0 975, 47, '?', 0 975, 299, -1, 976 976, 30, '?', 0 976, 35, '?', 0 976, 47, '?', 0 ========================== __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail
;;; The Rosetta Stone ;;; Console Keymaps ;;; SIM Simulator Polytonic Greek Keymap ;;; SIM Simulator State Table ;;; ;;; ordinary symbols representing arbitrary constants (setq Normal 0) (setq Shift 256) ;; Shift = 256 (setq Alt 512) (setq Ctrl 1024) ;;; ordinary symbols representing numeric keysyms (setq enter 28 ctrl 29 shift 42 alt 56) (setq F1 59 F2 60 F3 61 F4 62 F5 63 F6 64 F7 65 F8 66) ;; keysyms which represent keymaps (setq latin Alt+Shift+F1) (setq greek Alt+Shift+F2) (setq cyrillic Alt+Shift+F3) (setq modern_greek Alt+Shift+F4) (setq thai Alt+Shift+F5) ;; more keysyms (setq alpha 30) ;; alpha = 30 (setq Alpha Shift+alpha) ;; Alpha = 296 (setq eta 35) ;; eta = 35 (setq omega 47) (setq oxia 53) (setq varia 43) (setq perispomeni Shift+41) ;; perispomeni = 297 (setq ennea 10) (setq mhden 11) (setq dasia Shift+ennea) ;; dasia = 266 (setq psili Shift+mhden) ;; psili = 267 (setq ypogegrammeni Shift+varia) ;; ypogegrammeni = 299 ;;; ordinary symbols representing Unicode characters (setq small_alpha 0x3b1 capital_alpha 0x391) (setq small_alpha_ypogegrammeni 0x1fb3 capital_alpha_prosgegrammeni 0x1fbc) (setq small_eta 0x3b7 capital_eta 0x397) (setq small_eta_ypogegrammeni 0x1fc3 capital_eta_prosgegrammeni 0x1fcc) (setq small_omega 0x3c9 capital_omega 0x3a9) (setq small_omega_ypogegrammeni 0x1ff3 capital_omega_prosgegrammeni 0x1ffc) (setq small_omega_varia 0x1f7c capital_omega_varia 0x1ffa) (setq small_omega_varia_ypogegrammeni 0x1ff2) ;;; no cap (setq small_omega_oxia 0x1f7d capital_omega_oxia 0x1ffb) (setq small_omega_oxia_ypogegrammeni 0x1ff4) ;;; no cap (setq small_omega_perispomeni 0x1ff6) ;;; no cap (setq small_omega_perispomeni_ypogegrammeni 0x1ff7) ;; no cap (setq small_omega_psili 0x1f60 capital_omega_psili 0x1f68) (setq small_omega_psili_ypogegrammeni 0x1fa0 capital_omega_psili_prosgegrammeni 0x1fa8) (setq small_omega_psili_varia 0x1f62 capital_omega_psili_varia 0x1f6a) (setq small_omega_psili_varia_ypogegrammeni 0x1fa2 capital_omega_psili_varia_prosgegrammeni 0x1faa) (setq small_omega_psili_oxia 0x1f64 capital_omega_psili_oxia 0x1f6c) (setq small_omega_psili_oxia_ypogegrammeni 0x1fa4 capital_omega_psili_oxia_prosgegrammeni 0x1fac) (setq small_omega_psili_perispomeni 0x1f66 capital_omega_psili_perispomeni 0x1fae) (setq small_omega_psili_perispomeni_ypogegrammeni 0x1fa6 capital_omega_psili_perispomeni_prosgegrammeni 0x1fae) (latin ... ) (greek ;; keycode 30 = 0x3b1 0x391 ... (alpha small_alpha capital_alpha escape_alpha escape_Alpha ctrl_alpha ctrl_Alpha) ;; 0, 30, 0x3b1, 0 ;; 0, 286, 0x391, 0 ;; 0, 542, -1, 0 ;; 0, 798, -1, 0 ;; 0, 1054, -1, 0 ;; 0, 1310, -1, 0 ;; keycode 35 = 0x3b7 0x397 ... (eta small_eta capital_alpha escape_eta escape_Eta ctrl_eta ctrl_Eta) ;; 0, 35, 0x3b7, 0 ;; 0, 291, 0x397, 0 ;; keycode 47 = 0x3c9 0x3a9 ... (omega small_omega capital_omega escape_omega escape_Omega ctrl_omega ctrl_Omega) ;; 0, 47, 0x3c9, 0 ;; 0, 303, 0x3a9, 0 ;; compose 30 23 to 0x1fb3 ;; compose 35 23 to 0x1fc3 ;; omega as a dead key? Why not! ;; compose 47 23 to 0x1ff3 (alpha (iota small_alpha_ypogegrammeni)) (eta (iota small_eta_ypogegrammeni)) (omega (iota small_omega_ypogegrammeni)) ;; 0, 30, 0x03b1, 960 ;; 960, 30, 0x1fb3, 0 ᾳ ;; 0, 35, 0x03b7, 961 ;; 961, 35, 0x1fc3, 0 ῃ ;; 0, 47, 0x03c9, 962 ;; 962, 47, 0x1ff3, 0 ῳ ;; compose 286 23 to 0x1fbc ;; compose 291 23 to 0x1fcc ;; compose 303 23 to 0x1ffc (Shift+alpha(iota capital_alpha_prosgegrammeni)) (Shift+eta (iota capital_eta_prosgegrammeni)) (Shift+omega(iota capital_omega_prosgegrammeni)) ;; 963, 256+30, 0x1fdc, 0 ;; 964, 256+35, 0x1fcc, 0 ;; 965, 256+47, 0x1ffc, 0 ;; canonical, i.e. dead key sequence ;; compose 299 30 to 0x1fb3 ;; compose 299 286 to 0x1fbc ;; compose 299 35 to 0x1fc3 ;; compose 299 291 to 0x1fcc ;; compose 299 47 to 0x1ff3 ;; compose 299 303 to 0x1ffc (ypogegrammeni (alpha small_alpha_ypogegrammeni capital_alpha_prosgegrammeni) (eta small_eta_ypogegrammeni capital_eta_prosgegrammeni) (omega small_omega_ypogegrammeni capital_omega_prosgegrammeni)) ;; 0, 299, '|', 966 ;; 966, 30, 0x1fb3, 0 ;; 966, 256+30, 0x1fbc, 0 ;; 966, 35, 0x1fc3, 0 ;; 966, 256+35, 0x1fcc, 0 ;; 966, 47, 0x1ff3, 0 ;; 966, 256+47, 0x1ffc, 0 ;; compose 53 299 30 to -1 ;; compose 53 299 35 to -1 ;; compose 53 299 47 to 0x1ff3 ;; compose 53 30 to -1 ;; compose 53 286 to -1 ;; compose 53 35 to -1 ;; compose 53 291 to -1 ;; compose 53 47 to 0x1f7d ;; compose 53 303 to 0x1ffb (oxia (ypogegrammeni (alpha small_alpha_oxia_ypogegrammeni capital_alpha_oxia_prosgegrammeni alt_alpha_oxia_ypogegrammeni alt_shift_alpha_oxia_ypogegrammeni ctrl_alpha_oxia_ypogegrammeni ctrl_shift_alpha_oxia_ypogegrammeni ctrl_alt_alpha_oxia_ypogegrammeni ctrl_alt_shift_alpha_oxia_ypogegrammeni) (eta small_eta_oxia_ypogegrammeni) (omega small_omega_ypogegrammeni)) (alpha small_alpha_oxia capital_alpha_oxia) (eta small_eta_oxia capital_eta_oxia) (omega small_omega_oxia capital_omega_oxia))) ;; 0, 53, '/', 967 ;; 967, 299, -1, 968 ;; 968, 30, 0x , 0 ;; 968, 286, 0x , 0 ;; 968, 542, 0x , 0 ;; 968, 798, 0x , 0 ;; 968, 1054, 0x , 0 ;; 968, 1310, 0x , 0 ;; 968, 1566, 0x , 0 ;; 968, 1822, 0x , 0 ;; 968, 35, 0x , 0 ;; 968, 47, 0x1ff3, 0 ;; 967, 30, 0x , 0 ;; 967, 286, 0x , 0 ;; 967, 35, 0x , 0 ;; 967, 299, 0x , 0 ;; 967, 47, 0x1f7d, 0 ;; 967, 303, 0x1ffb, 0 (psili (alpha small_alpha_psili capital_alpha_psili) (eta small_eta_psili capital_eta_psili) (omega small_omega_psili capital_omega_psili) (ypogegrammeni (alpha small_alpha_psili_ypogegrammeni) (eta small_eta_psili_ypogegrammeni) (omega small_omega_psili_ypogegrammeni)) (oxia (alpha small_alpha_psili_oxia) (eta small_eta_psili_oxia) (omega small_omega_psili_oxia) (ypogegrammeni (alpha small_alpha_psili_oxia_ypogegrammeni) (eta small_eta_psili_oxia_ypogegrammeni) (omega small_omega_psili_oxia_ypogegrammeni))) (varia (alpha small_alpha_psili_varia) (eta small_eta_psili_varia) (omega small_omega_psili_varia) (ypogegrammeni (alpha small_alpha_psili_varia_ypogegrammeni) (eta small_eta_psili_varia_ypogegrammeni) (omega small_omega_psili_varia_ypogegrammeni))) (perispomeni (alpha small_alpha_psili_perispomeni) (eta small_eta_psili_perispomeni) (omega small_omega_psili_perispomeni) (ypogegrammeni (alpha small_alpha_psili_perispomeni_ypogegrammeni) (eta small_eta_psili_perispomeni_ypogegrammeni) (omega small_omega_psili_perispomeni_ypogegrammeni)))) ;; 0, 267, ')', 969 ;; 969, 30, 'ἀ', 0 ;; 969, 286, 'Ἀ', 0 ;; 969, 35, 'ἠ', 0 ;; 969, 291, 'Ἠ', 0 ;; 969, 47, 'ὠ', 0 ;; 969, 303, 'Ὠ', 0 ;; 969, 299, -1, 970 ;; 970, 30, 'ᾀ', 0 ;; 970, 35, 'ᾐ', 0 ;; 970, 47, 'ᾠ', 0 ;; 969, 53, -1, 971 ;; 971, 30, 'ἄ', 0 ;; 971, 35, 'ἤ', 0 ;; 971, 47, 'ὤ', 0 ;; 971, 299, -1, 972 ;; 972, 30, 'ᾄ', 0 ;; 972, 35, 'ᾔ', 0 ;; 972, 47, 'ᾤ', 0 ;; 969, 43, -1, 973 ;; 973, 30, 'ἂ', 0 ;; 973, 35, 'ἢ', 0 ;; 973, 47, 'ὢ', 0 ;; 973, 299, -1, 974 ;; 974, 30, 'ᾂ', 0 ;; 974, 35, 'ᾒ', 0 ;; 974, 47, 'ᾢ', 0 ;; 969, 297, -1, 975 ;; 975, 30, 'ἆ', 0 ;; 975, 35, 'ἦ', 0 ;; 975, 47, 'ὦ', 0 ;; 975, 299, -1, 976 ;; 976, 30, 'ᾆ', 0 ;; 976, 35, 'ᾖ', 0 ;; 976, 47, 'ᾦ', 0 ) ;; End of greek (cyrillic ... ) (modern_greek ...) (thai ...) ;; End of Keymap