Fix for PDT+ bug #9333. r=saari

git-svn-id: svn://10.0.0.236/trunk@60430 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 2000-02-11 04:22:45 +00:00
parent 3e8e2b2833
commit 9f822a37cb

View File

@ -107,8 +107,18 @@ nsMenuBarListener::KeyDown(nsIDOMEvent* aKeyEvent)
PRUint32 theChar;
keyEvent->GetKeyCode(&theChar);
if (theChar == NS_VK_ALT) {
// The ALT key just went down. Track this.
mAltKeyDown = PR_TRUE;
// No other modifiers can be down.
// Especially CTRL. CTRL+ALT == AltGR, and
// we'll fuck up on non-US enhanced 102-key
// keyboards if we don't check this.
PRBool ctrl,shift,meta;
keyEvent->GetCtrlKey(&ctrl);
keyEvent->GetShiftKey(&shift);
keyEvent->GetMetaKey(&meta);
if (!(ctrl || shift || meta)) {
// The ALT key just went down by itself. Track this.
mAltKeyDown = PR_TRUE;
}
return NS_OK;
}