Support for wired and wireless BlackWidow V3 Mini

This commit is contained in:
Frederik Madsen
2021-12-29 18:35:54 +00:00
committed by Adam Honse
parent 341607ec3e
commit 5186161fdd
4 changed files with 163 additions and 0 deletions

View File

@@ -544,6 +544,8 @@ SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025a", TAG+="uacces
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025b", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Bluetooth"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025c", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Wireless"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0a24", TAG+="uaccess", TAG+="Blackwidow_V3_TKL"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0258", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wired"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0271", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wireless"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0216", TAG+="uaccess", TAG+="Blackwidow_X Chroma"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="021a", TAG+="uaccess", TAG+="Blackwidow_X_Chroma_TE"
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="020f", TAG+="uaccess"

View File

@@ -49,6 +49,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
{
case RAZER_BLACKWIDOW_ELITE_PID:
case RAZER_BLACKWIDOW_2019_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
case RAZER_CYNOSA_V2_PID:
case RAZER_ORNATA_CHROMA_V2_PID:
case RAZER_TARTARUS_CHROMA_PID:
@@ -77,6 +78,12 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
dev_transaction_id = 0x3F;
}
break;
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
{
dev_transaction_id = 0x9F;
break;
}
case RAZER_GOLIATHUS_CHROMA_PID:
case RAZER_GOLIATHUS_CHROMA_EXTENDED_PID:
@@ -125,6 +132,8 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
case RAZER_BLACKWIDOW_V3_TKL_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
case RAZER_CYNOSA_CHROMA_PID:
case RAZER_CYNOSA_LITE_PID:
case RAZER_CYNOSA_V2_PID:
@@ -205,6 +214,8 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
case RAZER_BLACKWIDOW_V3_TKL_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
case RAZER_CHARGING_PAD_CHROMA_PID:
case RAZER_CHROMA_HDK_PID:
case RAZER_CHROMA_PC_CASE_LIGHTING_KIT_PID:
@@ -448,6 +459,8 @@ bool RazerController::SupportsWave()
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
case RAZER_BLACKWIDOW_V3_TKL_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
case RAZER_BLACKWIDOW_X_CHROMA_PID:
case RAZER_BLACKWIDOW_X_CHROMA_TE_PID:
case RAZER_BLADE_2016_PID:

View File

@@ -221,6 +221,8 @@ REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Pro (Wired)", Det
// REGISTER_HID_DETECTOR_PU ("Razer Blackwidow V3 Pro (Bluetooth)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID, 0x01, 0x00);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Pro (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 TKL", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_TKL_PID, 0x00, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wired)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRED_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_PID, 0x02, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma Tournament Edition", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_TE_PID, 0x02, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Cynosa Chroma", DetectRazerControllers, RAZER_VID, RAZER_CYNOSA_CHROMA_PID, 0x02, 0x01, 0x02);

View File

