Skip to content

Commit 5186161

Browse files
ZarickanCalcProgrammer1
authored andcommitted
Support for wired and wireless BlackWidow V3 Mini
1 parent 341607e commit 5186161

4 files changed

Lines changed: 163 additions & 0 deletions

File tree

60-openrgb.rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,8 @@ SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025a", TAG+="uacces
544544
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025b", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Bluetooth"
545545
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="025c", TAG+="uaccess", TAG+="Blackwidow_V3_Pro-Wireless"
546546
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0a24", TAG+="uaccess", TAG+="Blackwidow_V3_TKL"
547+
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0258", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wired"
548+
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0271", TAG+="uaccess", TAG+="Blackwidow_V3_Mini-Wireless"
547549
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0216", TAG+="uaccess", TAG+="Blackwidow_X Chroma"
548550
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="021a", TAG+="uaccess", TAG+="Blackwidow_X_Chroma_TE"
549551
SUBSYSTEMS=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="020f", TAG+="uaccess"

Controllers/RazerController/RazerController.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
4949
{
5050
case RAZER_BLACKWIDOW_ELITE_PID:
5151
case RAZER_BLACKWIDOW_2019_PID:
52+
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
5253
case RAZER_CYNOSA_V2_PID:
5354
case RAZER_ORNATA_CHROMA_V2_PID:
5455
case RAZER_TARTARUS_CHROMA_PID:
@@ -77,6 +78,12 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
7778
dev_transaction_id = 0x3F;
7879
}
7980
break;
81+
82+
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
83+
{
84+
dev_transaction_id = 0x9F;
85+
break;
86+
}
8087

8188
case RAZER_GOLIATHUS_CHROMA_PID:
8289
case RAZER_GOLIATHUS_CHROMA_EXTENDED_PID:
@@ -125,6 +132,8 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
125132
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
126133
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
127134
case RAZER_BLACKWIDOW_V3_TKL_PID:
135+
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
136+
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
128137
case RAZER_CYNOSA_CHROMA_PID:
129138
case RAZER_CYNOSA_LITE_PID:
130139
case RAZER_CYNOSA_V2_PID:
@@ -205,6 +214,8 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
205214
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
206215
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
207216
case RAZER_BLACKWIDOW_V3_TKL_PID:
217+
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
218+
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
208219
case RAZER_CHARGING_PAD_CHROMA_PID:
209220
case RAZER_CHROMA_HDK_PID:
210221
case RAZER_CHROMA_PC_CASE_LIGHTING_KIT_PID:
@@ -448,6 +459,8 @@ bool RazerController::SupportsWave()
448459
case RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID:
449460
case RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID:
450461
case RAZER_BLACKWIDOW_V3_TKL_PID:
462+
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
463+
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
451464
case RAZER_BLACKWIDOW_X_CHROMA_PID:
452465
case RAZER_BLACKWIDOW_X_CHROMA_TE_PID:
453466
case RAZER_BLADE_2016_PID:

Controllers/RazerController/RazerControllerDetect.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Pro (Wired)", Det
221221
// REGISTER_HID_DETECTOR_PU ("Razer Blackwidow V3 Pro (Bluetooth)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID, 0x01, 0x00);
222222
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Pro (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID, 0x03, 0x0C, 0x01);
223223
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 TKL", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_TKL_PID, 0x00, 0x01, 0x02);
224+
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wired)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRED_PID, 0x03, 0x0C, 0x01);
225+
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID, 0x03, 0x0C, 0x01);
224226
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_PID, 0x02, 0x01, 0x02);
225227
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma Tournament Edition", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_TE_PID, 0x02, 0x01, 0x02);
226228
REGISTER_HID_DETECTOR_IPU("Razer Cynosa Chroma", DetectRazerControllers, RAZER_VID, RAZER_CYNOSA_CHROMA_PID, 0x02, 0x01, 0x02);

