1
0
Fork 0

Move to LAYOUT_planck_grid

This commit is contained in:
Sijmen 2018-12-31 21:00:30 +01:00
parent 7517145260
commit 5210546077

View file

@ -1,15 +1,5 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h" #include "planck.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define O_SFT OSM(MOD_LSFT) #define O_SFT OSM(MOD_LSFT)
#define O_SFT_CTL OSM(MOD_LSFT | MOD_LCTL) #define O_SFT_CTL OSM(MOD_LSFT | MOD_LCTL)
#define O_SFT_GUI OSM(MOD_LSFT | MOD_LGUI) #define O_SFT_GUI OSM(MOD_LSFT | MOD_LGUI)
@ -55,12 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC | LEFT | DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC | LEFT | DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_DEFAULT] = { [_DEFAULT] = LAYOUT_planck_grid(
{KC_Q, KC_D, KC_R, KC_W, KC_B, O_SFT_CTL, O_SFT_GUI, KC_J, KC_F, KC_U, KC_P, KC_SCLN }, KC_Q, KC_D, KC_R, KC_W, KC_B, O_SFT_CTL, O_SFT_GUI, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
{KC_A, KC_S, KC_H, KC_T, KC_G, O_SFT, O_SFT, KC_Y, KC_N, KC_E, KC_O, KC_I }, KC_A, KC_S, KC_H, KC_T, KC_G, O_SFT, O_SFT, KC_Y, KC_N, KC_E, KC_O, KC_I,
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_ENT, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, TD(TD_QUOT)}, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_ENT, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, TD(TD_QUOT),
{KC_LCTL, KC_LALT, KC_LGUI, LT_LNUM_ESC, LT_LSFT_SPC, LT_TAB_FUNC, KC_BSPC, LT_RSFT_BSPC, LT_SYM_LEFT, KC_DOWN, KC_UP, KC_RGHT }, KC_LCTL, KC_LALT, KC_LGUI, LT_LNUM_ESC, LT_LSFT_SPC, LT_TAB_FUNC, KC_BSPC, LT_RSFT_BSPC, LT_SYM_LEFT, KC_DOWN, KC_UP, KC_RGHT
}, ),
/* Symbol /* Symbol
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -73,12 +63,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC |[ SYM]| DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC |[ SYM]| DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_SYMBOL] = { [_SYMBOL] = LAYOUT_planck_grid(
{KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, KC_RCBR, _______, _______, S(KC_EQL), KC_HOME, KC_UP, KC_END, _______}, KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, KC_RCBR, _______, _______, S(KC_EQL), KC_HOME, KC_UP, KC_END, _______,
{KC_LPRN, KC_CIRC, KC_PERC, KC_DLR, KC_RPRN, _______, _______, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX}, KC_LPRN, KC_CIRC, KC_PERC, KC_DLR, KC_RPRN, _______, _______, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX,
{KC_LBRC, KC_HASH, KC_AT, KC_EXLM, KC_RBRC, _______, _______, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______}, KC_LBRC, KC_HASH, KC_AT, KC_EXLM, KC_RBRC, _______, _______, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______,
{_______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, _______, _______, _______, _______, _______}, _______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, _______, _______, _______, _______, _______
}, ),
/* Left Shift /* Left Shift
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -91,12 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC |[LSFT]| TAB | BSPC | - | LEFT | DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC |[LSFT]| TAB | BSPC | - | LEFT | DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_LSHIFT] = { [_LSHIFT] = LAYOUT_planck_grid(
{S(KC_Q), S(KC_D), S(KC_R), S(KC_W), S(KC_B), _______, _______, S(KC_J), S(KC_F), S(KC_U), S(KC_P), S(KC_SCLN)}, S(KC_Q), S(KC_D), S(KC_R), S(KC_W), S(KC_B), _______, _______, S(KC_J), S(KC_F), S(KC_U), S(KC_P), S(KC_SCLN),
{S(KC_A), S(KC_S), S(KC_H), S(KC_T), S(KC_G), _______, _______, S(KC_Y), S(KC_N), S(KC_E), S(KC_O), S(KC_I) }, S(KC_A), S(KC_S), S(KC_H), S(KC_T), S(KC_G), _______, _______, S(KC_Y), S(KC_N), S(KC_E), S(KC_O), S(KC_I),
{S(KC_Z), S(KC_X), S(KC_M), S(KC_C), S(KC_V), _______, _______, S(KC_K), S(KC_L), KC_SLSH, S(KC_SLSH), S(TD_QUOT)}, S(KC_Z), S(KC_X), S(KC_M), S(KC_C), S(KC_V), _______, _______, S(KC_K), S(KC_L), KC_SLSH, S(KC_SLSH), S(TD_QUOT),
{_______, _______, _______, _______, _______, _______, KC_DEL, KC_MINS, KC_LEFT, _______, _______, _______ }, _______, _______, _______, _______, _______, _______, KC_DEL, KC_MINS, KC_LEFT, _______, _______, _______
}, ),
/* Right Shift /* Right Shift
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -109,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | _ | TAB | BSPC |[RSFT]| LEFT | DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC | _ | TAB | BSPC |[RSFT]| LEFT | DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_RSHIFT] = { [_RSHIFT] = LAYOUT_planck_grid(
{S(KC_Q), S(KC_D), S(KC_R), S(KC_W), S(KC_B), _______, _______, S(KC_J), S(KC_F), S(KC_U), S(KC_P), S(KC_SCLN)}, S(KC_Q), S(KC_D), S(KC_R), S(KC_W), S(KC_B), _______, _______, S(KC_J), S(KC_F), S(KC_U), S(KC_P), S(KC_SCLN),
{S(KC_A), S(KC_S), S(KC_H), S(KC_T), S(KC_G), _______, _______, S(KC_Y), S(KC_N), S(KC_E), S(KC_O), S(KC_I) }, S(KC_A), S(KC_S), S(KC_H), S(KC_T), S(KC_G), _______, _______, S(KC_Y), S(KC_N), S(KC_E), S(KC_O), S(KC_I),
{S(KC_Z), S(KC_X), S(KC_M), S(KC_C), S(KC_V), _______, _______, S(KC_K), S(KC_L), KC_GRV, S(KC_GRV), S(TD_QUOT)}, S(KC_Z), S(KC_X), S(KC_M), S(KC_C), S(KC_V), _______, _______, S(KC_K), S(KC_L), KC_GRV, S(KC_GRV), S(TD_QUOT),
{_______, _______, _______, _______, S(KC_MINS), _______, KC_DEL, _______, KC_LEFT, _______, _______, _______ }, _______, _______, _______, _______, S(KC_MINS), _______, KC_DEL, _______, KC_LEFT, _______, _______, _______
}, ),
/* Left Number /* Left Number
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -127,12 +117,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | 0 | . | u | i | * | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | 0 | . | u | i |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_NUMBER] = { [_NUMBER] = LAYOUT_planck_grid(
{XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, _______, _______, KC_E, KC_7, KC_8, KC_9, KC_F}, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, _______, _______, KC_E, KC_7, KC_8, KC_9, KC_F,
{XXXXXXX, S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, _______, _______, KC_C, KC_4, KC_5, KC_6, KC_D}, XXXXXXX, S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, _______, _______, KC_C, KC_4, KC_5, KC_6, KC_D,
{XXXXXXX, KC_X, KC_B, KC_LBRC, KC_RBRC, _______, _______, KC_A, KC_1, KC_2, KC_3, KC_B}, XXXXXXX, KC_X, KC_B, KC_LBRC, KC_RBRC, _______, _______, KC_A, KC_1, KC_2, KC_3, KC_B,
{_______, _______, _______, _______, KC_LSFT, _______, _______, KC_RSFT, KC_0, KC_DOT, KC_U, KC_I}, _______, _______, _______, _______, KC_LSFT, _______, _______, KC_RSFT, KC_0, KC_DOT, KC_U, KC_I
}, ),
/* Game /* Game
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -145,12 +135,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | LEFT | DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | LEFT | DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_GAME] = { [_GAME] = LAYOUT_planck_grid(
{KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH}, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH,
{KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
{KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_SPC, MO(_FUNCTION), KC_B, KC_N, KC_M, KC_COMM, KC_DOT }, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_SPC, MO(_FUNCTION), KC_B, KC_N, KC_M, KC_COMM, KC_DOT
}, ),
/* Function /* Function
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -163,16 +153,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | LEFT | DOWN | UP | RGHT | * | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | LEFT | DOWN | UP | RGHT |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_FUNCTION] = { [_FUNCTION] = LAYOUT_planck_grid(
{DEFAULT, GAME, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12 }, DEFAULT, GAME, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12,
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8 }, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4 }, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4,
{_______, _______, _______, _______, KC_LSFT, _______, _______, KC_RSFT, KC_LEFT, _______, _______, _______}, _______, _______, _______, _______, KC_LSFT, _______, _______, KC_RSFT, KC_LEFT, _______, _______, _______
}, ),
};
const uint16_t PROGMEM fn_actions[] = {
}; };
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)