Author Topic: qmk question: how do i add a layout in keymap.c?  (Read 5292 times)

0 Members and 1 Guest are viewing this topic.

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
qmk question: how do i add a layout in keymap.c?
« on: Mon, 22 June 2020, 04:18:01 »
hello gh!

i am working on a keyboard that have both "ortho" and "mit" layout. i was able to defined both ortho and mit in my .h file but i could not find any information on what to add in keymap.c.

here's an example of whats in my keymap.c
Code: [Select]
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_ortho_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,          KC_Y,         KC_U,   KC_I,    KC_O,   KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,          KC_H,         KC_J,   KC_K,    KC_L,   LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,          KC_N,         KC_M,   KC_COMM, KC_DOT, LT(4,KC_SLSH),
    KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP,  KC_DEL, KC_ESC)
};

do i just need to add this to enable mit?
Code: [Select]
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_mit_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,          KC_Y,         KC_U,   KC_I,    KC_O,   KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,          KC_H,         KC_J,   KC_K,    KC_L,   LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,          KC_N,         KC_M,   KC_COMM, KC_DOT, LT(4,KC_SLSH),
    KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT,         LT(2,KC_BSPC),       KC_ENT, KC_APP,  KC_DEL, KC_ESC)
};

thanks

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #1 on: Mon, 22 June 2020, 07:06:34 »
if you're referring to plank-ish ortho boards (though yours is slightly smaller)... ortho/grid & mit are physical layouts. with mit having a 2u space bar and the grid is all 1u caps.

i'd look at the plank as a starting point
- plank QMK directory
- default keymap (as example)

obviously, you'll have to make adjustments to match your hardware/wiring, but this is a good example of multiple keymaps supported in the firmware.
- config.h - physical board specs, pins, etc...
- planck.c - electrical key matrix
- keymap.c - keymap
    - might be a couple others that need adjusted, but these are the big ones.

Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #2 on: Mon, 22 June 2020, 10:08:27 »


thanks, nevin. i looked at planck's configuration files but could not find one that matches what i wanted. i also looked at contra and their keymap.c is also set to only one layout.

this is what my p40.h looks like:

Code: [Select]
#pragma once

#include "quantum.h"

#define LAYOUT_ortho_4x10( \
      k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
      k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
      k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
      k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \
) \
{ \
      {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
      {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
      {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \
      {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39} \
}

#define LAYOUT_mit_4x10( \
      k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
      k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
      k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
      k30, k31, k32, k33, k34,    k35,   k37, k38, k39 \
) \
{ \
      {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
      {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
      {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \
      {k30, k31, k32, k33, k34, k35, k35, k37, k38, k39} \
}

and my keymap.c looks like this:
Code: [Select]
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_ortho_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,          KC_T,          KC_Y,  KC_U,         KC_I,          KC_O,   KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,          KC_G,          KC_H,  KC_J,         KC_K,          KC_L,   LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,          KC_B,          KC_N,  KC_M,         KC_COMM,       KC_DOT, KC_SLSH,
    KC_LCTL, KC_LGUI, KC_LALT, LT(2,KC_BSPC), LT(1,KC_SPC),  KC_SPC, LT(4,KC_ENT), LT(5,KC_DEL),  KC_ESC, KC_RSFT),
  [1] = LAYOUT_ortho_4x10(
    KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,
    KC_TAB,  KC_MINS, KC_EQL,  KC_GRV,  KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_TRNS,
    KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_EQL,  KC_MINS, KC_NO,   KC_LT,   KC_GT,   KC_QUES,
    KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO,   KC_NO,   KC_PENT, KC_DEL,  KC_TRNS, KC_TRNS),
  [2] = LAYOUT_ortho_4x10(
    KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5, KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,
    KC_TAB,  KC_F11,  KC_F12,  KC_NO,   KC_NO, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,
    KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO,   KC_VOLD, KC_VOLU, KC_MUTE,
    KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO,   KC_TRNS, KC_DEL,  KC_TRNS, KC_TRNS),
  [3] = LAYOUT_ortho_4x10(
    KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_INS,  KC_PGUP, KC_UP,   KC_PGDN, KC_DEL,
    KC_TAB,  KC_NO,   KC_NO,   KC_TILD, KC_LCBR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
    KC_LSFT, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_END,  KC_NO,   KC_NO,   KC_NO,   KC_NO,
    KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_BSPC, KC_NO,   KC_NO,   KC_DEL,  KC_NO,   KC_NO),
  [4] = LAYOUT_ortho_4x10(
    KC_P7,  KC_P8,  KC_P9,  KC_PMNS,  KC_PSLS, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U,
    KC_P4,  KC_P5,  KC_P6,  KC_PPLS,  KC_PAST, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
    KC_P1,  KC_P2,  KC_P3,  KC_NO,    KC_NO,   KC_NO, KC_NO,   KC_PCMM, KC_PDOT, KC_PSLS,
    KC_PEQL, KC_P0, KC_PDOT, KC_TRNS, KC_BSPC, KC_NO, KC_NO,   KC_DEL, KC_TRNS, KC_TRNS),
  [5] = LAYOUT_ortho_4x10(
    KC_EXLM, KC_AT, KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
    KC_NO,   KC_NO, KC_NO,   KC_TILD, KC_LCBR, KC_RCBR, KC_PIPE, KC_COLN, KC_DQUO, KC_UNDS,
    KC_NO,   KC_NO, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_LT,   KC_GT,   KC_QUES,
    KC_NO,   KC_NO, KC_NO,   KC_NO,   KC_BSPC, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO),
};

as you can see, my keymap.c only supports LAYOUT_ortho_4x10. what should i do or add on my keymap.c to support MIT? can i just add the codes below?

Code: [Select]
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_ortho_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,          KC_Y,         KC_U,   KC_I,    KC_O,   KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,          KC_H,         KC_J,   KC_K,    KC_L,   LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,          KC_N,         KC_M,   KC_COMM, KC_DOT, LT(4,KC_SLSH),
    KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP,  KC_DEL, KC_ESC)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_mit_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,          KC_Y,         KC_U,   KC_I,    KC_O,   KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,          KC_H,         KC_J,   KC_K,    KC_L,   LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,          KC_N,         KC_M,   KC_COMM, KC_DOT, LT(4,KC_SLSH),
    KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT,         LT(2,KC_BSPC),       KC_ENT, KC_APP,  KC_DEL, KC_ESC)
};


