Accept directly encoded Unicode characters sent instead of keysyms by some keymaps (e.g. Arabic). Bug 188538, r=jag, sr=blizzard.

This commit is contained in:
smontagu%netscape.com 2003-02-27 00:19:42 +00:00
parent f606cc4f63
commit c1af0dc63d

View File

@ -283,7 +283,8 @@ int nsPlatformToDOMKeyCode(GdkEventKey *aGEK)
PRUint32 nsConvertCharCodeToUnicode(GdkEventKey* aGEK)
{
// Anything above 0xf000 is considered a non-printable
if (aGEK->keyval > 0xf000) {
// Exception: directly encoded UCS characters
if (aGEK->keyval > 0xf000 && (aGEK->keyval & 0xff000000) != 0x01000000) {
// Keypad keys are an exception: they return a value different
// from their non-keypad equivalents, but mozilla doesn't distinguish.
switch (aGEK->keyval)