Keyboard: Chimera Ortho refactor (#4652)

* Layout macro refactor

- Renamed KC_KEYMAP to LAYOUT_kc
- Renamed KEYMAP to LAYOUT
- moved LAYOUT above LAYOUT_kc (Hoping this encourages users to use LAYOUT.)
- updated layout macro name in info.json
- white space changes for readability

* Keymap refactor: default

Default keymap now uses `#include QMK_KEYBOARD_H` and LAYOUT macro (from KC_KEYMAP/LAYOUT_kc). Keymap was also refactored to use process_record_user function instead of deprecated action_get_macro from TMK.

Also moved LONGPRESS_DELAY and LAYER_TOGGLE_DELAY definitions to config.h.

* Keymap refactor: dcompact

- Changed chimera_ortho.h include for QMK_KEYBOARD_H
- Updated layout name on keymap layers

* Coding conventions fix in default keymap

* Keymap refactor: gordon

- Changed chimera_ortho.h include for QMK_KEYBOARD_H
- Removed redundant includes of action_layer.h and process_tap_dance.h (superseded by QMK_KEYBOARD_H)
- Removed redundant definitions for KC_NO and KC_TRNS
- Updated layout name on keymap layers
This commit is contained in:
noroadsleft 2018-12-14 21:36:03 -08:00 committed by Drashna Jaelre
parent 8f790948e5
commit 45591ee443
6 changed files with 206 additions and 400 deletions

View file

@ -49,31 +49,32 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KC_KEYMAP( \
#define LAYOUT( \
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, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
k45, k46, k47, k48 \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \
k45, k46, k47, k48 \
) \
{ \
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO }, \
{ k01, k02, k03, k04, k05, k08, k09, k10, k11, k12 }, \
{ k15, k16, k17, k18, k19, k22, k23, k24, k25, k26 }, \
{ k29, k31, k32, k33, k34, k37, k38, k41, k42, k43 }, \
{ KC_NO, k06, k20, k35, k46, k47, k36, k21, k07, KC_NO }, \
{ KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO } \
}
#define KEYMAP( \
#define LAYOUT_kc( \
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, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
k45, k46, k47, k48 \
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \
k45, k46, k47, k48 \
) \
{ \
{ k01, k02, k03, k04, k05, k08, k09, k10, k11, k12 }, \
{ k15, k16, k17, k18, k19, k22, k23, k24, k25, k26 }, \
{ k29, k31, k32, k33, k34, k37, k38, k41, k42, k43 }, \
{ KC_NO, k06, k20, k35, k46, k47, k36, k21, k07, KC_NO }, \
{ KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO }, \
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO } \
}
#endif

View file