thanks

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #3 on: Mon, 22 June 2020, 10:36:15 »
it won't compile if the number of keys in the keymap (keymap.c) doesn't match the number of keys in the electrical matrix (p40.h)

- is it handwired?
- are the pcb's different? or multiple locations for the different physical layouts?

your matrix is 4x10, it is expecting 10 keys in the last row on the mit layout you're trying to do and you only have 9.
- if substituting a 2u space for two of the keys, figure out which location the switch is actually connected to (row 4 col 5, or row 4 col 6 ) and comment the other out with "KC_NO"

like this:
Code: [Select]
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT_mit_4x10(
    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,     KC_Y,          KC_U,   KC_I,    KC_O,    KC_P,
    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,     KC_H,          KC_J,   KC_K,    KC_L,    LT(3,KC_MINS),
    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,     KC_N,          KC_M,   KC_COMM, KC_DOT,  LT(4,KC_SLSH),
    KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, KC_NO,    LT(2,KC_BSPC), KC_ENT, KC_APP,  KC_DEL,  KC_ESC)
};

hopefully this is what you're looking for. if not i might not be understanding the question/problem.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #4 on: Mon, 22 June 2020, 20:36:29 »
it won't compile if the number of keys in the keymap (keymap.c) doesn't match the number of keys in the electrical matrix (p40.h)
...
doh! yes, of course. thanks.

yes, apologies. i do find it hard to tell what i wanted. i appreciate that you still take time to explain. anyways, please allow me to re-write my question....

planck have multiple layouts under his rev6.h
Code: [Select]
LAYOUT_planck_mit
LAYOUT_planck_grid
LAYOUT_kc_ortho_4x12

but his keymaps/default/keymap.c only mentions only one, i.e. "LAYOUT_planck_grid"

[ Specified attachment is not available ]

what happened to the other layouts?
« Last Edit: Mon, 22 June 2020, 20:38:18 by pabile »

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #5 on: Mon, 22 June 2020, 23:19:28 »
i think there is some miscommunication on some of the terms

