help overriding pins config

I have nice_nano_v2 with damaged GPIO 5. I rewired row 2 of corne to use pin 0 (by adding wire between pins) and modified corne shield definition in zmk source code file "zmk/app/boards/shields/corne/corne_left.overlay" (I build locally). How can I achieve same effect, but through user-config?
4 Replies
TyperAI
TyperAI2w ago
To remap pins via user config, create a zmk.conf file in your config directory. Add these lines, replacing the pin numbers with your desired configuration:
CONFIG_ZMK_KEYBOARD_NAME="corne"
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

&kscan0 {
col-gpios
= <&pro_micro 2 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 3 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 4 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 15 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 18 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 19 GPIO_NUM GPIO_ACTIVE>;
row-gpios
= <&pro_micro 29 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 28 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 27 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 26 GPIO_NUM GPIO_ACTIVE>;
};
CONFIG_ZMK_KEYBOARD_NAME="corne"
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

&kscan0 {
col-gpios
= <&pro_micro 2 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 3 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 4 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 15 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 18 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 19 GPIO_NUM GPIO_ACTIVE>;
row-gpios
= <&pro_micro 29 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 28 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 27 GPIO_NUM GPIO_ACTIVE>,
<&pro_micro 26 GPIO_NUM GPIO_ACTIVE>;
};
Replace GPIO_NUM with the new pin number for row 2. Let me know if you need further help!
Maba_Kalox
Maba_KaloxOP2w ago
I need this mod only for left half
Mystery
Mystery2w ago
you can have _left config that only applies the left board. see mine: https://github.com/DarrenVictoriano/zmk-config/tree/master/config
GitHub
zmk-config/config at master · DarrenVictoriano/zmk-config
This is my custom Corne keyboard layout with nice!nano v2 + nice!view + seed xiao as dongle - DarrenVictoriano/zmk-config
Mystery
Mystery2w ago
When using a split keyboard, you can use a single file without the _left or _right suffix to configure both sides. For example, corne.conf and corne.keymap will apply to both corne_left and corne_right. If a shared config file exists, any left or right files will be ignored. https://zmk.dev/docs/config#board-folder
Configuration Overview | ZMK Firmware
ZMK has many configuration settings that can be changed to change the behavior of your keyboard. They are set in either Kconfig or Devicetree files.

Did you find this page helpful?