From fd9ea9e966e7126ab78e16669a62452054e31540 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 6 Mar 2010 00:40:48 +0000 Subject: [PATCH] *** empty log message *** --- xex.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 { -- 1.7.10.4