@@ -22,6 +22,8 @@
#define RAZER_BLACKWIDOW_LITE_PID 0x0235
#define RAZER_BLACKWIDOW_OVERWATCH_PID 0x0211
#define RAZER_BLACKWIDOW_V3_PID 0x024E
#define RAZER_BLACKWIDOW_V3_MINI_WIRED_PID 0x0258
#define RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID 0x0271
#define RAZER_BLACKWIDOW_V3_PRO_WIRED_PID 0x025A
#define RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID 0x025B
#define RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID 0x025C
@@ -525,6 +527,86 @@ static const razer_key blackwidow_v3_tkl_keymap[] =
{ 0, 5, 17, "Key: Right Arrow" },
};
#define BLACKWIDOW_V3_MINI_KEYMAP_SIZE (sizeof(blackwidow_v3_mini_keymap) / sizeof(blackwidow_v3_mini_keymap[0]))
static const razer_key blackwidow_v3_mini_keymap[] =
{
/*---------------------------------------------------------------------*\
| Zone, Row, Column, Key |
\*---------------------------------------------------------------------*/
{ 0, 0, 0, "Key: Escape" },
{ 0, 0, 1, "Key: 1" },
{ 0, 0, 2, "Key: 2" },
{ 0, 0, 3, "Key: 3" },
{ 0, 0, 4, "Key: 4" },
{ 0, 0, 5, "Key: 5" },
{ 0, 0, 6, "Key: 6" },
{ 0, 0, 7, "Key: 7" },
{ 0, 0, 8, "Key: 8" },
{ 0, 0, 9, "Key: 9" },
{ 0, 0, 10, "Key: 0" },
{ 0, 0, 11, "Key: -" },
{ 0, 0, 12, "Key: =" },
{ 0, 0, 14, "Key: Backspace" },
{ 0, 0, 15, "Key: Delete" },
{ 0, 1, 0, "Key: Tab" },
{ 0, 1, 1, "Key: Q" },
{ 0, 1, 2, "Key: W" },
{ 0, 1, 3, "Key: E" },
{ 0, 1, 4, "Key: R" },
{ 0, 1, 5, "Key: T" },
{ 0, 1, 6, "Key: Y" },
{ 0, 1, 7, "Key: U" },
{ 0, 1, 8, "Key: I" },
{ 0, 1, 9, "Key: O" },
{ 0, 1, 10, "Key: P" },
{ 0, 1, 11, "Key: [" },
{ 0, 1, 12, "Key: ]" },
{ 0, 1, 13, "Key: \\ (ANSI)" },
{ 0, 1, 15, "Key: Page Up" },
{ 0, 2, 0, "Key: Caps Lock" },
{ 0, 2, 1, "Key: A" },
{ 0, 2, 2, "Key: S" },
{ 0, 2, 3, "Key: D" },
{ 0, 2, 4, "Key: F" },
{ 0, 2, 5, "Key: G" },
{ 0, 2, 6, "Key: H" },
{ 0, 2, 7, "Key: J" },
{ 0, 2, 8, "Key: K" },
{ 0, 2, 9, "Key: L" },
{ 0, 2, 10, "Key: ;" },
{ 0, 2, 11, "Key: '" },
{ 0, 2, 12, "Key: #" },
{ 0, 2, 13, "Key: Enter" },
{ 0, 2, 15, "Key: Page Down" },
{ 0, 3, 0, "Key: Left Shift" },
{ 0, 3, 1, "Key: \\ (ISO)" },
{ 0, 3, 2, "Key: Z" },
{ 0, 3, 3, "Key: X" },
{ 0, 3, 4, "Key: C" },
{ 0, 3, 5, "Key: V" },
{ 0, 3, 6, "Key: B" },
{ 0, 3, 7, "Key: N" },
{ 0, 3, 8, "Key: M" },
{ 0, 3, 9, "Key: ," },
{ 0, 3, 10, "Key: ." },
{ 0, 3, 11, "Key: /" },
{ 0, 3, 13, "Key: Right Shift" },
{ 0, 3, 14, "Key: Up Arrow" },
{ 0, 3, 15, "Key: Insert" },
{ 0, 4, 0, "Key: Left Control" },
{ 0, 4, 1, "Key: Left Windows" },
{ 0, 4, 2, "Key: Left Alt" },
{ 0, 4, 6, "Key: Space" },
{ 0, 4, 7, "Logo" },
{ 0, 4, 10, "Key: Right Alt" },
{ 0, 4, 11, "Key: Right Fn" },
{ 0, 4, 12, "Key: Right Control" },
{ 0, 4, 13, "Key: Left Arrow" },
{ 0, 4, 14, "Key: Down Arrow" },
{ 0, 4, 15, "Key: Right Arrow" },
};
#define BOOK_13_2020_KEYMAP_SIZE (sizeof(book_13_2020_keymap) / sizeof(book_13_2020_keymap[0]))
static const razer_key book_13_2020_keymap[] =
@@ -2630,6 +2712,68 @@ static const razer_device blackwidow_v3_tkl_device =
BLACKWIDOW_V3_TKL_KEYMAP_SIZE
};
/*-------------------------------------------------------------*\
| Razer Blackwidow V3 Mini (Wired) 1532:0258 |
| |
| Zone "Keyboard" |
| Matrix |
| 5 Rows, 16 Columns |
\*-------------------------------------------------------------*/
static const razer_zone blackwidow_v3_mini_zone =
{
"Keyboard",
ZONE_TYPE_MATRIX,
5,
16
};
static const razer_device blackwidow_v3_mini_wired_device =
{
"Razer BlackWidow V3 Mini (Wired)",
RAZER_BLACKWIDOW_V3_MINI_WIRED_PID,
DEVICE_TYPE_KEYBOARD,
true,
5,
16,
{
&blackwidow_v3_mini_zone,
NULL,
NULL,
NULL,
NULL,
NULL
},
blackwidow_v3_mini_keymap,
BLACKWIDOW_V3_MINI_KEYMAP_SIZE
};
/*-------------------------------------------------------------*\
| Razer Blackwidow V3 Mini (Wireless) 1532:0271 |
| |
| Zone "Keyboard" |
| Matrix |
| 5 Rows, 16 Columns |
\*-------------------------------------------------------------*/
static const razer_device blackwidow_v3_mini_wireless_device =
{
"Razer BlackWidow V3 Mini (Wireless)",
RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID,
DEVICE_TYPE_KEYBOARD,
true,
5,
16,
{
&blackwidow_v3_mini_zone,
NULL,
NULL,
NULL,
NULL,
NULL
},
blackwidow_v3_mini_keymap,
BLACKWIDOW_V3_MINI_KEYMAP_SIZE
};
/*-------------------------------------------------------------*\
| Razer Blackwidow X Chroma 1532:0216 |
| |
@@ -7267,6 +7411,8 @@ static const razer_device* device_list[] =
&blackwidow_v3_pro_wireless_device,
&blackwidow_v3_pro_bluetooth_device,
&blackwidow_v3_tkl_device,
&blackwidow_v3_mini_wired_device,
&blackwidow_v3_mini_wireless_device,
&blackwidow_x_chroma_device,
&blackwidow_x_chroma_te_device,
&cynosa_chroma_device,