In looking through the key event code, in an attempt to improve some
of the edge cases in Cappuccino, I've stumbled upon what seems like a
bug to me. On line 228:
if (
goog.userAgent.IE &&
!opt_shiftKey &&
(opt_heldKeyCode == goog.events.KeyCodes.CTRL ||
opt_heldKeyCode == goog.events.KeyCodes.ALT)) {
return false;
}
The corresponding comment from the header above the method:
* Additionally, IE6 does not fire keydown or keypress events for
letters when
* the control or alt keys are held down and the shift key is not. IE7
does
* fire keydown in these cases, though, but not keypress.
From what I can see (and in my own reimplementation of this method),
this only works the first time ctrl/alt+somekey is pressed, because
it's relying on opt_heldKeyCode. Instead, it should simply be using
the flags available in the method: opt_ctrlKey and opt_altKey
It would then look like this:
if (
goog.userAgent.IE && !opt_shiftKey && (opt_ctrlKey ||
opt_altKey)) {
return false;
}
In my brief test in IE8, this correctly allowed me to repeat ctrl+key
events without having to first repress ctrl.