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

View File

@ -1,240 +1,58 @@
{ {
"keyboard_name": "Chimera Ortho",
"keyboard_folder": "chimera_ortho",
"maintainer": "qmk", "maintainer": "qmk",
"width": 15.5, "width": 15.5,
"height": 4.25, "height": 4.25,
"layouts": { "layouts": {
"KEYMAP": { "LAYOUT": {
"layout": [ "layout": [
{ {"label": "Esc", "x": 0, "y": 0},
"label": "Esc", {"label": "Q", "x": 1, "y": 0},
"x": 0, {"label": "W", "x": 2, "y": 0},
"y": 0 {"label": "E", "x": 3, "y": 0},
}, {"label": "R", "x": 4, "y": 0},
{ {"label": "T", "x": 5, "y": 0},
"label": "Q", {"label": "{", "x": 6, "y": 0},
"x": 1, {"label": "}", "x": 8.5, "y": 0},
"y": 0 {"label": "Y", "x": 9.5, "y": 0},
}, {"label": "U", "x": 10.5, "y": 0},
{ {"label": "I", "x": 11.5, "y": 0},
"label": "W", {"label": "O", "x": 12.5, "y": 0},
"x": 2, {"label": "P", "x": 13.5, "y": 0},
"y": 0 {"label": "\"", "x": 14.5, "y": 0},
}, {"label": "Tab", "x": 0, "y": 1},
{ {"label": "A", "x": 1, "y": 1},
"label": "E", {"label": "S", "x": 2, "y": 1},
"x": 3, {"label": "D", "x": 3, "y": 1},
"y": 0 {"label": "F", "x": 4, "y": 1},
}, {"label": "G", "x": 5, "y": 1},
{ {"label": "-", "x": 6, "y": 1},
"label": "R", {"label": "1", "x": 8.5, "y": 1},
"x": 4, {"label": "H", "x": 9.5, "y": 1},
"y": 0 {"label": "J", "x": 10.5, "y": 1},
}, {"label": "K", "x": 11.5, "y": 1},
{ {"label": "L", "x": 12.5, "y": 1},
"label": "T", {"label": ";", "x": 13.5, "y": 1},
"x": 5, {"label": "Enter", "x": 14.5, "y": 1},
"y": 0 {"label": "(", "x": 0, "y": 2},
}, {"label": "Z", "x": 1, "y": 2},
{ {"label": "X", "x": 2, "y": 2},
"label": "{", {"label": "C", "x": 3, "y": 2},
"x": 6, {"label": "V", "x": 4, "y": 2},
"y": 0 {"label": "B", "x": 5, "y": 2},
}, {"label": "=", "x": 6, "y": 2},
{ {"label": "8", "x": 8.5, "y": 2},
"label": "}", {"label": "N", "x": 9.5, "y": 2},
"x": 8.5, {"label": "M", "x": 10.5, "y": 2},
"y": 0 {"label": ", ", "x": 11.5, "y": 2},
}, {"label": ".", "x": 12.5, "y": 2},
{ {"label": "/", "x": 13.5, "y": 2},
"label": "Y", {"label": ")", "x": 14.5, "y": 2},
"x": 9.5, {"label": "Num Layer", "x": 4, "y": 3.25},
"y": 0 {"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": "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 enum chimera_ortho_layers
{ {
@ -34,7 +34,7 @@ enum chimera_ortho_layers
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 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 , , , , , , , , , ,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 , ,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 , , ,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 style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard, // 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. // 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. // 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 // Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers. // entirely and just use numbers.
enum chimera_ortho_layers enum chimera_ortho_layers {
{ _QWERTY,
_QWERTY, _CAPS,
_CAPS, _NUMPAD,
_NUMPAD, _SYMBOLS,
_SYMBOLS, _MACROS,
_MACROS, _NAV
_NAV
}; };
#define KC_NMPD TG(_NUMPAD) #define KC_NMPD TG(_NUMPAD)
@ -27,153 +26,140 @@ enum chimera_ortho_layers
#define KC_GBRC MT(MOD_RGUI, KC_8) #define KC_GBRC MT(MOD_RGUI, KC_8)
#define KC_GQOT MT(MOD_LGUI, KC_QUOT) #define KC_GQOT MT(MOD_LGUI, KC_QUOT)
#define KC_MESC LT(_MACROS, KC_ESC) #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 KC_CAD LALT(LCTL(KC_DEL))
#define LONGPRESS_DELAY 150 enum custom_keycodes {
//#define LAYER_TOGGLE_DELAY 300 KC_INCL = SAFE_RANGE,
KC_PULL,
// Fillers to make layering more clear KC_PUSH,
#define _______ KC_TRNS KC_SCAP,
#define XXXXXXX KC_NO KC_SCOF
#define KC_ KC_TRNS };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KC_KEYMAP( [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
MESC, Q , W , E , R , T ,SCTL, SCTR, Y , U , I , O , P ,QUOT, 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,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
TAB , A , S , D , F , G ,SPLT, SPRT, H , J , K , L ,SCLN,ENT , 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 ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
LSPO, Z , X , C , V , B ,SPFN, GBRC, N , M ,COMM,DOT ,SLSH,RSPC, 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,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
NMPD,BSPC, SPC ,SYMB KC_NMPD,KC_BSPC, KC_SPC ,KC_SYMB
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
), ),
[_CAPS] = KC_KEYMAP( [_CAPS] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, , , , , , , , , , , , , , _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , , , ,UNDS, , , , , ,COLN, , _______,_______,_______,_______,_______,_______,KC_UNDS, _______,_______,_______,_______,_______,KC_COLN,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
SCOF, , , , , , , , , , , , ,SCOF, KC_SCOF,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,KC_SCOF,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , _______,_______, _______,_______
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
), ),
[_NUMPAD] = KC_KEYMAP( [_NUMPAD] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, ,COLN , , , , , , , 7 , 8 , 9 ,ASTR,MINS, _______,_______,KC_COLN,_______,_______,_______,_______, _______,_______, KC_7 , KC_8 , KC_9 ,KC_ASTR,KC_MINS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, ,DOT , , , , , , , 4 , 5 , 6 ,PLUS, , _______,_______,KC_DOT ,_______,_______,_______,_______, _______,_______, KC_4 , KC_5 , KC_6 ,KC_PLUS,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , , , , , , , 1 , 2 , 3 ,SLSH, , _______,_______,_______,_______,_______,_______,_______, _______,_______, KC_1 , KC_2 , KC_3 ,KC_SLSH,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , 0 _______,_______, _______, KC_0
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
), ),
[_SYMBOLS] = KC_KEYMAP( [_SYMBOLS] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS, _______,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC,_______, _______,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSLS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, F1 , F2 , F3 , F4 , F5 , , ,TILD,COLN,UNDS,LCBR,RCBR, , _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 ,_______, _______,KC_TILD,KC_COLN,KC_UNDS,KC_LCBR,KC_RCBR,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, F6 , F7 , F8 , F9 ,F10 , , ,GRV ,SCLN,MINS,LBRC,RBRC, , _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,_______, _______,KC_GRV ,KC_SCLN,KC_MINS,KC_LBRC,KC_RBRC,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
PIPE, , , KC_PIPE,_______, _______,_______
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
), ),
[_NAV] = KC_KEYMAP( [_NAV] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, , , , , , , , , , UP , ,PSCR, , _______,_______,_______,_______,_______,_______,_______, _______,_______,_______, KC_UP ,_______,KC_PSCR,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , , , , , , ,LEFT,DOWN,RGHT, , , _______,_______,_______,_______,_______,_______,_______, _______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , , , , , , ,PGUP,PGDN, , , , _______,_______,_______,_______,_______,_______,_______, _______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
,DEL , , _______,KC_DEL , _______,_______
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
), ),
[_MACROS] = KC_KEYMAP( [_MACROS] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
, , , , , , , , , ,INCL, , , , _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,KC_INCL,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , ,CAD , , , , , , , , , , , _______,_______,_______,KC_CAD ,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
SCAP, , , , , , , , , ,PULL,PUSH, ,SCAP, KC_SCAP,_______,_______,_______,_______,_______,_______, _______,_______,_______,KC_PULL,KC_PUSH,_______,KC_SCAP,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
, , , _______,_______, _______,_______
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------------------+-------+-------+------/ \------+-------+-------+------------------------------/
) )
}; };
const uint16_t PROGMEM fn_actions[] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
/* include some kind of library or header */ /* include some kind of library or header */
case 0: case KC_INCL:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("#include <>"); SEND_STRING("#include <>" SS_TAP(X_LEFT));
return MACRO( T(LEFT), END);
} }
break; return false;
case 1: case KC_PULL:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("git pull"); SEND_STRING("git pull" SS_TAP(X_ENTER));
return MACRO( T(ENT), END );
} }
break; return false;
case 2: case KC_PUSH:
if (record->event.pressed){ if (record->event.pressed){
SEND_STRING("git push"); SEND_STRING("git push" SS_TAP(X_ENTER));
return MACRO( T(ENT), END );
} }
break; return false;
case 3: case KC_SCAP:
if (record->event.pressed){ if (record->event.pressed){
layer_on(_CAPS); layer_on(_CAPS);
register_code(KC_CAPSLOCK); register_code(KC_CAPSLOCK);
unregister_code(KC_CAPSLOCK); unregister_code(KC_CAPSLOCK);
} }
break; return false;
case 4: case KC_SCOF:
if (record->event.pressed){ if (record->event.pressed){
layer_off(_CAPS); layer_off(_CAPS);
register_code(KC_CAPSLOCK); register_code(KC_CAPSLOCK);
unregister_code(KC_CAPSLOCK); unregister_code(KC_CAPSLOCK);
} }
break; return false;
} }
return MACRO_NONE; return true;
}; };
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
switch (layer) { switch (layer) {
case _QWERTY: case _QWERTY:
set_led_green; set_led_green;
break; break;
case _CAPS: case _CAPS:
set_led_white; set_led_white;
break; break;
case _NUMPAD: case _NUMPAD:
set_led_blue; set_led_blue;
break; break;
@ -181,11 +167,11 @@ void matrix_scan_user(void) {
set_led_red; set_led_red;
break; break;
case _NAV: case _NAV:
set_led_magenta; set_led_magenta;
break; break;
case _MACROS: case _MACROS:
set_led_cyan; set_led_cyan;
break; break;
default: default:
set_led_green; set_led_green;
break; break;

View File

@ -1,10 +1,8 @@
// this is the style you want to emulate. // 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, // 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
#include "action_layer.h"
#include "version.h" #include "version.h"
#include "process_keycode/process_tap_dance.h"
#include "gordon.h" #include "gordon.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below. // Each layer gets a name for readability, which is then used in the keymap matrix below.
@ -83,11 +81,9 @@
//#define LAYER_TOGGLE_DELAY 300 //#define LAYER_TOGGLE_DELAY 300
// Fillers to make layering more clear // Fillers to make layering more clear
#define _______ KC_TRNS #define KC_ KC_TRNS
#define XXXXXXX KC_NO
#define KC_ KC_TRNS
/* TODO: /* TODO:
* *
* DONE: RESET and CAD into macro layer. * DONE: RESET and CAD into macro layer.
* DONE: WINUP AND WINDOWN in NAV layer * DONE: WINUP AND WINDOWN in NAV layer
@ -113,7 +109,7 @@
* Russain layer * Russain layer
* Hebrew layer * Hebrew layer
* Get rid of stupid git pull and push macros. * Get rid of stupid git pull and push macros.
* *
*/ */
//Tap dance enums //Tap dance enums
@ -127,14 +123,14 @@ enum {
CALC_PRINTSCREEN CALC_PRINTSCREEN
}; };
static xtap ttt_state = { static xtap ttt_state = {
.is_press_action = true, .is_press_action = true,
.state = 0 .state = 0
}; };
//Already exists in gordon.c, shouldn't need this anymore //Already exists in gordon.c, shouldn't need this anymore
/*// To activate SINGLE_HOLD, you will need to hold for 200ms first. /*// To activate SINGLE_HOLD, you will need to hold for 200ms first.
// This tap dance favors keys that are used frequently in typing like 'f' // This tap dance favors keys that are used frequently in typing like 'f'
int cur_dance (qk_tap_dance_state_t *state) { int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) { if (state->count == 1) {
@ -151,8 +147,8 @@ int cur_dance (qk_tap_dance_state_t *state) {
else if (state->count == 2) { else if (state->count == 2) {
if (state->interrupted) return DOUBLE_SINGLE_TAP; if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD; else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP; else return DOUBLE_TAP;
} }
else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP;
else if (state->count == 3) return TRIPLE_HOLD; else if (state->count == 3) return TRIPLE_HOLD;
else return 8; //magic number. At some point this method will expand to work for more presses else return 8; //magic number. At some point this method will expand to work for more presses
@ -194,7 +190,7 @@ void TTT_reset (qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
// simple tap dance // simple tap dance
[F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))),
[CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER),
[CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR), [CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR),
[ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)),
@ -206,7 +202,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, 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,/**/, , , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -226,11 +222,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, , , , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , 0 , , , 0
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
), ),
[_SYMBOLS] = KC_KEYMAP( [_SYMBOLS] = LAYOUT_kc(
//,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----. //,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----.
,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/, ,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 ,/**/, F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -250,11 +246,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , , , , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , ,
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
), ),
[_NAV] = KC_KEYMAP( [_NAV] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , , , ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -262,11 +258,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , , , ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
CDEL ,DEL, , CDEL ,DEL, ,
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
), ),
[_TEXTNAV] = KC_KEYMAP( [_TEXTNAV] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , , , , , , , , ,/**/, , , , , , , , , , , , , ,/**/, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -274,11 +270,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , , , , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , ,
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
), ),
[_MOUSE] = KC_KEYMAP( [_MOUSE] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
, , ,MS_UP, , , , , , , UP , , , ,/**/ , , ,MS_UP, , , , , , , UP , , , ,/**/
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -286,12 +282,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , , , , , , , , , , , , , , , , , , , , , , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
,MS_BTN1 ,MS_BTN2 , ,MS_BTN1 ,MS_BTN2 ,
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
), ),
[_MACROS] = KC_KEYMAP( [_MACROS] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
/**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , , /**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
@ -299,7 +295,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
SCAP, , , , , , , , , , , , ,SCAP, SCAP, , , , , , , , , , , , ,SCAP,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , , , , ,
// \------------------+----+----+---/ \---+----+----+-------------------/ // \------------------+----+----+---/ \---+----+----+-------------------/
) )
@ -349,11 +345,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
return MACRO_NONE; return MACRO_NONE;
}; };
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
switch (layer) { switch (layer) {
case _QWERTY: case _QWERTY:
set_led_green; set_led_green;
@ -381,7 +377,7 @@ void matrix_scan_user(void) {
_delay_ms(45); _delay_ms(45);
set_led_blue; set_led_blue;
_delay_ms(45); _delay_ms(45);
break; break;
default: default:
set_led_green; set_led_green;
break; break;