don't disable shift flag if any other modifiers are pressed and the key isPrintable (is a character); r=akkana, ftang; bug #46004

This commit is contained in:
brade%netscape.com 2000-07-25 14:12:39 +00:00
Родитель 998e270b97
Коммит 17f9fbf946
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -392,7 +392,13 @@ void InitKeyPressEvent(GdkEventKey *aGEK,
if (anEvent.charCode) {
anEvent.keyCode = 0;
anEvent.isShift = PR_FALSE;
// if the control, meta, or alt key is down, then we should leave
// the isShift flag alone (probably not a printable character)
// if none of the other modifier keys are pressed then we need to
// clear isShift so the character can be inserted in the editor
if (!anEvent.isControl && !anEvent.isAlt && !anEvent.isMeta)
anEvent.isShift = PR_FALSE;
} else
anEvent.keyCode = nsPlatformToDOMKeyCode(aGEK);