mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 23:14:53 +00:00
[HIDPARSE]
- Use report value when report item bitcount > 1 [KBDHID] - Print raw report - KBDHID starts to receive normal keys and modifier keys svn path=/branches/usb-bringup-trunk/; revision=55364
This commit is contained in:
parent
2cc2771f69
commit
205e63a314
|
@ -94,6 +94,15 @@ KbdHid_ReadCompletion(
|
||||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// print out raw report
|
||||||
|
//
|
||||||
|
ASSERT(DeviceExtension->ReportLength >= 9);
|
||||||
|
DPRINT1("[KBDHID] ReadCompletion %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", DeviceExtension->Report[0], DeviceExtension->Report[1], DeviceExtension->Report[2],
|
||||||
|
DeviceExtension->Report[3], DeviceExtension->Report[4], DeviceExtension->Report[5],
|
||||||
|
DeviceExtension->Report[6], DeviceExtension->Report[7], DeviceExtension->Report[8]);
|
||||||
|
|
||||||
|
|
||||||
/* get current usages */
|
/* get current usages */
|
||||||
ButtonLength = DeviceExtension->UsageListLength;
|
ButtonLength = DeviceExtension->UsageListLength;
|
||||||
Status = HidP_GetUsagesEx(HidP_Input, HIDP_LINK_COLLECTION_UNSPECIFIED, DeviceExtension->CurrentUsageList, &ButtonLength, DeviceExtension->PreparsedData, DeviceExtension->Report, DeviceExtension->ReportLength);
|
Status = HidP_GetUsagesEx(HidP_Input, HIDP_LINK_COLLECTION_UNSPECIFIED, DeviceExtension->CurrentUsageList, &ButtonLength, DeviceExtension->PreparsedData, DeviceExtension->Report, DeviceExtension->ReportLength);
|
||||||
|
|
|
@ -455,7 +455,20 @@ HidParser_GetUsagesWithReport(
|
||||||
//
|
//
|
||||||
// store usage and page
|
// store usage and page
|
||||||
//
|
//
|
||||||
UsageAndPage[ItemCount].Usage = (ReportItem->UsageMinimum & 0xFFFF);
|
if (ReportItem->BitCount == 1)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// use usage minimum
|
||||||
|
//
|
||||||
|
UsageAndPage[ItemCount].Usage =(ReportItem->UsageMinimum & 0xFFFF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// use value from control
|
||||||
|
//
|
||||||
|
UsageAndPage[ItemCount].Usage = (USHORT)Data;
|
||||||
|
}
|
||||||
UsageAndPage[ItemCount].UsagePage = CurrentUsagePage;
|
UsageAndPage[ItemCount].UsagePage = CurrentUsagePage;
|
||||||
}
|
}
|
||||||
ItemCount++;
|
ItemCount++;
|
||||||
|
@ -691,13 +704,14 @@ HidParser_TranslateUsage(
|
||||||
//
|
//
|
||||||
// invalid lookup or no scan code available
|
// invalid lookup or no scan code available
|
||||||
//
|
//
|
||||||
|
DPRINT1("No Scan code for Usage %x\n", Usage);
|
||||||
return HIDPARSER_STATUS_I8042_TRANS_UNKNOWN;
|
return HIDPARSER_STATUS_I8042_TRANS_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// FIXME: translate modifier states
|
// FIXME: translate modifier states
|
||||||
//
|
//
|
||||||
|
DPRINT1("Usage %x ScanCode %x\n", Usage, ScanCode);
|
||||||
HidParser_DispatchKey((PCHAR)&ScanCode, KeyAction, InsertCodesProcedure, InsertCodesContext);
|
HidParser_DispatchKey((PCHAR)&ScanCode, KeyAction, InsertCodesProcedure, InsertCodesContext);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -683,9 +683,8 @@ HidParser_TranslateUsageAndPagesToI8042ScanCodes(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// invalid page
|
// invalid page / end of usage list page
|
||||||
//
|
//
|
||||||
DPRINT1("[HIDPARSE] Error unexpected usage page %x\n", ChangedUsageList[Index].UsagePage);
|
|
||||||
return HIDP_STATUS_I8042_TRANS_UNKNOWN;
|
return HIDP_STATUS_I8042_TRANS_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue