-
Notifications
You must be signed in to change notification settings - Fork 118
Customizable layouts
Editing keyboard_config.h:
- Set the number of keypads on your board (currently maximum 2 pads) by setting
KEYPADS
. - Define the size of your matrix by setting
MATRIX_ROWS
andMATRIX_COLS
, Note that currently it is assumed the pads have equally sized matrices with sizeMATRIX_ROWS
xMATRIX_COLS
each . - Set the direction of your diodes (
COL2ROW
orROW2COL
).
Editing matrix.c
Set the pins you would like to use on each row and column by modifying MATRIX_ROWS_PINS[]
and MATRIX_COLS_PINS[]
, it is assumed that the matrix pins for each pad are identical.
It is important to note that:
- You set the correct number of pins for rows/columns as defined in keyboard_config.h
- GPIO6-11 are usually used for SPI flash
- GPIO34-39 can only be set as input mode and do not have software pullup or pulldown functions.
- GPIOS 0,2,4,12-15,25-27,32-39 Can be used as RTC GPIOS as well (please read about power management in ReadMe)
Editing keymap.c
- The keycodes are identical to QMK in order to make things easier.
- You can set different keymaps, encoder layers and macros.
Adding keymap layers
**Note: It's important to keep the order of arrays and enums consistent for proper functionality.
Make sure the amount of layers set is identical to the amount set in keyboard_config.h
- Add the keymaps by name to
enum custom_keycodes
. - Add the name of the keymaps to
char default_layout_names[LAYERS][MAX_LAYOUT_NAME_LENGTH]
. - Create a keymap matrix with the correct size, for example:
uint16_t _QWERTY[MATRIX_ROWS][KEYMAP_COLS]={
/* Qwerty
* ,------------------------------------------------------------------------------------.
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+-------+------+-------------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+-------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+-------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt |Default|Lower |Space |Space |Raise | Left | Down | Up |Right |
* `------------------------------------------------------------------------------------'
*/
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT } ,
{KC_LCTRL,KC_LGUI, KC_LALT, DEFAULT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
};
- Add a refrence to your matrix to
uint16_t (*default_layouts[])[MATRIX_ROWS][KEYMAP_COLS]
.
Adding macros
- Set the amount of macros you would like to have with
MACROS_NUM
. - Set your macro variable names in
enum custom_macros
, make sure the first macro is set equal toMACRO_BASE_VAL
. - Add your macro to
uint16_t macros[MACROS_NUM][MACRO_LEN]
(macros are currently only enabled for 3 keys).
Adding encoder layouts
-
To add encoder layouts modify
uint8_t default_encoder_map[LAYERS][ENCODER_SIZE]
oruint8_t default_SLAVE_encoder_map[LAYERS][ENCODER_SIZE]
accordingly.
each element should be set as:{ENCODER_TYPE ,COUNTER_CLOCKWISE, CLOCKWISE,CLICK}
. -
First element in encoder array should be set to the type of keycode you would like to set:
MEDIA_ENCODER
,MOUSE_ENCODER
, orKEY_ENCODER
. -
Add your macro to
uint16_t macros[MACROS_NUM][MACRO_LEN]
(macros are currently only enabled for 3 keys).