From: handa Date: Sat, 6 Mar 2010 00:40:48 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ALPHA~28 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fd9ea9e966e7126ab78e16669a62452054e31540;p=m17n%2Fm17n-lib-js.git *** empty log message *** --- diff --git a/xex.js b/xex.js index 6e4a6f5..c9199a0 100644 --- a/xex.js +++ b/xex.js @@ -2848,20 +2848,23 @@ MIM.im_domain.DefType (MIM.State.prototype); { if (modifiers[key]) return false; + var mod = ''; + if (event.ctrlKey) mod += 'C-'; + if (event.metaKey) mod += 'M-'; + if (event.altKey) mod += 'A-'; var keysym = keyids[key]; if (keysym) key = keysym; else if (key.match(/^U\+([0-9A-Z]+)$/)) - key = String.fromCharCode (parseInt (RegExp.$1, 16)); + { + if (mod.length == 0) + return; + key = String.fromCharCode (parseInt (RegExp.$1, 16)); + } else key = key.toLowerCase (); - if (event.shiftKey) key = "S-" + key ; - if (event.altKey) key = "A-" + key ; - if (event.metaKey) key = "M-" + key ; - if (event.ctrlKey) key = "C-" + key ; - if (key.length == 1) - return false; - return new MIM.Key (key); + if (event.shiftKey) mod += 'S-'; + return new MIM.Key (mod + key); } else {