summaryrefslogtreecommitdiffstats
path: root/keyboards/jd45/keymaps/mjt6u/keymap.c
diff options
context:
space:
mode:
authornoroadsleft <xxiinophobia@yahoo.com>2018-10-26 00:03:00 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2018-10-26 07:03:46 -0700
commitca02863b569fb9a3bf21967942567149b562e2be (patch)
tree3ed71df901a33ae284e6ed6a1c9823a008d3b43f /keyboards/jd45/keymaps/mjt6u/keymap.c
parentdb8454ca99b58c31ea25954b4ca513d38e5b8c72 (diff)
JD45: mjt6u keymap refactor
- config.h - updated to remove redundancies - add #pragma once - keymap.c - updated to use macro LAYOUT - redundant KC_TRNS and KC_NO definitions removed
Diffstat (limited to 'keyboards/jd45/keymaps/mjt6u/keymap.c')
-rw-r--r--keyboards/jd45/keymaps/mjt6u/keymap.c62
1 files changed, 49 insertions, 13 deletions
diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c
index c17a07fd04..4c0b8828a5 100644
--- a/keyboards/jd45/keymaps/mjt6u/keymap.c
+++ b/keyboards/jd45/keymaps/mjt6u/keymap.c
@@ -25,25 +25,61 @@ enum jd45_keycodes
#define LONGPRESS_DELAY 150
#define LAYER_TOGGLE_DELAY 900
-#define _______ KC_TRNS
#define __MOD__ KC_TRNS
-#define XXXXXXX KC_NO
#define F_FNSPC F(0)
#define F_NUMSPC F(1)
#define F_FNTAB F(2)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = {
- {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
- {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
- {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST)}},
- [_QWERTYNUMMODS] = {{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST)}},
- [_NUMSYM] = {{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL}, {__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______}, {_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
- [_FUNCTION] = {{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
- [_NUMPAD] = {{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC}, {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______}, {_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
- [_FKEYNUMPAD] = {{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______}, {_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______}, {_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
- [_ADJUST] = {{_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______}, {_______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______}, {_______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}};
+ [_QWERTY] = LAYOUT( \
+ F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC, \
+ CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT), \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
+ XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, MO(_FUNCTION), MO(_ADJUST), XXXXXXX \
+ ),
+
+ [_QWERTYNUMMODS] = LAYOUT( \
+ F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC, \
+ CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT), \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
+ XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST), XXXXXXX \
+ ),
+
+ [_NUMSYM] = LAYOUT( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL, \
+ __MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
+ _______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, \
+ XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
+ ),
+
+ [_FUNCTION] = LAYOUT( \
+ __MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ __MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
+ ),
+
+ [_NUMPAD] = LAYOUT( \
+ KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC, \
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______, \
+ _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______, \
+ XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
+ ),
+
+ [_FKEYNUMPAD] = LAYOUT( \
+ _______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______, \
+ _______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______, \
+ _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______, \
+ XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
+ ),
+
+ [_ADJUST] = LAYOUT( \
+ _______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______, \
+ _______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______, \
+ XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, __MOD__, __MOD__, XXXXXXX \
+ )
+};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),