{
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
{