From: handa Date: Fri, 22 Jan 2010 13:11:03 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: before-ns~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5b2750dcce4092129ccabfdedd3b1a0ebc45e8a0;p=m17n%2Fm17n-lib-js.git *** empty log message *** --- diff --git a/Makefile b/Makefile index 67f3625..40d4336 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ -DIST=/project/web/extra/m17n-lib/mim-js/ +DIST1=/var/www/mim +DIST2=/project/web/extra/m17n-lib/mim-js/ FILES=index.html latn-post.js mim.js th-kesmanee.js upload: for f in ${FILES}; do \ - if [ $$f -nt ${DIST}/$$f ] ; then \ + if [ ! -f ${DIST1}/$$f -o $$f -nt ${DIST1}/$$f ] ; then \ echo $$f; \ - cp $$f ${DIST}; \ + cp $$f ${DIST1}; \ + cp $$f ${DIST2}; \ fi; \ done cd /project/web/source/m17n-lib; make diff --git a/mim.js b/mim.js index 8c7b461..d206d76 100644 --- a/mim.js +++ b/mim.js @@ -174,7 +174,7 @@ MIM_key[0xF0] = "capslock"; function MIM_decode_key (event) { - var key = (event.keyCode ? event.keyCode + var key = ((event.type == 'keydown' || event.keyCode) ? event.keyCode : event.charCode ? event.charCode : false); if (! key) @@ -197,7 +197,7 @@ function debug_print (event, ic) { var target = event.target; var code = event.keyCode; - var char = event.charCode; + var char = event.type == 'keydown' ? "?" : event.charCode; var key = MIM_decode_key (event); document.getElementById (event.type).innerHTML = "" + code + "/" + char + " : " + key; @@ -374,7 +374,7 @@ function MIM_keydown (event) event.target.mim_ic = ic; } MIM_add_event_listener (event.target, 'blur', MIM_reset_ic); - //debug_print (event, ic); + debug_print (event, ic); if (ic.im.status < 0) return; ic.check_caret (); @@ -389,7 +389,7 @@ function MIM_keypress (event) var ic = event.target.mim_ic; var i; - //debug_print (event, ic); + debug_print (event, ic); if (ic.im.status < 0) return; if (! ic.key)