Lily58 Pro Documentation

This is a non-exhaustive guide to the Lily58 Pro's technical aspects. The QMK Wiki is a fantastic resource, as is the QMK Discord. The wiki has information about keymaps, lighting, and encoder code. All keyboards come flashed with a default keymap, that is itself a modified version of the actual default Lily58 QMK keymap. If you ever decide to make your own keymap, you'll need to re-integrate the custom code I've added, and this page goes over what the changes I've made are.

First Time Setup

Congratulations on your new board!

All that you need to get started is 57 or 58 MX-compatible switches, keycaps, a USB cable, and a TRRS cable to connect the halves.

Installation of switches is very straight forward. I'd recommend putting a switch in each corner of the board, and two or three in the middle, and then carefully pressing the top plate and PCB together to seat the switches into the sockets. Alternatively, you can remove the top plate, and install all of your switches, reinstall the top plate, and then press the PCB and top plate together. As long as you're careful, you shouldn't have any problems, and if you do bend the pins on a few switches, they can be easily bent back in to place and reused.

Once you've added switches, keycaps, and cables, you should be all set, as the boards come pre-flashed with a keymap. If you'd like to change your keybindings, the below information will be useful. Otherwise, the pre-flashed layout is here.

 

Elite-C

The Elite-C is a mostly drop-in replacement for the pro-micro. The elite-c obviously uses a USB-C connector, but there is another thing to note: when flashing, you use <code>:dfu</code> instead of <code>avrdude</code> like on a pro micro. The rest of the process is the same, but they use different bootloaders, and this tells the compiler what to do. 

Note: Early Elite-C boards had a minor hardware issue that effects split keyboard detection. If your board has an Elite-C on the slave half of the board, you'll run into a few bugs. QMK is integrating fixes for this, but as of writing this, you'll need to add #define SPLIT_USB_DETECT into your config.h. This should fix most of the bugs with the issue.

Encoder

The encoder is wired to pins F4 and F5 on the Pro-Micro or Elite-C. The current QMK code only allows encoder support on the master side of the keyboard. There are a few things you must change in the default QMK code to enable encoders.

In the rules.mk, you add ENCODER_ENABLE = yes, as well as changing EXTRAKEY_ENABLE = no to EXTRAKEY_ENABLE = yes. ENCODER_ENABLE enables the code below this to work, and EXTRAKEY_ENABLE enables media keys - this isn’t necessary if you pick something that isn’t considered an "extrakey".

In the config.h, you add :

#define ENCODERS_PAD_A { F4 }
#define ENCODERS_PAD_B { F5 }
#define ENCODER_RESOLUTION 4

This creates one encoder, and assigns the rotation pins to <code>F4</code> and <code>F5</code>. The encoder resolution should typically be left at 4.

The basic encoder code is very simple. Add this below the function matrix_init_user in keymap.c.

void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } } }

To change the encoder functions, simply replace the tap_code(KC_VOLU) or tap_code(KC_VOLD) with a different keycode. With more custom code you can trigger other actions, but this is how you control the basic functionality. The press-action of the encoder is controlled by the switch that it replaces - simply change what it does in the regular keymap area.

Modified Encoder PCB

The modified PCB that replaces the switch below the controller with an encoder can be found in this github repo. As with the original design, this is open-source, and you're free to use it. I stock this PCB in my shop here.