- INTRO
- QUICK START
- LOCAL INSTALLATION
- DISPLAY
- RGB
- DONGLE
- USEFUL TIPS
- RELATED PROJECTS
- DONGLE DESIGNS
- INSPIRATIONS
- MY OTHER PROJECTS
If you already have your corne configured with this repository and want to make a modification to your keymap, you can do it with the online keymap-editor.
Caution
I AM NOT RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE, USE IT AT YOUR OWN RISK.
Note
FEEL FREE TO MODIFY THE CODE TO YOUR LIKING OR USE WHATEVER YOU NEED. I DECIDED TO REVOKE MANY CHANGES AND RETURN TO THE BASE MAPPING, SO THAT ADVANCED AND NON-ADVANCED USERS CAN USE THIS REPOSITORY AS A BASE FOR THEIR CONFIGURATIONS. IF YOU HAVE ANY QUESTIONS, DON'T HESITATE TO ASK. IF YOU HAVE ANY SUGGESTIONS, FEEL FREE TO SUGGEST.
The objective of this repository is to serve as a base for configuring your Corne keyboard with the firmware ZMK firmware in a simple and fast way. without having to configure everything from scratch. Many of us are fascinated by customizing our keyboards, but sometimes we don't have the time or experience to do it. That is why I have decided to create this repository so that you can have a base configuration and you can modify it to your liking.
This base includes the most recent corne configurations, featuring a setup for the Corne dongle with/without an OLED screen. You can also use your keyboard without a dongle of course. with any of the plates or screens you have.
Tested with puchi_ble_v1 (used as a dongle and as peripherals), nice_nano_v2 (used as a dongle and as peripherals), clones of nice_nano_v2 (used as a dongle and as peripherals), and the seeeduino_xiao_ble (used only as a dongle).
Main Pros |
---|
mobility and flexibility |
reduction of tension and fatigue (ergonomic and ortholinear) |
improved productivity |
bluetooth and usb-c connection |
Highly customizable programmable with ZMK firmware. |
compatibility with linux, windows, macos, android, ios and more |
completely wireless between the two halves and with the PC |
ultra-low consumption. extends battery life to the limit |
drag and drop thanks to the included uf2 bootloader |
no additional software required for flashing |
support for multiple devices (up to 5) |
mouse keys |
rgb |
macros |
tap dance |
combos |
up to 1 week of use without charger (with 100mah) |
support nice-view screen and oled screen |
online editor for keymap. see keymap-editor |
100% open source |
support for puchi-ble dongle, nice!nano v2, nice!nano v2 clones, seeeduino xiao ble and more... |
support with dongle with display 128x32, 128x64 and 128x128 |
and more... |
Note
-
With this configuration you can use the corne keyboard practically immediately, you just have to follow the following steps and that's it.
-
If you need precompiled files you can download them from the firmware folder
-
If you have any problems, you just have to flash the reset firmwares that are in the firmware folder and that's it.
-
Disable the builds you don't need in the file build.yaml, by default they are all activated.
- Fork this repository (I appreciate if you follow me on github and youtube)
- Modify the keyboard mapping with keymap-editor. If you want to read about the features of this editor you can do so here.
- Save changes and commit (optional)
- Go to actions on github and download the artifacts
- Actions(click) -> All Workflows (click)-> Initial User Config. (here you scroll to the bottom and click)
- Here is something called artifacts, click to download the file, it is a .zip
- now go to download on your computer (or wherever you have downloads by default):
- unzip the .zip file
- Connect the nice!nano v2 microcontroller to the USB-C port of your computer
- the microcontroller is recognized as a storage device
- Flash the firmware to the keyboard with the uf2 files (drag and drop and with dongle)
- xiao_corne_dongle_xiao_dongle_display.uf2 for seeeduino_xiao_ble as a dongle
- nice_corne_left_peripheral.uf2 for nice_nano_v2 as a peripheral
- nice_corne_right.uf2 for nice_nano_v2 as a peripheral
- Flash the firmware to the keyboard with the uf2 files (drag and drop and without dongle)
- nice_corne_left.uf2 for nice_nano_v2 as a master side
- nice_corne_right.uf2 for nice_nano_v2 as a peripheral
- If you need help, you can ask in the ZMK Discord
- Enjoy your new keyboard
Here you can see the visual changes to the configuration:
Note
This .svg image is automatically generated every time a change is made with the keymap editor. Github's workflows are responsible for building and generating the .svg file. You just have to go to the keymap-drawer folder and open the .svg file with your preferred browser if you want to see the files. The keymap-drawer configuration file is located in config. The file for the workflows is in workflows in case you want to modify it.
If you want to customize this image with shapes/colors/etc. You can see these references: 1 2 3
Before making any modifications, please see the ZMK documentation documentation.
Example of an advanced configuration hier -> 4
Below is a list of features currently included in this branch5 on top of the official ZMK master branch.
- pointer movement/scrolling - PR #2027
- tri-state (aka swapper) - PR #1366
- smart-word (PR #1451)
- on-release-for-tap-preferred - tweak by Andrzej
- zen-tweaks - display & battery improvements by Cem Aksoylar
-
Clone your fork of this repository.
# Replace `mctechnology17` with your username git clone https://github.com/mctechnology17/zmk-config.git
-
Enter the repository.
cd zmk-config
Here you have a preview of how the repository is organized:
zmk-config # main folder
βββ LICENSE # license
βββ Makefile # file for compilation
βββ README.md # readme this file
βββ build.yaml # config file for compilation on the github server
βββ config # configuration folder
βΒ Β βββ boards
βΒ Β βΒ Β βββ ... # other boards
βΒ Β βΒ Β βββ nice_nano_v2.overlay
βΒ Β βΒ Β βββ puchi_ble_v1.overlay
βΒ Β βΒ Β βββ shields
βΒ Β βΒ Β βββ corne
βΒ Β βΒ Β βΒ Β βββ Kconfig.defconfig # modify if you want to add a new shield
βΒ Β βΒ Β βΒ Β βββ Kconfig.shield # modify if you want to add a new shield
βΒ Β βΒ Β βΒ Β βββ boards
βΒ Β βΒ Β βΒ Β βΒ Β βββ ... # other boards
βΒ Β βΒ Β βΒ Β βββ corne.conf # general configurations of the corne
βΒ Β βΒ Β βΒ Β βββ corne.dtsi # default dtsi
βΒ Β βΒ Β βΒ Β βββ corne.keymap # default keymap
βΒ Β βΒ Β βΒ Β βββ corne.zmk.yml # modify if you want to add a new shield
βΒ Β βΒ Β βΒ Β βββ corne_dongle_pro_micro.conf # conf dongle pro_micro pinout
βΒ Β βΒ Β βΒ Β βββ corne_dongle_pro_micro.overlay # properties/displays dongle
βΒ Β βΒ Β βΒ Β βββ corne_dongle_xiao.conf # conf dongle xiao pinout
βΒ Β βΒ Β βΒ Β βββ corne_dongle_xiao.overlay # properties/displays dongle
βΒ Β βΒ Β βΒ Β βββ corne_left.conf # conf left
βΒ Β βΒ Β βΒ Β βββ corne_left_peripheral.conf # config left peripheral
βΒ Β βΒ Β βΒ Β βββ corne_right.conf # conf right
βΒ Β βΒ Β βΒ Β βββ ... # other files
βΒ Β βΒ Β βββ dongle_display
βΒ Β βΒ Β Β Β βββ ... # here you can modify the screen widgets
βΒ Β βΒ Β Β Β βββ widgets
βΒ Β βΒ Β Β Β βββ # here you can modify the screen widgets
βΒ Β βββ config_keymap-drawer.yaml # config file keymap-drawer
βΒ Β βββ corne.conf # general configurations of the corne
βΒ Β βββ corne.keymap # your keymap file
βΒ Β βββ keymap_german_mac_iso_zmk.h # example of definition for german mac iso
βΒ Β βββ west.yml # conf to connect with the repository
βββ firmware
βΒ Β βββ *.uf2 # all the firmwares
βββ keymap-drawer # folder with the keymap-drawer
βΒ Β βββ corne.svg # img of the keymap
βΒ Β βββ corne.yaml # keymap file yaml format for keymap-drawer
βββ src
βββ ... # other files
To compile with make, just run the following command:
Important
make codebase_urob # clones urob's zmk firmware and initializes it
make corne_urob # compile all the *.uf2 of the corne and copy them to the firmware folder
- ePAPER nice-view
- the nice-view screen is compiled by default in this repository.
- OLED
- the oled screen for the dongle is enabled by default in this repository.
- If you want to enable the OLED screen for the halves, you can do so by modifying the
.conf
files for their respective halves. - Remember to disable the nice-view screens to avoid conflict in the compilation.
Important
- To modify the dongle's OLED screen you can modify the
.overlay
file as follows for its respective board: corne_dongle_xiao.overlay and corne_dongle_pro_micro.overlay. There you can find as a comment examples for the 128x32, 128x64, 128x128 screens and nice-view for the dongle screen. - For the 128x128 OLED screen model sh1107 there are no default drivers in Zephyr, so neither in ZMK, but you can add it yourself with this small tutorial (This tutorial is the same for the OLED screens mentioned above):
You just have to modify the following line:
// replace the following lines for the 128x64 screen by default
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// for this (i.e. just copy and paste) replace the 128x64 screen with the 128x128 sh1107 screen
&pro_micro_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <120>;
height = <128>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <119>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
If you are interested in using RGB on your keyboard you can see the configuration in the branch power/domains-and-device-runtime from this same repository.
Here is an example of what it looks like:
Tip
- You can connect the display to the dongle directly to the i2c port of the handwired style dongle, or you can connect it to a usb-c port of the pcb style dongle.
- You can see the connections in the following diagram for seeeduino_xiao_ble and for the boards with pro_micro connections as the nice_nano_v2 and the puchi_ble_v1.
- You can print a case for the dongle, you can see the designs below in the section Dongle Designs.
- You can print a pcb for the dongle, you can see the designs in the section Dongle Designs.
- You can program a macro that references the
&bootloader
action so that the dongle enters bootloader mode and you can flash the firmware again. The macros are executed on the master so this action causes the dongle to enter bootloader mode. Thanks @chadtrans for the tip!
In the following image you can see how you can connect the OLED screen to the
dongle:
Information about this image:
- The photo shows a seeeduino_xiao_ble dongle with an OLED 128x128 sh1107 display connected to the handwired style i2c port. This dongle acts as master.
- The left side acts as peripheral in this case, the board is a puchi_ble_v1.
- The right side acts as a peripheral in this case, the board is a nice_nano_v2.
- The photo shows a clone nice_nano_v2 dongle with an OLED display connected to a traditional i2c port in a pcb style. This dongle is only for sample photo and is not connected to any device shown in the photo.
Macro example to enter bootloader mode. On your corne.keymap file you can add the following macro (Thanks @chadtrans for the tip!):
Tip
- You can program this macro with the online editor keymap-editor
// this is the manual way to do it
#define MACRO(name, keys) \
name: name##_macro { \
compatible = "zmk,behavior-macro";\
#binding-cells = <0>; \
tap-ms = <1>; \
wait-ms = <1>; \
bindings = <keys>; \
};
MACRO(dongle_boot, &bootloader)
/ {
keymap {
compatible = "zmk,keymap";
... // other layers
config_layer {
display-name = "CON";
bindings = <
... // other bindings
&dongle_boot
... // other bindings
};
... // other layers
};
Tip
Below are some useful tips for using your corne keyboard with this configuration.
- You can add a reset key on each half, that's useful for when your halves disconnect/desynchronize, or something unusual happens. That way the firmware is loaded again. see reference in corne.keymap
- You can add a bootloader activator on each half in case you don't have access to the bootloader button, it is useful in case your case is not optimized or you just want that option. see reference in corne.keymap
- If both halves were disconnected/unsynchronized, you just have to press the reset button on both halves 10 times in a row and they will reconnect.
- If you want to flash the firmware again you just have to connect the keyboard (that is, one half first, usually the left one) press the reset button 2 times in a row and your device is recognized as a hard disk storage drive, then just drag the file to flash and that's it. do the same with the other half.
- Remember that if your corne only has some functional RGB lights you can activate only the ones that you have functional, it is not necessary to activate all the lights. see reference in led strip
- You can combine the boards, for example: on the left you can have a nice_nano_v2, on the right a puchi_ble_v1 and on the dongle a seeeduino_xiao_ble or some clone nice_nano_v2, or any combination you can think of.
I used this project as a reference to configure the dongles with OLED screen:
- cygnus by @rain2813
- zmk keyboard Macintosh dongle display by @rain2813
- corne with dongle by @tomgroenwoldt
- zmk-dongle-display by @englmaxi
- zmk-config for module by @englmaxi
- zmk-config for dongle pro micro by @joaopedropio
In the following animations created by @englmaxi you can see what the dongle looks like with the 128x64 OLED screen:
In that animation you can see the connection or output with the computer, that is, if it is through a USB or Bluetooth port. Also information about the status of both batteries.
In this animation you can see the actions of the modifier keys, such as control, shift, alt, windows/mac, etc.
- case1 by @englmaxi
- case2 by @englmaxi
- Cyberdeck by @rafaelromao
- Dongle PCB by @spe2
- Macintosh by @rain2813
- Redox by @rurounikexin
- ZMK Display Dongle by @yingeling
An example of Dongle Designs (by @rain2813):
- englmaxi/zmk-config
- caksoylar/zmk-config
- joelspadin/zmk-locale-generator
- minusfive/zmk-config
- infused-kim/zmk-config
- urob/zmk-config
- qmk-config will be updated soon
- qmk_userspace will be updated soon
- vimtools swiss army knife for vim (features and settings that will make your life easier)
- gm cross-platform git manager with friendly user interface
- vim-better-header the best automated template
- vim-executor multilanguage code executor
If you enjoy my contributions, feel free to donate. I appreciate if you follow me on github and youtube
Footnotes
-
Keymap-drawer, https://github.com/caksoylar/keymap-drawer https://keymap-drawer.streamlit.app/ β©
-
caksoylar zmk-config example for keymap-drawer https://github.com/caksoylar/zmk-config β©
-
Install pipx, https://pipx.pypa.io/stable/ β©
-
Urob zmk-config, https://github.com/urob/zmk-config β©
-
Urob ZMK Firmware: Personal fork, https://github.com/urob/zmk/ β©