{
HID_PARSER Parser;
- //
- // sanity check
- //
- ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
-
//
// init parser
//
//
// translate usage pages
//
- return HidParser_TranslateUsageAndPagesToI8042ScanCodes(Parser, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
+ return HidParser_TranslateUsageAndPagesToI8042ScanCodes(&Parser, ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
}
#include <hidpi.h>
#define NDEBUG
#include <debug.h>
-#include "hidparser.h"
\ No newline at end of file
+#include "hidparser.h"
+#include <stdio.h>
\ No newline at end of file
{
PHID_PARSER_CONTEXT ParserContext;
ULONG Index;
- ULONG ReportCount = 0;
//
// get parser context
PHID_PARSER_CONTEXT ParserContext;
ULONG Index;
PHID_REPORT Report;
- ULONG ItemCount = 0;
USHORT CurrentUsagePage;
PHID_REPORT_ITEM ReportItem;
ULONG Data;
//
// is this a key break
//
- if (KeyAction == HidP_KeyboardBreak)
+ if (KeyAction == HidP_Keyboard_Break)
{
//
// add break
OUT PHIDP_DEVICE_DESC DeviceDescription)
{
HIDPARSER_STATUS ParserStatus;
- ULONG CollectionCount, ReportCount;
+ ULONG CollectionCount;
ULONG Index;
//
NTSTATUS
NTAPI
HidParser_TranslateUsageAndPagesToI8042ScanCodes(
+ IN PHID_PARSER Parser,
IN PUSAGE_AND_PAGE ChangedUsageList,
IN ULONG UsageListLength,
IN HIDP_KEYBOARD_DIRECTION KeyAction,
IN OUT PCHAR Report,
IN ULONG ReportLength);
+
+HIDPARSER_STATUS
+HidParser_TranslateUsage(
+ IN PHID_PARSER Parser,
+ IN USAGE Usage,
+ IN HIDP_KEYBOARD_DIRECTION KeyAction,
+ IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
+ IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
+ IN PVOID InsertCodesContext);
+
HIDAPI
NTSTATUS
NTAPI
#include <assert.h>
#include <pshpack1.h>
#include "hidparser.h"
+#include <ntddkbd.h>
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.