layout = physical number of keys & position of those keys on the board
keymap = what keycode is sent when you press a key or key combination
layer = part of the keymap, or an alternate keymap that can be switched to:
   - momentarily (while holding a key.. Fn, Raise, Lower, etc..)
   - temporarily... until another key is pressed
   - temporarily... when you switch to another layout (... say... Fn + D for Dvorak)

normally, you DO NOT switch between physical layouts (number & position of keys on the board)
 - you could change the physical layout... say, if you were rebuilding your board from an all 1u grid to incorporate a 2u space by moving one of the switches to the center, and removing the other switch that is now in the way.

you DO switch between layers of a keymap (different keycodes for the same key, depending on what layer or modifier you are using/holding)

you would choose ONE of the physical layouts that would match your keyboard.
- mit
- grid
- etc...

then you would define what happens when a particular key is pressed in the keymap, adding layers and Fn/modifiers, etc..

--

i think i will be able to help you better if you tell me more about your board.
- is it a pcb you made/bought or hand wired?
- can you upload a ZIP as an attachment to this thread of the QMK config files you've put together so far?

i'm going to work up a keyboard layout editor layout of your board, so it will be easier for both of us to visualize what your trying to accomplish. (i'll post link shortly once i transfer what you posted of your keymap)

-- more explanation, but doubtful it will be helpful--

yes, this that you pulled out...
Code: [Select]
LAYOUT_planck_mit
LAYOUT_planck_grid
LAYOUT_kc_ortho_4x12

...is the end of rev6.h where they are defining the names of the different electrical matrices for the different physical layouts.  in that section, they are just giving the physical layouts different names.

Code: [Select]
#define LAYOUT_planck_mit LAYOUT_planck_1x2uCso, LAYOUT_planck_mit   is   LAYOUT_planck_1x2uC.     1x2uC, meaning, one 2u key Center
here is what that #define tag is calling
Code: [Select]
#define LAYOUT_planck_1x2uC( \
    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
    k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
    k30, k31, k32, k33, k34,    k36,   k37, k38, k39, k3a, k3b \
) \
{ \
    { k00, k01, k02, k03, k04, k05   }, \
    { k10, k11, k12, k13, k14, k15   }, \
    { k20, k21, k22, k23, k24, k25   }, \
    { k30, k31, k32, k39, k3a, k3b   }, \
    { k06, k07, k08, k09, k0a, k0b   }, \
    { k16, k17, k18, k19, k1a, k1b   }, \
    { k26, k27, k28, k29, k2a, k2b   }, \
    { k36, k37, k38, k33, k34, KC_NO } \
}

this portion the actual electrical matrix (how it is connected to the controller)
Code: [Select]
{ \
    { k00, k01, k02, k03, k04, k05   }, \
    { k10, k11, k12, k13, k14, k15   }, \
    { k20, k21, k22, k23, k24, k25   }, \
    { k30, k31, k32, k39, k3a, k3b   }, \
    { k06, k07, k08, k09, k0a, k0b   }, \
    { k16, k17, k18, k19, k1a, k1b   }, \
    { k26, k27, k28, k29, k2a, k2b   }, \
    { k36, k37, k38, k33, k34, KC_NO } \
}

this portion is rearranging the electrical matrix to match the physical layout
Code: [Select]
    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
    k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
    k30, k31, k32, k33, k34,    k36,   k37, k38, k39, k3a, k3b \
) \

which then is the basis of your keymap.

Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #6 on: Tue, 23 June 2020, 00:07:07 »
[...]
normally, you DO NOT switch between physical layouts (number & position of keys on the board)
 - you could change the physical layout... say, if you were rebuilding your board from an all 1u grid to incorporate a 2u space by moving one of the switches to the center, and removing the other switch that is now in the way.
[...]

hi nevin! thanks a lot once again. i apologize for the miscommunication and my lack of use of proper terms.

the answer i wanted to confirm is that the physical layout, other than default, can be changed only when the user wanted. there is no need to add anything on the keymap.c since the position were already defined in the electrical matrix (as far as planck and my keyboard goes).

...yep. i forgot to link my board's details in my previous post. here it is (keymaps/ortho/): https://github.com/pabile/qmk_firmware/tree/pabile/keyboards/pabile/p40

i learned a lot from your answers. thanks a lot once agian

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #7 on: Tue, 23 June 2020, 00:30:50 »
Quote
i apologize for the miscommunication and my lack of use of proper terms.
don't worry about it, just makes it a little easier when we are both talking about oranges... instead of pineapples & pears.... :p

