Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ckb-daemon/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const char* vendor_str(short vendor){
const char* product_str(short product){
if(product == P_K95 || product == P_K95_NRGB || product == P_K95_PLATINUM)
return "k95";
if(product == P_K70 || product == P_K70_NRGB || product == P_K70_LUX || product == P_K70_LUX_NRGB || product == P_K70_RFIRE)
if(product == P_K70 || product == P_K70_NRGB || product == P_K70_LUX || product == P_K70_LUX_NRGB || product == P_K70_RFIRE || product == P_K70_RFIRE_NRGB)
return "k70";
if(product == P_K65 || product == P_K65_NRGB || product == P_K65_LUX || product == P_K65_RFIRE)
return "k65";
Expand Down
6 changes: 5 additions & 1 deletion src/ckb-daemon/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#define P_K70_LUX_NRGB_STR "1b36"
#define P_K70_RFIRE 0x1b38
#define P_K70_RFIRE_STR "1b38"
#define IS_K70(kb) ((kb)->vendor == V_CORSAIR && ((kb)->product == P_K70 || (kb)->product == P_K70_NRGB || (kb)->product == P_K70_RFIRE || (kb)->product == P_K70_LUX || (kb)->product == P_K70_LUX_NRGB))
#define P_K70_RFIRE_NRGB 0x1b3a
#define P_K70_RFIRE_NRGB_STR "1b3a"
#define IS_K70(kb) ((kb)->vendor == V_CORSAIR && ((kb)->product == P_K70 || (kb)->product == P_K70_NRGB || (kb)->product == P_K70_RFIRE || (kb)->product == P_K70_RFIRE_NRGB || (kb)->product == P_K70_LUX || (kb)->product == P_K70_LUX_NRGB))

#define P_K95 0x1b11
#define P_K95_STR "1b11"
Expand Down Expand Up @@ -79,8 +81,10 @@ const char* product_str(short product);

// RGB vs non-RGB test
// (note: non-RGB Strafe is still considered "RGB" in that it shares the same protocol. The difference is denoted with the "monochrome" feature)

#define IS_RGB(vendor, product) ((vendor) == (V_CORSAIR) && (product) != (P_K65_NRGB) && (product) != (P_K70_NRGB) && (product) != (P_K95_NRGB))
#define IS_MONOCHROME(vendor, product) ((vendor) == (V_CORSAIR) && (product) == (P_STRAFE_NRGB))

#define IS_RGB_DEV(kb) IS_RGB((kb)->vendor, (kb)->product)
#define IS_MONOCHROME_DEV(kb) IS_MONOCHROME((kb)->vendor, (kb)->product)

Expand Down
1 change: 1 addition & 0 deletions src/ckb-daemon/usb_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ static _model models[] = {
{ P_K70_LUX_STR, P_K70_LUX },
{ P_K70_LUX_NRGB_STR, P_K70_LUX_NRGB },
{ P_K70_RFIRE_STR, P_K70_RFIRE },
{ P_K70_RFIRE_NRGB_STR, P_K70_RFIRE_NRGB },
{ P_K95_STR, P_K95 },
{ P_K95_NRGB_STR, P_K95_NRGB },
{ P_K95_PLATINUM_STR, P_K95_PLATINUM },
Expand Down
2 changes: 1 addition & 1 deletion src/ckb-daemon/usb_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ int usbmain(){
int vendor = V_CORSAIR;
int products[] = {
// Keyboards
P_K65, P_K65_NRGB, P_K65_LUX, P_K65_RFIRE, P_K70, P_K70_NRGB, P_K70_LUX, P_K70_LUX_NRGB, P_K70_RFIRE, P_K95, P_K95_NRGB, P_K95_PLATINUM, P_STRAFE, P_STRAFE_NRGB,
P_K65, P_K65_NRGB, P_K65_LUX, P_K65_RFIRE, P_K70, P_K70_NRGB, P_K70_LUX, P_K70_LUX_NRGB, P_K70_RFIRE, P_K70_RFIRE_NRGB, P_K95, P_K95_NRGB, P_K95_PLATINUM, P_STRAFE, P_STRAFE_NRGB,
// Mice
P_M65, P_M65_PRO, P_SABRE_O, P_SABRE_L, P_SABRE_N, P_SCIMITAR, P_SCIMITAR_PRO, P_SABRE_O2, P_HARPOON
};
Expand Down