Skip to content

Commit 3d8c11e

Browse files
Chr1sNoCalcProgrammer1
authored andcommitted
Initial commit for Razer Razer Blackwidow V4 X
+ Adding PID for the Razer Blackwidow V4 X + Registered detectors + Added metadata to RazerDevices.cpp + Added capabilities to RazerController.cpp + Resolves #3602
1 parent 197d19a commit 3d8c11e

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

Controllers/RazerController/RazerController.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ bool RazerController::SupportsWave()
356356
case RAZER_BLACKWIDOW_V3_TKL_PID:
357357
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
358358
case RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID:
359+
case RAZER_BLACKWIDOW_V4_X_PID:
359360
case RAZER_BLACKWIDOW_X_CHROMA_PID:
360361
case RAZER_BLACKWIDOW_X_CHROMA_TE_PID:
361362
case RAZER_BLADE_2016_PID:

Controllers/RazerController/RazerControllerDetect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Pro (Wireless)", Det
256256
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 TKL", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_TKL_PID, 0x02, 0x01, 0x02);
257257
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wired)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRED_PID, 0x03, 0x0C, 0x01);
258258
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V3 Mini (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V3_MINI_WIRELESS_PID, 0x03, 0x0C, 0x01);
259+
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow V4 X", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_V4_X_PID, 0x02, 0x01, 0x02);
259260
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_PID, 0x02, 0x01, 0x02);
260261
REGISTER_HID_DETECTOR_IPU("Razer Blackwidow X Chroma Tournament Edition", DetectRazerControllers, RAZER_VID, RAZER_BLACKWIDOW_X_CHROMA_TE_PID, 0x02, 0x01, 0x02);
261262
REGISTER_HID_DETECTOR_IPU("Razer Cynosa Chroma", DetectRazerControllers, RAZER_VID, RAZER_CYNOSA_CHROMA_PID, 0x02, 0x01, 0x02);

Controllers/RazerController/RazerDevices.cpp

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,29 @@ keyboard_keymap_overlay_values razer_blackwidow_v3_tkl_layout
276276
}
277277
};
278278

279+
keyboard_keymap_overlay_values razer_blackwidow_v4_x_layout
280+
{
281+
KEYBOARD_SIZE::KEYBOARD_SIZE_FULL,
282+
{
283+
{ /* ANSI Value set not used */ },
284+
{
285+
/* Add more regional layout fixes here */
286+
}
287+
},
288+
{
289+
/*---------------------------------------------------------------------------------------------------------*\
290+
| Edit Keys |
291+
| Zone, Row, Column, Value, Key, OpCode, |
292+
\*---------------------------------------------------------------------------------------------------------*/
293+
{ 0, 0, 0, 0, "Key: M6", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M6 macro key (Shifts row)
294+
{ 0, 1, 0, 0, "Key: M5", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M5 macro key (Shifts row)
295+
{ 0, 2, 0, 0, "Key: M4", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M4 macro key (Shifts row)
296+
{ 0, 3, 0, 0, "Key: M3", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M3 macro key (Shifts row)
297+
{ 0, 4, 0, 0, "Key: M2", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M2 macro key (Shifts row)
298+
{ 0, 5, 0, 0, "Key: M1", KEYBOARD_OPCODE_INSERT_SHIFT_RIGHT, }, // Insert M1 macro key (Shifts row)
299+
}
300+
};
301+
279302
keyboard_keymap_overlay_values razer_blackwidow_x_chroma_te_layout
280303
{
281304
KEYBOARD_SIZE::KEYBOARD_SIZE_TKL,
@@ -1447,6 +1470,41 @@ static const razer_device blackwidow_v3_mini_wireless_device =
14471470
&razer_blackwidow_v3_mini_layout
14481471
};
14491472

1473+
/*-------------------------------------------------------------*\
1474+
| Razer Blackwidow V4 X 1532:0293 |
1475+
| |
1476+
| Zone "Keyboard" |
1477+
| Matrix |
1478+
| 6 Rows, 22 Columns |
1479+
\*-------------------------------------------------------------*/
1480+
static const razer_zone blackwidow_v4_x_zone =
1481+
{
1482+
ZONE_EN_KEYBOARD,
1483+
ZONE_TYPE_MATRIX,
1484+
6,
1485+
22
1486+
};
1487+
1488+
static const razer_device blackwidow_v4_x_device =
1489+
{
1490+
"Razer Blackwidow V4 X",
1491+
RAZER_BLACKWIDOW_V4_X_PID,
1492+
DEVICE_TYPE_KEYBOARD,
1493+
RAZER_MATRIX_TYPE_EXTENDED,
1494+
0x1F,
1495+
6,
1496+
22,
1497+
{
1498+
&blackwidow_v4_x_zone,
1499+
NULL,
1500+
NULL,
1501+
NULL,
1502+
NULL,
1503+
NULL
1504+
},
1505+
&razer_blackwidow_v4_x_layout
1506+
};
1507+
14501508
/*-------------------------------------------------------------*\
14511509
| Razer Blackwidow X Chroma 1532:0216 |
14521510
| |
@@ -7247,6 +7305,7 @@ const razer_device* razer_device_list[] =
72477305
&blackwidow_v3_tkl_device,
72487306
&blackwidow_v3_mini_wired_device,
72497307
&blackwidow_v3_mini_wireless_device,
7308+
&blackwidow_v4_x_device,
72507309
&blackwidow_x_chroma_device,
72517310
&blackwidow_x_chroma_te_device,
72527311
&cynosa_chroma_device,

Controllers/RazerController/RazerDevices.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#define RAZER_BLACKWIDOW_V3_PRO_BLUETOOTH_PID 0x025B
4646
#define RAZER_BLACKWIDOW_V3_PRO_WIRELESS_PID 0x025C
4747
#define RAZER_BLACKWIDOW_V3_TKL_PID 0x0A24
48+
#define RAZER_BLACKWIDOW_V4_X_PID 0x0293
4849
#define RAZER_BLACKWIDOW_X_CHROMA_PID 0x0216
4950
#define RAZER_BLACKWIDOW_X_CHROMA_TE_PID 0x021A
5051
#define RAZER_BLADE_2016_PID 0x020F

0 commit comments

Comments
 (0)