Index: MouseDevice.cpp
===================================================================
--- MouseDevice.cpp	(revision 37026)
+++ MouseDevice.cpp	(working copy)
@@ -40,15 +40,15 @@
 		if (!item->HasData())
 			continue;
 
-		if (item->UsagePage() == HID_USAGE_PAGE_BUTTON
+		if (item->UsagePage() == B_HID_USAGE_PAGE_BUTTON
 			&& item->UsageID() - 1 < B_MAX_MOUSE_BUTTONS)
 			fButtons[buttonCount++] = item;
 	}
 
 	fButtons[buttonCount] = NULL;
 
-	fWheel = report->FindItem(HID_USAGE_PAGE_GENERIC_DESKTOP,
-		HID_USAGE_ID_WHEEL);
+	fWheel = report->FindItem(B_HID_USAGE_PAGE_GENERIC_DESKTOP,
+		B_HID_UID_GD_WHEEL);
 
 	TRACE("mouse device with %lu buttons and %swheel\n", buttonCount,
 		fWheel == NULL ? "no " : "");
@@ -60,13 +60,13 @@
 MouseDevice::AddHandler(HIDDevice *device, HIDReport *report)
 {
 	// try to find at least an x and y axis
-	HIDReportItem *xAxis = report->FindItem(HID_USAGE_PAGE_GENERIC_DESKTOP,
-		HID_USAGE_ID_X);
+	HIDReportItem *xAxis = report->FindItem(B_HID_USAGE_PAGE_GENERIC_DESKTOP,
+		B_HID_UID_GD_X);
 	if (xAxis == NULL)
 		return NULL;
 
-	HIDReportItem *yAxis = report->FindItem(HID_USAGE_PAGE_GENERIC_DESKTOP,
-		HID_USAGE_ID_Y);
+	HIDReportItem *yAxis = report->FindItem(B_HID_USAGE_PAGE_GENERIC_DESKTOP,
+		B_HID_UID_GD_Y);
 	if (yAxis == NULL)
 		return NULL;
 
Index: KeyboardDevice.cpp
===================================================================
--- KeyboardDevice.cpp	(revision 37026)
+++ KeyboardDevice.cpp	(working copy)
@@ -73,9 +73,9 @@
 		if (!item->HasData())
 			continue;
 
-		if (item->UsagePage() == HID_USAGE_PAGE_KEYBOARD
-			|| item->UsagePage() == HID_USAGE_PAGE_CONSUMER
-			|| item->UsagePage() == HID_USAGE_PAGE_BUTTON) {
+		if (item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD
+			|| item->UsagePage() == B_HID_USAGE_PAGE_CONSUMER
+			|| item->UsagePage() == B_HID_USAGE_PAGE_BUTTON) {
 			TRACE("keyboard item with usage %lx\n", item->UsageMinimum());
 
 			if (item->Array()) {
@@ -83,9 +83,9 @@
 				if (fKeyCount < MAX_KEYS)
 					fKeys[fKeyCount++] = item;
 			} else {
-				if (item->UsagePage() == HID_USAGE_PAGE_KEYBOARD
-					&& item->UsageID() >= HID_USAGE_ID_LEFT_CONTROL
-					&& item->UsageID() <= HID_USAGE_ID_RIGHT_GUI) {
+				if (item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD
+					&& item->UsageID() >= B_HID_UID_KB_LEFT_CONTROL
+					&& item->UsageID() <= B_HID_UID_KB_RIGHT_GUI) {
 					// modifiers are generally implemented as bitmaps
 					if (fModifierCount < MAX_MODIFIERS)
 						fModifiers[fModifierCount++] = item;
@@ -118,15 +118,15 @@
 
 			// the led item array is identity mapped with what we get from
 			// the input_server for the set-leds command
-			if (item->UsagePage() == HID_USAGE_PAGE_LED) {
+			if (item->UsagePage() == B_HID_USAGE_PAGE_LED) {
 				switch (item->UsageID()) {
-					case HID_USAGE_ID_LED_NUM_LOCK:
+					case B_HID_UID_LED_NUM_LOCK:
 						fLEDs[0] = item;
 						break;
-					case HID_USAGE_ID_LED_CAPS_LOCK:
+					case B_HID_UID_LED_CAPS_LOCK:
 						fLEDs[1] = item;
 						break;
-					case HID_USAGE_ID_LED_SCROLL_LOCK:
+					case B_HID_UID_LED_SCROLL_LOCK:
 						fLEDs[2] = item;
 						break;
 				}
@@ -165,12 +165,12 @@
 		if (!item->HasData())
 			continue;
 
-		if (item->UsagePage() == HID_USAGE_PAGE_KEYBOARD
-			|| (item->UsagePage() == HID_USAGE_PAGE_CONSUMER && item->Array())
-			|| (item->UsagePage() == HID_USAGE_PAGE_BUTTON && item->Array())) {
+		if (item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD
+			|| (item->UsagePage() == B_HID_USAGE_PAGE_CONSUMER && item->Array())
+			|| (item->UsagePage() == B_HID_USAGE_PAGE_BUTTON && item->Array())) {
 			// found at least one item with a keyboard usage or with
 			// a consumer/button usage that is handled like a key
-			mayHaveOutput = item->UsagePage() == HID_USAGE_PAGE_KEYBOARD;
+			mayHaveOutput = item->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD;
 			foundKeyboardUsage = true;
 			break;
 		}
@@ -190,7 +190,7 @@
 
 			for (uint32 j = 0; j < output->CountItems(); j++) {
 				HIDReportItem *item = output->ItemAt(j);
-				if (item->UsagePage() == HID_USAGE_PAGE_LED) {
+				if (item->UsagePage() == B_HID_USAGE_PAGE_LED) {
 					foundOutputReport = true;
 					break;
 				}
@@ -405,7 +405,7 @@
 
 		if (modifier->Extract() == B_OK && modifier->Valid()) {
 			modifiers |= (modifier->Data() & 1)
-				<< (modifier->UsageID() - HID_USAGE_ID_LEFT_CONTROL);
+				<< (modifier->UsageID() - B_HID_UID_KB_LEFT_CONTROL);
 		}
 	}
 
@@ -591,7 +591,7 @@
 	bool phantomState = true;
 	for (size_t i = 0; i < fKeyCount; i++) {
 		if (fCurrentKeys[i] != 1
-			|| fKeys[i]->UsagePage() != HID_USAGE_PAGE_KEYBOARD) {
+			|| fKeys[i]->UsagePage() != B_HID_USAGE_PAGE_KEYBOARD) {
 			phantomState = false;
 			break;
 		}
@@ -613,7 +613,7 @@
 	for (int32 twice = 0; twice < 2; twice++) {
 		for (size_t i = 0; i < fKeyCount; i++) {
 			if (current[i] == 0 || (current[i] == 1
-				&& fKeys[i]->UsagePage() == HID_USAGE_PAGE_KEYBOARD))
+				&& fKeys[i]->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD))
 				continue;
 
 			bool found = false;
@@ -629,7 +629,7 @@
 
 			// a change occured
 			uint32 key = 0;
-			if (fKeys[i]->UsagePage() == HID_USAGE_PAGE_KEYBOARD) {
+			if (fKeys[i]->UsagePage() == B_HID_USAGE_PAGE_KEYBOARD) {
 				if (current[i] < kKeyTableSize)
 					key = kKeyTable[current[i]];
 
Index: HIDDevice.cpp
===================================================================
--- HIDDevice.cpp	(revision 37026)
+++ HIDDevice.cpp	(working copy)
@@ -49,7 +49,7 @@
 	status_t result = gUSBModule->send_request(device,
 		USB_REQTYPE_INTERFACE_IN | USB_REQTYPE_STANDARD,
 		USB_REQUEST_GET_DESCRIPTOR,
-		USB_HID_DESCRIPTOR_HID << 8, interfaceIndex, descriptorLength,
+		B_USB_HID_DESCRIPTOR_HID << 8, interfaceIndex, descriptorLength,
 		hidDescriptor, &descriptorLength);
 
 	TRACE("get hid descriptor: result: 0x%08lx; length: %lu\n", result,
@@ -70,7 +70,7 @@
 	result = gUSBModule->send_request(device,
 		USB_REQTYPE_INTERFACE_IN | USB_REQTYPE_STANDARD,
 		USB_REQUEST_GET_DESCRIPTOR,
-		USB_HID_DESCRIPTOR_REPORT << 8, interfaceIndex, descriptorLength,
+		B_USB_HID_DESCRIPTOR_REPORT << 8, interfaceIndex, descriptorLength,
 		reportDescriptor, &descriptorLength);
 
 	TRACE("get report descriptor: result: 0x%08lx; length: %lu\n", result,
@@ -215,7 +215,7 @@
 	size_t actualLength;
 	return gUSBModule->send_request(fDevice,
 		USB_REQTYPE_INTERFACE_OUT | USB_REQTYPE_CLASS,
-		USB_REQUEST_HID_SET_REPORT, 0x200 | report->ID(), fInterfaceIndex,
+		B_USB_REQUEST_HID_SET_REPORT, 0x200 | report->ID(), fInterfaceIndex,
 		report->ReportSize(), report->CurrentReport(), &actualLength);
 }
 