so is it working the way you want? or what do you need to change?

other than the QMK directory, i don't see much info on it.
   it is in the QMK Configurator  https://config.qmk.fm/#/pabile/p40/LAYOUT_ortho_4x10

do you have the slant version or the grid version?

looks like there is a clone by another name Zlant by 1up keyboards

looking at the keymap you posted earlier.... (some notes)
- you are including a bunch of duplicates and shifted characters (which isn't usually needed) but if you're doing it for convenience while programming, that's a different story.
- also, including print screen, scroll lock, num lock... these can be left out if you don't use them.
- personally, i would try to cut down on the number of layers and fully populate fewer layers (though you're going to need more than most only having 40 keys).

...crap, just realized you're the pcb maker. congrats.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #8 on: Tue, 23 June 2020, 01:19:52 »
so is it working the way you want? or what do you need to change?
no more. i feel i have it as i wanted it. just making sure that i am doing things correctly / asking around before i push this branch to the master repository.

do you have the slant version or the grid version?
my original design is slanted. what i have now is the grid version (not yet merged with master).  i decided not to edit the json file and leave it as is only adding MIT option. would you suggest that i add the grid layout as new keyboard rather than mixed with the slanted version?

looks like there is a clone by another name Zlant by 1up keyboards
indeed. this one 2 columns smaller though :)

looking at the keymap you posted earlier.... (some notes)
- you are including a bunch of duplicates and shifted characters (which isn't usually needed) but if you're doing it for convenience while programming, that's a different story.
- also, including print screen, scroll lock, num lock... these can be left out if you don't use them.
- personally, i would try to cut down on the number of layers and fully populate fewer layers (though you're going to need more than most only having 40 keys).
yes. please ignore the default layout :D i am still looking for something that i feel comfortable. i might need to clean up those soon though. i agree that fewer layers is the best way to go :)

...crap, just realized you're the pcb maker. congrats.

thanks. still learning a lot and enjoy looking for the smallest form factor that is functional (at least for me) :p

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #9 on: Tue, 23 June 2020, 09:06:44 »
get back to you a later today.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #10 on: Wed, 24 June 2020, 01:28:33 »
no, i would not include this grid layout in the firmware for the slant one. do a separate directory for this one. it's a different pcb as well as shape/plate/case. i would include all of the layouts supported by the pcb in this new version though. (full 1u grid, mit/space bar, etc.)

if you're interested, we could probably look at via support as well once this part is squared away. via would be great for quickly changing your keymap on the fly until you get it where you want it.

have you tried a split ortho board yet?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #11 on: Thu, 25 June 2020, 03:53:20 »
no, i would not include this grid layout in the firmware for the slant one. do a separate directory for this one. it's a different pcb as well as shape/plate/case. i would include all of the layouts supported by the pcb in this new version though. (full 1u grid, mit/space bar, etc.)
good point. i'll separate these boards

if you're interested, we could probably look at via support as well once this part is squared away. via would be great for quickly changing your keymap on the fly until you get it where you want it.
looks cool! i'll check its docs

have you tried a split ortho board yet?
 

not yet :)

Offline nevin

  • Posts: 1646
  • Location: US
Re: qmk question: how do i add a layout in keymap.c?
« Reply #12 on: Thu, 25 June 2020, 08:24:04 »
via - yeah, it's well documented. follow this. and if you get stuck, mechmerlin has done a number of tutorials as he adds via support for various boards.
- mechmerlin's vod's on twitch - look for the "Porting VIA Port" ones
- mechmerlin's youtube

here's a good one. again, look for the "Porting VIA Port" ones

split boards.... with how small you make your boards, splitting them would be a very nice improvement. hand separation is great, especially on highly optimized small boards.
- your P40 would be like two 5x4 numberpads
- also look at some of the other small ergo/ortho splits that are out there... Corne, Mitosis, Chimera, For Science, etc.
- here's a decent list
- can't go wrong with anything from keeb.io either
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline pabile

  • Thread Starter
  • Posts: 158
  • Location: Southeast Asia
    • pabile online
Re: qmk question: how do i add a layout in keymap.c?
« Reply #13 on: Sat, 27 June 2020, 09:19:21 »
thanks, nevin!
via - i'll do some reading and ask around if i get stuck.

yes, definitely will try those splits.

thanks for links :)