New Wooting PIDs

This commit is contained in:
Shayne Hartford 2022-09-15 01:48:07 +00:00 committed by Adam Honse
parent 15757d2736
commit 7836a637b9

View file

@ -15,11 +15,25 @@
/*-----------------------------------------------------*\
| Keyboard product IDs |
| Gamepad Mode: X = Xbox | C = Classic | N = None |
\*-----------------------------------------------------*/
#define WOOTING_ONE_PID 0xFF01
#define WOOTING_TWO_PID 0xFF02
#define WOOTING_TWO_LE_PID 0x1210
#define WOOTING_TWO_HE_PID 0x1220
#define WOOTING_ONE_OLD_PID 0xFF01
#define WOOTING_TWO_OLD_PID 0xFF02
#define WOOTING_ONE_X_PID 0x1100
#define WOOTING_ONE_C_PID 0x1101
#define WOOTING_ONE_N_PID 0x1102
#define WOOTING_TWO_X_PID 0x1200
#define WOOTING_TWO_C_PID 0x1201
#define WOOTING_TWO_N_PID 0x1202
#define WOOTING_TWO_LE_X_PID 0x1210
#define WOOTING_TWO_LE_C_PID 0x1211
#define WOOTING_TWO_LE_N_PID 0x1212
#define WOOTING_TWO_HE_X_PID 0x1220
#define WOOTING_TWO_HE_C_PID 0x1221
#define WOOTING_TWO_HE_N_PID 0x1222
#define WOOTING_TWO_60_X_PID 0x1300
#define WOOTING_TWO_60_C_PID 0x1301
#define WOOTING_TWO_60_N_PID 0x1302
void DetectWootingOneKeyboardControllers(hid_device_info* info, const std::string& name)
{
@ -27,10 +41,11 @@ void DetectWootingOneKeyboardControllers(hid_device_info* info, const std::strin
LOG_DEBUG("[%s] Interface %i\tPage %04X\tUsage %i\tPath %s", controller_name, info->interface_number, info->usage_page, info->usage, info->path);
hid_device* dev = hid_open_path(info->path);
if(dev)
{
uint8_t wooting_type = (info->product_id == WOOTING_ONE_PID) ? WOOTING_KB_TKL : WOOTING_KB_FULL;
// TODO: 60% Keymap for Wooting Two 60HE
uint8_t wooting_type = (info->product_id == WOOTING_ONE_OLD_PID) ? WOOTING_KB_TKL : WOOTING_KB_FULL;
LOG_DEBUG("[%s] Device type %i opened - creating Controller", controller_name, wooting_type);
WootingOneKeyboardController* controller = new WootingOneKeyboardController(dev, info->path, wooting_type);
@ -65,7 +80,20 @@ void DetectWootingTwoKeyboardControllers(hid_device_info* info, const std::strin
}
}
REGISTER_HID_DETECTOR_PU("Wooting ONE Keyboard", DetectWootingOneKeyboardControllers, WOOTING_OLD_VID, WOOTING_ONE_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting TWO Keyboard", DetectWootingOneKeyboardControllers, WOOTING_OLD_VID, WOOTING_TWO_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting TWO Keyboard LE", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_LE_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting TWO Keyboard HE", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_HE_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting One (Legacy)", DetectWootingOneKeyboardControllers, WOOTING_OLD_VID, WOOTING_ONE_OLD_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two (Legacy)", DetectWootingOneKeyboardControllers, WOOTING_OLD_VID, WOOTING_TWO_OLD_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting One (Xbox)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_ONE_X_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting One (Classic)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_ONE_C_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting One (None)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_ONE_N_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two (Xbox)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_X_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two (Classic)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_C_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two (None)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_N_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two LE (Xbox)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_LE_X_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two LE (Classic)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_LE_C_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two LE (None)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_LE_N_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two HE (Xbox)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_HE_X_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two HE (Classic)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_HE_C_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two HE (None)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_HE_N_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two 60HE (Xbox)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_60_X_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two 60HE (Classic)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_60_C_PID, 0x1337, 1);
REGISTER_HID_DETECTOR_PU("Wooting Two 60HE (None)", DetectWootingTwoKeyboardControllers, WOOTING_NEW_VID, WOOTING_TWO_60_N_PID, 0x1337, 1);