Keybow 2040: modifying the layers code with shortcuts

I have a fairly basic knowledge of python and I’m completely stuck with modifying the fifteen-layers code for the Keybow 2040.

Using layer_1 as an example, if I want Key 4 to equal Keycode.SHIFT, Keycode.ZERO rather than just Keycode.ZERO, how do I do this? Nothing I’m doing is working. I know it’s set up as a dictionary but even formatting the dictionary as a multi-value one still doesn’t work.

Have I completely misunderstood this code? Are the fundamentals of this code not compatible with multiple keycodes being triggered by a single key?

Any help or guidance would be greatly appreciated.

the way the 15 layers example is set up by default each command type (keypress, write, media command, etc) is assigned to a whole layer, and that layer can only use that one type of command. and actually only the first 4 layers are even assigned. the code that handles that is the second to last block in the 15 layers example file.

simple edits to that block will allow you to assign the various HID commands to different layers.
ETA: A reference for the HID commands can be found here

A more complex solution that allows arbitrary HID commands on any layer (and stacking multiple and/or different commands) can be found here

1 Like