Controllers/RazerController/RazerDevices.h

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#define RAZER_BLACKWIDOW_LITE_PID 0x0235
2323
#define RAZER_BLACKWIDOW_OVERWATCH_PID 0x0211
2424
#define RAZER_BLACKWIDOW_V3_PID 0x024E
25+
#define RAZER_BLACKWIDOW_V3_MINI_WIRED_PID 0x0258
26+
#define RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID 0x0271
2527
#define RAZER_BLACKWIDOW_V3_PRO_WIRED_PID 0x025A
2628
#define RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID 0x025B
2729
#define RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID 0x025C
@@ -525,6 +527,86 @@ static const razer_key blackwidow_v3_tkl_keymap[] =
525527
{ 0, 5, 17, "Key: Right Arrow" },
526528
};
527529

530+
#define BLACKWIDOW_V3_MINI_KEYMAP_SIZE (sizeof(blackwidow_v3_mini_keymap) / sizeof(blackwidow_v3_mini_keymap[0]))
531+
532+
static const razer_key blackwidow_v3_mini_keymap[] =
533+
{
534+
/*---------------------------------------------------------------------*\
535+
| Zone, Row, Column, Key |
536+
\*---------------------------------------------------------------------*/
537+
{ 0, 0, 0, "Key: Escape" },
538+
{ 0, 0, 1, "Key: 1" },
539+
{ 0, 0, 2, "Key: 2" },
540+
{ 0, 0, 3, "Key: 3" },
541+
{ 0, 0, 4, "Key: 4" },
542+
{ 0, 0, 5, "Key: 5" },
543+
{ 0, 0, 6, "Key: 6" },
544+
{ 0, 0, 7, "Key: 7" },
545+
{ 0, 0, 8, "Key: 8" },
546+
{ 0, 0, 9, "Key: 9" },
547+
{ 0, 0, 10, "Key: 0" },
548+
{ 0, 0, 11, "Key: -" },
549+
{ 0, 0, 12, "Key: =" },
550+
{ 0, 0, 14, "Key: Backspace" },
551+
{ 0, 0, 15, "Key: Delete" },
552+
{ 0, 1, 0, "Key: Tab" },
553+
{ 0, 1, 1, "Key: Q" },
554+
{ 0, 1, 2, "Key: W" },
555+
{ 0, 1, 3, "Key: E" },
556+
{ 0, 1, 4, "Key: R" },
557+
{ 0, 1, 5, "Key: T" },
558+
{ 0, 1, 6, "Key: Y" },
559+
{ 0, 1, 7, "Key: U" },
560+
{ 0, 1, 8, "Key: I" },
561+
{ 0, 1, 9, "Key: O" },
562+
{ 0, 1, 10, "Key: P" },
563+
{ 0, 1, 11, "Key: [" },
564+
{ 0, 1, 12, "Key: ]" },
565+
{ 0, 1, 13, "Key: \\ (ANSI)" },
566+
{ 0, 1, 15, "Key: Page Up" },
567+
{ 0, 2, 0, "Key: Caps Lock" },
568+
{ 0, 2, 1, "Key: A" },
569+
{ 0, 2, 2, "Key: S" },
570+
{ 0, 2, 3, "Key: D" },
571+
{ 0, 2, 4, "Key: F" },
572+
{ 0, 2, 5, "Key: G" },
573+
{ 0, 2, 6, "Key: H" },
574+
{ 0, 2, 7, "Key: J" },
575+
{ 0, 2, 8, "Key: K" },
576+
{ 0, 2, 9, "Key: L" },
577+
{ 0, 2, 10, "Key: ;" },
578+
{ 0, 2, 11, "Key: '" },
579+
{ 0, 2, 12, "Key: #" },
580+
{ 0, 2, 13, "Key: Enter" },
581+
{ 0, 2, 15, "Key: Page Down" },
582+
{ 0, 3, 0, "Key: Left Shift" },
583+
{ 0, 3, 1, "Key: \\ (ISO)" },
584+
{ 0, 3, 2, "Key: Z" },
585+
{ 0, 3, 3, "Key: X" },
586+
{ 0, 3, 4, "Key: C" },
587+
{ 0, 3, 5, "Key: V" },
588+
{ 0, 3, 6, "Key: B" },
589+
{ 0, 3, 7, "Key: N" },
590+
{ 0, 3, 8, "Key: M" },
591+
{ 0, 3, 9, "Key: ," },
592+
{ 0, 3, 10, "Key: ." },
593+
{ 0, 3, 11, "Key: /" },
594+
{ 0, 3, 13, "Key: Right Shift" },
595+
{ 0, 3, 14, "Key: Up Arrow" },
596+
{ 0, 3, 15, "Key: Insert" },
597+
{ 0, 4, 0, "Key: Left Control" },
598+
{ 0, 4, 1, "Key: Left Windows" },
599+
{ 0, 4, 2, "Key: Left Alt" },
600+
{ 0, 4, 6, "Key: Space" },
601+
{ 0, 4, 7, "Logo" },
602+
{ 0, 4, 10, "Key: Right Alt" },
603+
{ 0, 4, 11, "Key: Right Fn" },
604+
{ 0, 4, 12, "Key: Right Control" },
605+
{ 0, 4, 13, "Key: Left Arrow" },
606+
{ 0, 4, 14, "Key: Down Arrow" },
607+
{ 0, 4, 15, "Key: Right Arrow" },
608+
};
609+
528610
#define BOOK_13_2020_KEYMAP_SIZE (sizeof(book_13_2020_keymap) / sizeof(book_13_2020_keymap[0]))
529611

