1
0
Fork 0

JD45: blakedietz keymap refactor

- config.h
  - updated to more-preferred format
  - layout macro LAYOUT_JD45 removed (identical to new macro LAYOUT)
- keymap.c
  - updated to use macro LAYOUT
  - redundant KC_TRNS and KC_NO definitions removed
This commit is contained in:
noroadsleft 2018-10-25 23:38:45 -07:00 committed by MechMerlin
parent 39addf8bc9
commit 899731679d
2 changed files with 9 additions and 28 deletions

View File

@ -1,19 +1,4 @@
#include "../../config.h"
/**
*JD45 keymap definition macro
*/
#define LAYOUT_JD45( \
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, K40, K41, K42, K43, K44, K45, K46, K47 \
) { \
{ 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, KC_NO }, \
{ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \
{ K38, K39, K40, K41, K42, KC_NO, K43, KC_NO, K44, K45, K46, K47, KC_NO } \
}
#pragma once
/**
* This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when
@ -28,4 +13,4 @@
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 5
#define MOUSEKEY_MAX_SPEED 2
#define MOUSEKEY_WHEEL_DELAY 0
#define MOUSEKEY_WHEEL_DELAY 0

View File

@ -45,10 +45,6 @@ enum macro_keycodes
KC_AG_TAB_R,
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
/**
* This section of macros is for tap or hold functionality. Keys will fire off the second symbol in the name if tapped
* or fire the first symbol in the name if held. For example
@ -101,7 +97,7 @@ enum macro_keycodes
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_JD45(
[_QWERTY] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ALL_T(KC_NO),
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
@ -124,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_LOWER] = LAYOUT_JD45(
[_LOWER] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
@ -146,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_RAISE] = LAYOUT_JD45(
[_RAISE] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
@ -169,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_MOUSECURSOR] = LAYOUT_JD45(
[_MOUSECURSOR] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
@ -191,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | Reset |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_ADJUST] = LAYOUT_JD45(
[_ADJUST] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
@ -214,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_VIM] = LAYOUT_JD45(
[_VIM] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
@ -236,7 +232,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_MEDIA] = LAYOUT_JD45(
[_MEDIA] = LAYOUT(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/