<rule>
<keyseq>
<list>
- <string>A-=</string>
+ <symbol>A-=</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-\</string>
+ <symbol>A-\</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-[</string>
+ <symbol>A-[</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-]</string>
+ <symbol>A-]</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-!</string>
+ <symbol>A-!</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-@</string>
+ <symbol>A-@</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-#</string>
+ <symbol>A-#</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-$</string>
+ <symbol>A-$</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-%</string>
+ <symbol>A-%</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-^</string>
+ <symbol>A-^</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-&</string>
+ <symbol>A-&</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-*</string>
+ <symbol>A-*</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-(</string>
+ <symbol>A-(</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-)</string>
+ <symbol>A-)</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-+</string>
+ <symbol>A-+</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-|</string>
+ <symbol>A-|</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-{</string>
+ <symbol>A-{</symbol>
</list>
</keyseq>
<insert>
<rule>
<keyseq>
<list>
- <string>A-}</string>
+ <symbol>A-}</symbol>
</list>
</keyseq>
<insert>
<set vname="SELECT">
<integer>0</integer>
</set>
+ <set vname="NST">
+ <eq>
+ <surrounding-text-flag/>
+ <integer>-2</integer>
+ </eq>
+ </set>
</state-hook>
<branch mname="map-consonant">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-consonant-ext">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-vowel">
<mark>
<branch mname="map-misc"/>
<branch mname="map-smart-quotes"/>
</state>
+ <state sname="state-after-c">
+ <branch mname="map-vowel">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ <branch mname="map-vowel-ext">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ </state>
<state sname="state-after-v">
<branch mname="map-consonant">
<shift>
<set vname="SELECT">
<integer>0</integer>
</set>
+ <set vname="NST">
+ <eq>
+ <surrounding-text-flag/>
+ <integer>-2</integer>
+ </eq>
+ </set>
</state-hook>
<branch mname="map-consonant">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-consonant-ext">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-consonant-or-tone-mark">
<cond>
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</list>
</cond>
</branch>
</branch>
<branch mname="map-smart-quotes"/>
</state>
+ <state sname="state-after-c">
+ <branch mname="map-vowel">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ <branch mname="map-vowel-ext">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ </state>
<state sname="state-after-v">
<branch mname="map-ending-1st-consonant">
<funcall fname="macro-handle-mark"/>
<set vname="SELECT">
<integer>0</integer>
</set>
+ <set vname="NST">
+ <eq>
+ <surrounding-text-flag/>
+ <integer>-2</integer>
+ </eq>
+ </set>
</state-hook>
<branch mname="map-consonant">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-consonant-ext">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-vowel">
<mark>
</shift>
</branch>
</state>
+ <state sname="state-after-c">
+ <branch mname="map-vowel">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ <branch mname="map-vowel-ext">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ </state>
<state sname="state-after-v">
<branch mname="map-consonant">
<shift>
<set vname="SELECT">
<integer>0</integer>
</set>
+ <set vname="NST">
+ <eq>
+ <surrounding-text-flag/>
+ <integer>-2</integer>
+ </eq>
+ </set>
</state-hook>
<branch mname="map-consonant">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-consonant-ext">
<set vname="C">
<marker>@-1</marker>
</char-at>
</set>
+ <cond>
+ <list>
+ <varref vname="NST"/>
+ <shift>
+ <symbol>state-after-c</symbol>
+ </shift>
+ </list>
+ </cond>
</branch>
<branch mname="map-vowel">
<mark>
</branch>
<branch mname="map-smart-quotes"/>
</state>
+ <state sname="state-after-c">
+ <branch mname="map-vowel">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ <branch mname="map-vowel-ext">
+ <mark>
+ <marker>M</marker>
+ </mark>
+ <set vname="V-2">
+ <varref vname="V-1"/>
+ </set>
+ <set vname="V-1">
+ <char-at>
+ <marker>@-1</marker>
+ </char-at>
+ </set>
+ <shift>
+ <symbol>state-after-v</symbol>
+ </shift>
+ </branch>
+ </state>
<state sname="state-after-v">
<branch mname="map-consonant">
<shift>
}
};
-MIM.ignore_focus = false;
-
MIM.update = function (target, ic)
{
var text = target.value;
MIM.set_caret (target, ic);
};
+(function () {
+ function capitalize(prop){
+ return prop.replace(/-(.)/g, function(m, m1){ return m1.toUpperCase() })
+ }
+
+ function imitateElement(elmOriginal, elmClone){
+ var styleOriginal = getComputedStyle(elmOriginal,'');
+ var styleClone = getComputedStyle(elmClone,'');
+
+ elmClone.style.left = elmOriginal.offsetLeft + 'px';
+ elmClone.style.top = elmOriginal.offsetTop + 'px';
+
+ var copyProps = [
+ 'width', 'height',
+ 'padding-left', 'padding-right', 'padding-top', 'padding-bottom',
+ 'border-left-style', 'border-right-style','border-top-style','border-bottom-style',
+ 'border-left-width', 'border-right-width','border-top-width','border-bottom-width',
+ 'font-family', 'font-size', 'line-height', 'letter-spacing', 'word-spacing'];
+ for(var i in copyProps){
+ elmClone.style[capitalize(copyProps[i])] =
+ styleOriginal.getPropertyValue(copyProps[i]);
+ }
+
+ elmClone.style.width = elmOriginal.offsetWidth;
+ elmClone.style.height = elmOriginal.offsetHeight;
+ elmClone.style.visibility="hidden"; // ÄɲÃ
+ elmClone.style.position = "absolute"; //ÄɲÃ
+ //elmClone.style =elmOriginal.style;
+
+ elmClone.scrollLeft = elmOriginal.scrollLeft;
+ elmClone.scrollTop = elmOriginal.scrollTop;
+ }
+
+ var elm;
+
+ MIM.caret_pos = function (target)
+ {
+ if (! elm)
+ {
+ elm = document.createElement ('div');
+ document.getElementsByTagName ('body')[0].appendChild (elm);
+ }
+
+ imitateElement(target, elm);
+ var selectionEnd = target.selectionEnd;
+ var value = target.value;
+
+ var elmCursor = document.createElement('span');
+ elmCursor.innerHTML = '|';
+
+ //elm = document.createElement ('pre');
+ elm.innerHTML = '';
+ var elmChild = document.createTextNode(value.substr(0,selectionEnd));
+ elm.appendChild(elmChild);
+ elm.appendChild(elmCursor);
+
+ var x = target.offsetLeft + elmCursor.offsetLeft +2;
+ var y = target.offsetTop + elmCursor.offsetTop -2;
+
+ Xex.Log ("x:" + x + "px y:" + y + "px w:" + elm.offsetWidth);
+ }
+}) ();
+
MIM.focus_in = function (event)
{
var target = event.target;
return;
if (! (target.type == "text" || target.type == "textarea"))
return;
- document.akey = event;
+
+ MIM.caret_pos (target);
var ic = target.mim_ic;
if (! ic || ic.im != MIM.current)
} finally {
MIM.debug_print (event, ic);
}
+
return;
};
sk: { name: 'Slovak' },
sr: { name: 'Serbian' },
sv: { name: 'Swedish' },
- vi: { name: 'Vietnamese' },
yi: { name: 'Yiddish' } },
MiddleEast: {
ar: { name: 'Arabic' },
li.appendChild (sub);
menu.appendChild (li);
}
- document.mimmenu = menu;
lang_category = null;
}
menu.style.left = (event.clientX - 10) + "px";