530612
static const razer_key book_13_2020_keymap[] =
@@ -2630,6 +2712,68 @@ static const razer_device blackwidow_v3_tkl_device =
26302712
BLACKWIDOW_V3_TKL_KEYMAP_SIZE
26312713
};
26322714

2715+
/*-------------------------------------------------------------*\
2716+
| Razer Blackwidow V3 Mini (Wired) 1532:0258 |
2717+
| |
2718+
| Zone "Keyboard" |
2719+
| Matrix |
2720+
| 5 Rows, 16 Columns |
2721+
\*-------------------------------------------------------------*/
2722+
static const razer_zone blackwidow_v3_mini_zone =
2723+
{
2724+
"Keyboard",
2725+
ZONE_TYPE_MATRIX,
2726+
5,
2727+
16
2728+
};
2729+
2730+
static const razer_device blackwidow_v3_mini_wired_device =
2731+
{
2732+
"Razer BlackWidow V3 Mini (Wired)",
2733+
RAZER_BLACKWIDOW_V3_MINI_WIRED_PID,
2734+
DEVICE_TYPE_KEYBOARD,
2735+
true,
2736+
5,
2737+
16,
2738+
{
2739+
&blackwidow_v3_mini_zone,
2740+
NULL,
2741+
NULL,
2742+
NULL,
2743+
NULL,
2744+
NULL
2745+
},
2746+
blackwidow_v3_mini_keymap,
2747+
BLACKWIDOW_V3_MINI_KEYMAP_SIZE
2748+
};
2749+
2750+
/*-------------------------------------------------------------*\
2751+
| Razer Blackwidow V3 Mini (Wireless) 1532:0271 |
2752+
| |
2753+
| Zone "Keyboard" |
2754+
| Matrix |
2755+
| 5 Rows, 16 Columns |
2756+
\*-------------------------------------------------------------*/
2757+
static const razer_device blackwidow_v3_mini_wireless_device =
2758+
{
2759+
"Razer BlackWidow V3 Mini (Wireless)",
2760+
RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID,
2761+
DEVICE_TYPE_KEYBOARD,
2762+
true,
2763+
5,
2764+
16,
2765+
{
2766+
&blackwidow_v3_mini_zone,
2767+
NULL,
2768+
NULL,
2769+
NULL,
2770+
NULL,
2771+
NULL
2772+
},
2773+
blackwidow_v3_mini_keymap,
2774+
BLACKWIDOW_V3_MINI_KEYMAP_SIZE
2775+
};
2776+
26332777
/*-------------------------------------------------------------*\
26342778
| Razer Blackwidow X Chroma 1532:0216 |
26352779
| |
@@ -7267,6 +7411,8 @@ static const razer_device* device_list[] =
72677411
&blackwidow_v3_pro_wireless_device,
72687412
&blackwidow_v3_pro_bluetooth_device,
72697413
&blackwidow_v3_tkl_device,
7414+
&blackwidow_v3_mini_wired_device,
7415+
&blackwidow_v3_mini_wireless_device,
72707416
&blackwidow_x_chroma_device,
72717417
&blackwidow_x_chroma_te_device,
72727418
&cynosa_chroma_device,

0 commit comments

Comments
 (0)