KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.38k stars 474 forks source link

[Enhancement] Refactor CgSwap #789

Open xs5871 opened 1 year ago

xs5871 commented 1 year ago

Continuation of #768.

The current CgSwap module is a bit of mess concerning code quality and the current implementation doesn't easily allow for multiple mod- (or even potentially any key-) swaps. Suggestion: Refactor and handle any key (or at least any mod) swap.

dunk2k commented 1 year ago

@xs5871 Would this ModSwap or KeySwap module come with preset classes? I.e. AltGuiSwap, BackSwap (Backslash, Backspace)

xs5871 commented 1 year ago

Ideally no, it would be simple enough that presets aren't needed. If you can pass a list of tuples to be switched + a mechanism to select them (similar to layers), then there's no need to have a class for every combination of keys.