Author Topic: [HELP!!!!] QMK layer creation for the split planck  (Read 1935 times)

0 Members and 1 Guest are viewing this topic.

Offline ItsBarney01

  • Thread Starter
  • Posts: 80
  • Location: Melbourne, Australia
[HELP!!!!] QMK layer creation for the split planck
« on: Sat, 18 March 2017, 04:21:57 »
Hi everyone, I have recently finished making a split planck using the rev2 pcbs. This is my first keyboard that I have made.

I do not know how to create layers within the "rev2.h". Here is my code:
Code: [Select]
#ifndef REV2_H
#define REV2_H

#include "../lets_split.h"

//void promicro_bootloader_jmp(bool program);
#include "quantum.h"

//void promicro_bootloader_jmp(bool program);

#define KEYMAP( \
k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
) \
{ \
{ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T }, \
{ KC_ENTER, KC_A, KC_S, KC_D, KC_F, KC_G }, \
{ KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B }, \
{ KC_LCTRL, KC_LGUI, KC_LALT, RESET, KC_LSHIFT, KC_SPACE }, \
{ KC_BSPC, KC_P, KC_O, KC_I, KC_U, KC_Y }, \
{ KC_QUOT, KC_SCLN, KC_L, KC_K, KC_J, KC_H }, \
{ KC_DEL, KC_SLSH, KC_DOT, KC_COMM, KC_M, KC_N }, \
{ KC_GRV, KC_CAPS, KC_MENU, KC_NO, KC_NO, KC_SPACE } \
}

#endif

This currently is functional, however it obviously only allows me to use one layer. All I want to know is how to create new layers, and how to assign them to a key. Thanks so much!  :thumb:

^^^Click for instagram^^^

Offline algernon

  • Posts: 311
  • A tiny mouse, a hacker.
    • Diaries of a Madman
Re: [HELP!!!!] QMK layer creation for the split planck
« Reply #1 on: Sat, 18 March 2017, 05:22:33 »
Your KEYMAP macro is wrong. You should not put the layout into that macro, but in the keymaps array. The KEYMAP macro rearranges the physical layout to the matrix layout, and that's about it. You should be using the "k00", "k01", etc symbols in the macro body. See any other keyboard's KEYMAP macro for an example.

Then you add multiple KEYMAP-macro'd layers to the keymaps array. For the rest, see the QMK wiki. It has plenty of examples and docs about how to add layer keys.

Offline ItsBarney01

  • Thread Starter
  • Posts: 80
  • Location: Melbourne, Australia
Re: [HELP!!!!] QMK layer creation for the split planck
« Reply #2 on: Sat, 18 March 2017, 06:03:02 »
Your KEYMAP macro is wrong. You should not put the layout into that macro, but in the keymaps array. The KEYMAP macro rearranges the physical layout to the matrix layout, and that's about it. You should be using the "k00", "k01", etc symbols in the macro body. See any other keyboard's KEYMAP macro for an example.

Then you add multiple KEYMAP-macro'd layers to the keymaps array. For the rest, see the QMK wiki. It has plenty of examples and docs about how to add layer keys.

Thanks a lot mate!

^^^Click for instagram^^^