Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature Request: User defined key coordinate transforms #585
This is a follow up to discussion in the Keyboardio community forum: https://community.keyboard.io/t/mirrored-keymap-lookup/2580
When operating the mouse it would sometimes be nice to have all key-functionality available to the other (non-mouse) hand. This could of course be achieved using additional keymap layers but it seems to be a huge waste of PROGMEM.
In several occasions, e.g. when doing sports, it occurred to me that it is comparably easy to do the same movements with the other hand in a mirrored fashion, once you learned to perform some complex motion with one hand. It is e.g. not so hard to learn to play table tennis with the other hand once you know how to play. That’s why I imagine it not too complex a task to use (memorize) keys with the other hand in a mirrored fashion.
What I would like to have is a global function
__attribute__((weak)) KeyCoord messWithKeyCoordinates(KeyCoord in);
that the user could override. This function would be called by the firmware core in all places immediately before key coordinate based lookup occurs, including keycode lookup (or assignment) and LED access.
The system (Hardware) could then provide convenience functions such as
KeyCoord mirrorKeyCoordinate(KeyCoord in); KeyCoord shiftKeyCoordinate(byte xOffset, byte yOffset, bool wrapAround, KeyCoord in); ...
thus not requiring the user to care too much about the dimensions of the key matrix. Those auxiliary functions could then be used in a
In this proposal I deliberately do not pass the layer id to