Weird (buggy?) logic in handling bank switching/macro mode for Sidewinder keyboards
luziferius opened this issue · comments
The behaviour of the bank switch key and macro pad switch key is weird and may need a cleanup, (if this is not the intended behaviour).
Previous behaviour was: Pressing the ‘sidewinder’ button permanently switched between keypad mode and macro pad mode. Bank switch key simply rotated through the 3 available banks.
What happens now:
- Pressing the sidewinder button switches the bank selection LED OFF (all 3 LEDs, of which one should always be lit).
- A bank switch resets the keypad back to keypad mode.
- Directly after switching the bank: Switching to macro pad mode requires an alternating amount of key presses, alternating between one and two presses:
Press bank switch. Requires pressing sidewinder button once to enable macro mode. Press bank switch. Requires 2 presses to enable macro mode. Press bank switch. Again requires 1 press to enable macro mode. - Point 3 does not occur if the keypad was manually switched back to keypad mode. This one indicates that point 3 is actually unintended.
Which of those 3 modes would be the best?
- Permanently assign keypad/macropad mode for each bank independently (up until user reconfiguration). E.g. bank 1 is always keypad mode, bank 2 and 3 switch the keypad to macro mode. This is the original solution by Microsoft. It would free up the sidewinder key for other uses. (maybe for mentioned permanent reconfiguration).
- Bank switch and macro pad switch are independent. Switching the bank does not alter keypad/macropad mode and vice versa. This is the old behaviour.
- Switching the bank always resets the keypad to keypad mode, regardless of previous mode. This is the current behaviour.
Hi there!
Thanks for the bug report! This is very likely a regression, as there has been alot of work on LEDs and something probably broke, without noticing it. Luckily, I have a SideWinder X6 around to verify and fix this issue.
As this is primarily a regression, I think it would be best to restore the old behaviour: macropad and profiles should be independent from each other. It isn't exactly what Microsoft is doing on Windows, but it's the more user-friendly approach we can get in the current state. At a later date, e.g. when we have a GUI, I think we can stick with their solution. But for now, I think it's more user-friendly to quickly toggle macropad / keypad using SW_KEY_GAMECENTER
when needed, instead of editing text files.
I will try to verify this now and then try to fix it. I'll keep you updated.
Cheers,
Tolga
I was able to fix this issue (for now). I needed to add quick and dirty code in order to avoid resetting macro pad mode on profile switch.
LED handling and especially LedGroup
need a complete design overhaul, so we can fix this in a cleaner way. Until then, commit 67a27c9 should do the job.
I will leave this open, until we have a clean fix. Thanks again for reporting!
Cheers,
Tolga