From 6a7b7d7c3b3e2cae4fcdfc9dfe87f4749f3f8f36 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Loss-Cutler-Hull" Date: Sun, 22 Apr 2018 06:08:04 -0700 Subject: [PATCH 1/2] Fix the Lachesis button function definitions. On the Lachesis, the profile and windows button definitions are swapped around in two ways. Profile switch up is 0x1A instead of 0xB. Profile switch down is 0x1B instead of 0xA. Windows button 4 is 0xA instead of 0x1B. Windows button 5 is 0xB instead of 0x1A. So not only are profile and windows button swapped on which has bit 5 set, but the two buttons swap which is first in both cases as well. --- librazer/hw_lachesis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/librazer/hw_lachesis.c b/librazer/hw_lachesis.c index 98a2cb9..708ca3c 100644 --- a/librazer/hw_lachesis.c +++ b/librazer/hw_lachesis.c @@ -143,8 +143,8 @@ static struct razer_button_function lachesis_button_functions[] = { BUTTONFUNC_LEFT, BUTTONFUNC_RIGHT, BUTTONFUNC_MIDDLE, - BUTTONFUNC_PROFDOWN, - BUTTONFUNC_PROFUP, + { .id = 0x1A, "Profile switch up" }, + { .id = 0x1B, "Profile switch down" }, BUTTONFUNC_DPIUP, BUTTONFUNC_DPIDOWN, BUTTONFUNC_DPI1, @@ -152,8 +152,8 @@ static struct razer_button_function lachesis_button_functions[] = { BUTTONFUNC_DPI3, BUTTONFUNC_DPI4, BUTTONFUNC_DPI5, - BUTTONFUNC_WIN5, - BUTTONFUNC_WIN4, + { .id = 0xA, "Windows button 4" }, + { .id = 0xB, "Windows button 5" }, BUTTONFUNC_SCROLLUP, BUTTONFUNC_SCROLLDWN, }; From ee7bf0091067de53451ef5d05ebf89501a87f567 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Loss-Cutler-Hull" Date: Sun, 22 Apr 2018 06:15:32 -0700 Subject: [PATCH 2/2] Fix the Lachesis physical button mappings. The side buttons were backwards, with the left and right swapped. --- librazer/hw_lachesis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librazer/hw_lachesis.c b/librazer/hw_lachesis.c index 708ca3c..6cb3c8b 100644 --- a/librazer/hw_lachesis.c +++ b/librazer/hw_lachesis.c @@ -50,10 +50,10 @@ enum lachesis_phys_button { LACHESIS_PHYSBUT_LEFT = 0x01, /* Left button */ LACHESIS_PHYSBUT_RIGHT, /* Right button */ LACHESIS_PHYSBUT_MIDDLE, /* Middle button */ - LACHESIS_PHYSBUT_LFRONT, /* Left side, front button */ - LACHESIS_PHYSBUT_LREAR, /* Left side, rear button */ LACHESIS_PHYSBUT_RFRONT, /* Right side, front button */ LACHESIS_PHYSBUT_RREAR, /* Right side, rear button */ + LACHESIS_PHYSBUT_LFRONT, /* Left side, front button */ + LACHESIS_PHYSBUT_LREAR, /* Left side, rear button */ LACHESIS_PHYSBUT_TFRONT, /* Top side, front button */ LACHESIS_PHYSBUT_TREAR, /* Top side, rear button */ LACHESIS_PHYSBUT_SCROLLUP, /* Scroll wheel up */