@ -1,240 +1,58 @@
{
"keyboard_name": "Chimera Ortho",
"keyboard_folder": "chimera_ortho",
"maintainer": "qmk",
"width": 15.5,
"height": 4.25,
"layouts": {
"KEYMAP": {
"LAYOUT": {
"layout": [
{
"label": "Esc",
"x": 0,
"y": 0
},
{
"label": "Q",
"x": 1,
"y": 0
},
{
"label": "W",
"x": 2,
"y": 0
},
{
"label": "E",
"x": 3,
"y": 0
},
{
"label": "R",
"x": 4,
"y": 0
},
{
"label": "T",
"x": 5,
"y": 0
},
{
"label": "{",
"x": 6,
"y": 0
},
{
"label": "}",
"x": 8.5,
"y": 0
},
{
"label": "Y",
"x": 9.5,
"y": 0
},
{
"label": "U",
"x": 10.5,
"y": 0
},
{
"label": "I",
"x": 11.5,
"y": 0
},
{
"label": "O",
"x": 12.5,
"y": 0
},
{
"label": "P",
"x": 13.5,
"y": 0
},
{
"label": "\"",
"x": 14.5,
"y": 0
},
{
"label": "Tab",
"x": 0,
"y": 1
},
{
"label": "A",
"x": 1,
"y": 1
},
{
"label": "S",
"x": 2,
"y": 1
},
{
"label": "D",
"x": 3,
"y": 1
},
{
"label": "F",
"x": 4,
"y": 1
},
{
"label": "G",
"x": 5,
"y": 1
},
{
"label": "-",
"x": 6,
"y": 1
},
{
"label": "1",
"x": 8.5,
"y": 1
},
{
"label": "H",
"x": 9.5,
"y": 1
},
{
"label": "J",
"x": 10.5,
"y": 1
},
{
"label": "K",
"x": 11.5,
"y": 1
},
{
"label": "L",
"x": 12.5,
"y": 1
},
{
"label": ";",
"x": 13.5,
"y": 1
},
{
"label": "Enter",
"x": 14.5,
"y": 1
},
{
"label": "(",
"x": 0,
"y": 2
},
{
"label": "Z",
"x": 1,
"y": 2
},
{
"label": "X",
"x": 2,
"y": 2
},
{
"label": "C",
"x": 3,
"y": 2
},
{
"label": "V",
"x": 4,
"y": 2
},
{
"label": "B",
"x": 5,
"y": 2
},
{
"label": "=",
"x": 6,
"y": 2
},
{
"label": "8",
"x": 8.5,
"y": 2
},
{
"label": "N",
"x": 9.5,
"y": 2
},
{
"label": "M",
"x": 10.5,
"y": 2
},
{
"label": ",",
"x": 11.5,
"y": 2
},
{
"label": ".",
"x": 12.5,
"y": 2
},
{
"label": "/",
"x": 13.5,
"y": 2
},
{
"label": ")",
"x": 14.5,
"y": 2
},
{
"label": "Num Layer",
"x": 4,
"y": 3.25
},
{
"label": "Back Space",
"x": 5,
"y": 3.25
},
{
"label": "Space",
"x": 9.5,
"y": 3.25
},
{
"label": "Symbol Layer",
"x": 10.5,
"y": 3.25
}
{"label": "Esc", "x": 0, "y": 0},
{"label": "Q", "x": 1, "y": 0},
{"label": "W", "x": 2, "y": 0},
{"label": "E", "x": 3, "y": 0},
{"label": "R", "x": 4, "y": 0},
{"label": "T", "x": 5, "y": 0},
{"label": "{", "x": 6, "y": 0},
{"label": "}", "x": 8.5, "y": 0},
{"label": "Y", "x": 9.5, "y": 0},
{"label": "U", "x": 10.5, "y": 0},
{"label": "I", "x": 11.5, "y": 0},
{"label": "O", "x": 12.5, "y": 0},
{"label": "P", "x": 13.5, "y": 0},
{"label": "\"", "x": 14.5, "y": 0},
{"label": "Tab", "x": 0, "y": 1},
{"label": "A", "x": 1, "y": 1},
{"label": "S", "x": 2, "y": 1},
{"label": "D", "x": 3, "y": 1},
{"label": "F", "x": 4, "y": 1},
{"label": "G", "x": 5, "y": 1},
{"label": "-", "x": 6, "y": 1},
{"label": "1", "x": 8.5, "y": 1},
{"label": "H", "x": 9.5, "y": 1},
{"label": "J", "x": 10.5, "y": 1},
{"label": "K", "x": 11.5, "y": 1},
{"label": "L", "x": 12.5, "y": 1},
{"label": ";", "x": 13.5, "y": 1},
{"label": "Enter", "x": 14.5, "y": 1},
{"label": "(", "x": 0, "y": 2},
{"label": "Z", "x": 1, "y": 2},
{"label": "X", "x": 2, "y": 2},
{"label": "C", "x": 3, "y": 2},
{"label": "V", "x": 4, "y": 2},
{"label": "B", "x": 5, "y": 2},
{"label": "=", "x": 6, "y": 2},
{"label": "8", "x": 8.5, "y": 2},
{"label": "N", "x": 9.5, "y": 2},
{"label": "M", "x": 10.5, "y": 2},
{"label": ", ", "x": 11.5, "y": 2},
{"label": ".", "x": 12.5, "y": 2},
{"label": "/", "x": 13.5, "y": 2},
{"label": ")", "x": 14.5, "y": 2},
{"label": "Num Layer", "x": 4, "y": 3.25},
{"label": "Back Space", "x": 5, "y": 3.25},
{"label": "Space", "x": 9.5, "y": 3.25},
{"label": "Symbol Layer", "x": 10.5, "y": 3.25}
]
}
}

View file

@ -1,4 +1,4 @@
#include "chimera_ortho.h"
#include QMK_KEYBOARD_H
enum chimera_ortho_layers
{
@ -34,7 +34,7 @@ enum chimera_ortho_layers
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = KC_KEYMAP(
[_BASE] = LAYOUT_kc(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
LALT ,TAB ,QUOT ,COMM ,DOT ,P ,Y ,F ,G ,C ,R ,L ,SLSH ,FUNC
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
),
[_NAV] = KC_KEYMAP(
[_NAV] = LAYOUT_kc(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, , , , , , , ,HOME ,PGDOWN ,PGUP ,END , ,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
),
[_SYM] = KC_KEYMAP(
[_SYM] = LAYOUT_kc(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
,QUAKE ,GRAVE ,TILDE ,BSLASH ,PIPE ,LPRN ,RPRN ,7 ,8 ,9 ,SLSH ,EQUAL ,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
),
[_FUNC] = KC_KEYMAP(
[_FUNC] = LAYOUT_kc(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
,RESET ,SLEP ,MRWD ,MPLY ,MFFD , , ,F9 ,F10 ,F11 ,F12 , ,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
),
[_MOUSE] = KC_KEYMAP(
[_MOUSE] = LAYOUT_kc(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, , , , , , , , , , , , ,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|

View file

@ -0,0 +1,5 @@
#pragma once
// place overrides here
#define LONGPRESS_DELAY 150
//#define LAYER_TOGGLE_DELAY 300

View file

@ -1,20 +1,19 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "chimera_ortho.h"
#include QMK_KEYBOARD_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.
enum chimera_ortho_layers
{
_QWERTY,
_CAPS,
_NUMPAD,
_SYMBOLS,
_MACROS,
_NAV
enum chimera_ortho_layers {
_QWERTY,
_CAPS,
_NUMPAD,
_SYMBOLS,
_MACROS,
_NAV
};
#define KC_NMPD TG(_NUMPAD)
@ -27,140 +26,127 @@ enum chimera_ortho_layers
#define KC_GBRC MT(MOD_RGUI, KC_8)
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
#define KC_MESC LT(_MACROS, KC_ESC)
#define KC_INCL M(0)
#define KC_PULL M(1)
#define KC_PUSH M(2)
#define KC_SCAP M(3)
#define KC_SCOF M(4)
#define KC_CAD LALT(LCTL(KC_DEL))
#define LONGPRESS_DELAY 150
//#define LAYER_TOGGLE_DELAY 300
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define KC_ KC_TRNS
enum custom_keycodes {
KC_INCL = SAFE_RANGE,
KC_PULL,
KC_PUSH,
KC_SCAP,
KC_SCOF
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
MESC, Q , W , E , R , T ,SCTL, SCTR, Y , U , I , O , P ,QUOT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
TAB , A , S , D , F , G ,SPLT, SPRT, H , J , K , L ,SCLN,ENT ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSPO, Z , X , C , V , B ,SPFN, GBRC, N , M ,COMM,DOT ,SLSH,RSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
NMPD,BSPC, SPC ,SYMB
// \------------------+----+----+---/ \---+----+----+-------------------/
[_QWERTY] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
KC_MESC, KC_Q , KC_W , KC_E , KC_R , KC_T ,KC_SCTL, KC_SCTR, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_QUOT,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G ,KC_SPLT, KC_SPRT, KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_ENT ,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_SPFN, KC_GBRC, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSPC,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_NMPD,KC_BSPC, KC_SPC ,KC_SYMB
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
),
[_CAPS] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , ,UNDS, , , , , ,COLN, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
SCOF, , , , , , , , , , , , ,SCOF,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
[_CAPS] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,_______,_______,_______,_______,KC_UNDS, _______,_______,_______,_______,_______,KC_COLN,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_SCOF,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,KC_SCOF,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______, _______,_______
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
),
[_NUMPAD] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, ,COLN , , , , , , , 7 , 8 , 9 ,ASTR,MINS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, ,DOT , , , , , , , 4 , 5 , 6 ,PLUS, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , 1 , 2 , 3 ,SLSH, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , 0
// \------------------+----+----+---/ \---+----+----+-------------------/
[_NUMPAD] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
_______,_______,KC_COLN,_______,_______,_______,_______, _______,_______, KC_7 , KC_8 , KC_9 ,KC_ASTR,KC_MINS,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,KC_DOT ,_______,_______,_______,_______, _______,_______, KC_4 , KC_5 , KC_6 ,KC_PLUS,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,_______,_______,_______,_______,_______, _______,_______, KC_1 , KC_2 , KC_3 ,KC_SLSH,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______, _______, KC_0
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
),
[_SYMBOLS] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, F1 , F2 , F3 , F4 , F5 , , ,TILD,COLN,UNDS,LCBR,RCBR, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, F6 , F7 , F8 , F9 ,F10 , , ,GRV ,SCLN,MINS,LBRC,RBRC, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
PIPE, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
[_SYMBOLS] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
_______,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC,_______, _______,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSLS,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 ,_______, _______,KC_TILD,KC_COLN,KC_UNDS,KC_LCBR,KC_RCBR,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______, KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,_______, _______,KC_GRV ,KC_SCLN,KC_MINS,KC_LBRC,KC_RBRC,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_PIPE,_______, _______,_______
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
),
[_NAV] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , , UP , ,PSCR, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , ,LEFT,DOWN,RGHT, , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , ,PGUP,PGDN, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,DEL , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
[_NAV] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, KC_UP ,_______,KC_PSCR,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,KC_DEL , _______,_______
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
),
[_MACROS] = KC_KEYMAP(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , ,INCL, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,CAD , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
SCAP, , , , , , , , , ,PULL,PUSH, ,SCAP,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,
// \------------------+----+----+---/ \---+----+----+-------------------/
[_MACROS] = LAYOUT(
//,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,KC_INCL,_______,_______,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______,_______,KC_CAD ,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
KC_SCAP,_______,_______,_______,_______,_______,_______, _______,_______,_______,KC_PULL,KC_PUSH,_______,KC_SCAP,
//|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
_______,_______, _______,_______
// \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
/* include some kind of library or header */
case 0:
case KC_INCL:
if (record->event.pressed) {
SEND_STRING("#include <>");
return MACRO( T(LEFT), END);
SEND_STRING("#include <>" SS_TAP(X_LEFT));
}
break;
case 1:
return false;
case KC_PULL:
if (record->event.pressed) {
SEND_STRING("git pull");
return MACRO( T(ENT), END );
SEND_STRING("git pull" SS_TAP(X_ENTER));
}
break;
case 2:
return false;
case KC_PUSH:
if (record->event.pressed){
SEND_STRING("git push");
return MACRO( T(ENT), END );
SEND_STRING("git push" SS_TAP(X_ENTER));
}
break;
case 3:
return false;
case KC_SCAP:
if (record->event.pressed){
layer_on(_CAPS);
register_code(KC_CAPSLOCK);
unregister_code(KC_CAPSLOCK);
}
break;
case 4:
return false;
case KC_SCOF:
if (record->event.pressed){
layer_off(_CAPS);
register_code(KC_CAPSLOCK);
unregister_code(KC_CAPSLOCK);
}
break;
return false;
}
return MACRO_NONE;
return true;
};
@ -168,12 +154,12 @@ void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
switch (layer) {
case _QWERTY:
set_led_green;
break;
case _QWERTY:
set_led_green;
break;
case _CAPS:
set_led_white;
break;
set_led_white;
break;
case _NUMPAD:
set_led_blue;
break;
@ -181,11 +167,11 @@ void matrix_scan_user(void) {
set_led_red;
break;
case _NAV:
set_led_magenta;
break;
set_led_magenta;
break;
case _MACROS:
set_led_cyan;
break;
set_led_cyan;
break;
default:
set_led_green;
break;

View file

@ -1,10 +1,8 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "chimera_ortho.h"
#include "action_layer.h"
#include QMK_KEYBOARD_H
#include "version.h"
#include "process_keycode/process_tap_dance.h"
#include "gordon.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@ -83,8 +81,6 @@
//#define LAYER_TOGGLE_DELAY 300
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define KC_ KC_TRNS
/* TODO:
@ -206,7 +202,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KC_KEYMAP(
[_QWERTY] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -218,7 +214,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_NUMPAD] = KC_KEYMAP(
[_NUMPAD] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -230,7 +226,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_SYMBOLS] = KC_KEYMAP(
[_SYMBOLS] = LAYOUT_kc(
//,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----.
,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/,
//|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
@ -242,7 +238,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \-------------------+----+----+---/ \---+----+----+-------------------/
),
[_FUNCTION] = KC_KEYMAP(
[_FUNCTION] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -254,7 +250,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_NAV] = KC_KEYMAP(
[_NAV] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -266,7 +262,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_TEXTNAV] = KC_KEYMAP(
[_TEXTNAV] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , ,/**/, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -278,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// \------------------+----+----+---/ \---+----+----+-------------------/
),
[_MOUSE] = KC_KEYMAP(
[_MOUSE] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , ,MS_UP, , , , , , , UP , , , ,/**/
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -291,7 +287,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_MACROS] = KC_KEYMAP(
[_MACROS] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
/**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|