Create layout entries for built-in non-redefined scancodes as well, based on the 110-key table (mostly things like the extended keys/SpeedRacer/MediaButtons, etc).

svn path=/trunk/; revision=43975
This commit is contained in:
Arch Blackmann 2009-11-05 19:24:24 +00:00
parent 8420a2199f
commit 43ea0e72e4

View file

@ -918,6 +918,43 @@ DoLAYOUT(IN PLAYOUT LayoutData,
}
}
/* Process the scan code table */
Entry = &LayoutData->Entry[ScanCodeCount];
for (i = 0; i < 110; i++)
{
/* Get the scan code */
CurrentCode = ScVk[i].ScanCode;
if (CurrentCode == 0xFFFF) break;
/* Check if this entry had been processed */
if (ScVk[i].Processed)
{
/* Skip it */
ScVk[i].Processed = FALSE;
}
else
{
/* Do we have too many? */
if (++ScanCodeCount >= 110)
{
/* Fail */
printf("ScanCode %02x - too many scancodes here to parse.\n", CurrentCode);
exit(1);
}
/* Build an entry for it */
Entry++;
Entry->ScanCode = CurrentCode;
Entry->VirtualKey = ScVk[i].VirtualKey;
Entry->OriginalVirtualKey = ScVk[i].VirtualKey;
Entry->Name = ScVk[i].Name;
Entry->Processed = TRUE;
Entry->LineCount = 0;
DPRINT1("AUTOMATIC ENTRY: [%x %x %s]\n",
Entry->VirtualKey, Entry->ScanCode, Entry->Name);
}
}
/* Skip what's left */
return KeyWord;
}