diff options
author | Eric <22215921+ericywl@users.noreply.github.com> | 2018-04-30 23:22:02 +0800 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-04-30 08:22:02 -0700 |
commit | 187d76476ec8bbf066b367956dc3d4f9fdba69a9 (patch) | |
tree | 85f57f9e86a62680d136e5a1151310dae3b78524 /keyboards/jd45/keymaps | |
parent | 43e589aa02379ec932ce530fa7c3e7e918eae7cb (diff) |
QMK Configurator Support for JD45 and JD40 (#2851)
* Added JD45 Config
* Added JD40 Config
* Changed KEYMAP to LAYOUT for JD40 and JD45
Diffstat (limited to 'keyboards/jd45/keymaps')
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/config.h | 2 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/keymap.c | 409 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/default/keymap.c | 12 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/jeebak/config.h | 2 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/jeebak/keymap.c | 539 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/justin/keymap.c | 94 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/mjt/keymap.c | 105 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/mjt6u/keymap.c | 198 |
8 files changed, 697 insertions, 664 deletions
diff --git a/keyboards/jd45/keymaps/blakedietz/config.h b/keyboards/jd45/keymaps/blakedietz/config.h index 6667d6fa1d..38d850ef6e 100644 --- a/keyboards/jd45/keymaps/blakedietz/config.h +++ b/keyboards/jd45/keymaps/blakedietz/config.h @@ -3,7 +3,7 @@ /** *JD45 keymap definition macro */ -#define KEYMAP_JD45( \ +#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, \ diff --git a/keyboards/jd45/keymaps/blakedietz/keymap.c b/keyboards/jd45/keymaps/blakedietz/keymap.c index 1b1d0817e6..bde760a223 100644 --- a/keyboards/jd45/keymaps/blakedietz/keymap.c +++ b/keyboards/jd45/keymaps/blakedietz/keymap.c @@ -1,4 +1,4 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -19,28 +19,30 @@ extern keymap_config_t keymap_config; // TODO: (bdietz) - make a symbol layer for greek symbols // Keycodes -enum planck_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + LOWER, + RAISE, }; -enum macro_keycodes { - KC_ALT_TAB, - KC_CMD_TAB, - KC_CTL_TAB, - KC_CMD_SLSH, - KC_AG_FIND, - KC_AG_AGAIN, - KC_AG_UNDO, - KC_AG_CUT, - KC_AG_COPY, - KC_AG_PASTE, - KC_AG_DESK_L, - KC_AG_DESK_R, - KC_AG_TAB_C, - KC_AG_TAB_N, - KC_AG_TAB_R, +enum macro_keycodes +{ + KC_ALT_TAB, + KC_CMD_TAB, + KC_CTL_TAB, + KC_CMD_SLSH, + KC_AG_FIND, + KC_AG_AGAIN, + KC_AG_UNDO, + KC_AG_CUT, + KC_AG_COPY, + KC_AG_PASTE, + KC_AG_DESK_L, + KC_AG_DESK_R, + KC_AG_TAB_C, + KC_AG_TAB_N, + KC_AG_TAB_R, }; // Fillers to make layering more clear @@ -55,36 +57,36 @@ enum macro_keycodes { * - will fire z if tapped * - will fire cmd/super/win if held */ -#define ALT_DOT ALT_T(KC_DOT) -#define ALT_X ALT_T(KC_X) -#define CTL_SLSH CTL_T(KC_SLSH) -#define CTL_Z CTL_T(KC_Z) -#define GUI_C GUI_T(KC_C) -#define GUI_COMM GUI_T(KC_COMM) -#define HPR_ESC ALL_T(KC_ESC) -#define HPR_QUO ALL_T(KC_QUOT) +#define ALT_DOT ALT_T(KC_DOT) +#define ALT_X ALT_T(KC_X) +#define CTL_SLSH CTL_T(KC_SLSH) +#define CTL_Z CTL_T(KC_Z) +#define GUI_C GUI_T(KC_C) +#define GUI_COMM GUI_T(KC_COMM) +#define HPR_ESC ALL_T(KC_ESC) +#define HPR_QUO ALL_T(KC_QUOT) // Toggle to VIM when left space button is held, emit space keycode when left space is tapped -#define TGL_VIM LT(_VIM, KC_SPC) +#define TGL_VIM LT(_VIM, KC_SPC) // Toggle to the mouse layer when the right space button is held and emit enter when right space is tapped -#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT) +#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT) // TODO: (bdietz) - need to audit these keycodes to see what sort of cool things the default layout was doing. -#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab -#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab -#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab -#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) -#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings -#define AG_AGAIN M(KC_AG_AGAIN) -#define AG_UNDO M(KC_AG_UNDO) -#define AG_CUT M(KC_AG_CUT) -#define AG_COPY M(KC_AG_COPY) -#define AG_PASTE M(KC_AG_PASTE) -#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and -#define AG_D_R M(KC_AG_DESK_R) // Right -#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, -#define AG_T_N M(KC_AG_TAB_N) // Tab New, and -#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed +#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab +#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab +#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab +#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) +#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings +#define AG_AGAIN M(KC_AG_AGAIN) +#define AG_UNDO M(KC_AG_UNDO) +#define AG_CUT M(KC_AG_CUT) +#define AG_COPY M(KC_AG_COPY) +#define AG_PASTE M(KC_AG_PASTE) +#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and +#define AG_D_R M(KC_AG_DESK_R) // Right +#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, +#define AG_T_N M(KC_AG_TAB_N) // Tab New, and +#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed /* Qwerty * @@ -99,19 +101,19 @@ enum macro_keycodes { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - 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), -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - HPR_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO, -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M,GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______ , _______ , LOWER , TGL_VIM , TGL_MOUSE , RAISE , _______ , _______ , _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_QWERTY] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + 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), + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, LOWER, TGL_VIM, TGL_MOUSE, RAISE, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row -/* Lower + // TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row + /* Lower * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -122,18 +124,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_LOWER] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - 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, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_RBRC , CTL_T(KC_F7), ALT_T(KC_F8),GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL) , ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_LOWER] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + 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, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_RBRC, CTL_T(KC_F7), ALT_T(KC_F8), GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL), ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Raise + /* Raise * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -144,18 +146,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_RAISE] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - 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, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_EQL , CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1 ,GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_RAISE] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + 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, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_EQL, CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1, GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Mouse Layer + /* Mouse Layer * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -167,18 +169,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_MOUSECURSOR] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_MOUSECURSOR] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Adjust (Lower + Raise) + /* Adjust (Lower + Raise) * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | Del | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -189,19 +191,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Reset | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_ADJUST] = KEYMAP_JD45( + [_ADJUST] = LAYOUT_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* VIM + /* VIM * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -212,18 +214,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_VIM] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______,_______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_VIM] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Media + /* Media * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -234,53 +236,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_MEDIA] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______) -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_MEDIA] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ }; -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +void persistant_default_layer_set(uint16_t default_layer) +{ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { case QWERTY: - if (record->event.pressed) { - default_layer_set(1UL<<_QWERTY); - } - return false; - break; + if (record->event.pressed) + { + default_layer_set(1UL << _QWERTY); + } + return false; + break; case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; + if (record->event.pressed) + { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + else + { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; + if (record->event.pressed) + { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + else + { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; } /* @@ -288,54 +300,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (!eeconfig_is_enabled()) { - eeconfig_init(); + if (!eeconfig_is_enabled()) + { + eeconfig_init(); } - bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. + bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: // quantum/quantum.c - if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { - use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. + if (keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) + { + use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. } - switch (id) { - case KC_ALT_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - case KC_CMD_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } + switch (id) + { + case KC_ALT_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + case KC_CMD_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } - case KC_CTL_TAB: - return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END )); - case KC_CMD_SLSH: - return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END )); + case KC_CTL_TAB: + return (record->event.pressed ? MACRO(D(LCTRL), D(TAB), END) : MACRO(U(TAB), END)); + case KC_CMD_SLSH: + return (record->event.pressed ? MACRO(D(LGUI), D(SLSH), END) : MACRO(U(SLSH), END)); - case KC_AG_FIND: - return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END ); - case KC_AG_AGAIN: - return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END ); - case KC_AG_UNDO: - return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END ); - case KC_AG_CUT: - return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END ); - case KC_AG_COPY: - return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END ); - case KC_AG_PASTE: - return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END ); + case KC_AG_FIND: + return use_cmd ? MACRODOWN(D(LGUI), T(F), END) : MACRODOWN(D(LCTRL), T(F), END); + case KC_AG_AGAIN: + return use_cmd ? MACRODOWN(D(LGUI), T(G), END) : MACRODOWN(D(LCTRL), T(G), END); + case KC_AG_UNDO: + return use_cmd ? MACRODOWN(D(LGUI), T(Z), END) : MACRODOWN(D(LCTRL), T(Z), END); + case KC_AG_CUT: + return use_cmd ? MACRODOWN(D(LGUI), T(X), END) : MACRODOWN(D(LCTRL), T(X), END); + case KC_AG_COPY: + return use_cmd ? MACRODOWN(D(LGUI), T(C), END) : MACRODOWN(D(LCTRL), T(C), END); + case KC_AG_PASTE: + return use_cmd ? MACRODOWN(D(LGUI), T(V), END) : MACRODOWN(D(LCTRL), T(V), END); - case KC_AG_DESK_L: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END ); - case KC_AG_DESK_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END ); + case KC_AG_DESK_L: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(SCLN), END) : MACRODOWN(D(LALT), D(LCTRL), T(SCLN), END); + case KC_AG_DESK_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(QUOT), END) : MACRODOWN(D(LALT), D(LCTRL), T(QUOT), END); - case KC_AG_TAB_C: - return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END ); - case KC_AG_TAB_N: - return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END ); - case KC_AG_TAB_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END ); + case KC_AG_TAB_C: + return use_cmd ? MACRODOWN(D(LGUI), T(W), END) : MACRODOWN(D(LCTRL), T(W), END); + case KC_AG_TAB_N: + return use_cmd ? MACRODOWN(D(LGUI), T(T), END) : MACRODOWN(D(LCTRL), T(T), END); + case KC_AG_TAB_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LSHIFT), T(T), END) : MACRODOWN(D(LCTRL), D(LSHIFT), T(T), END); } return MACRO_NONE; diff --git a/keyboards/jd45/keymaps/default/keymap.c b/keyboards/jd45/keymaps/default/keymap.c index 95abb1505c..0bb519f5fc 100644 --- a/keyboards/jd45/keymaps/default/keymap.c +++ b/keyboards/jd45/keymaps/default/keymap.c @@ -1,15 +1,15 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H /* this keymap is to provide a basic keyboard layout for testing the matrix * for more practical and complicated keymap refer to other keymaps in the same folder */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, E, R, T, Y, U, I, O, P, QUOT, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT ), + [0] = LAYOUT( + ESC, Q, W, E, R, T, Y, U, I, O, P, QUOT, BSPC, + TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, + PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/jd45/keymaps/jeebak/config.h b/keyboards/jd45/keymaps/jeebak/config.h index 53a1f0a307..bfaa128937 100644 --- a/keyboards/jd45/keymaps/jeebak/config.h +++ b/keyboards/jd45/keymaps/jeebak/config.h @@ -3,7 +3,7 @@ /** *JD45 keymap definition macro */ -#define KEYMAP_JD45( \ +#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, \ diff --git a/keyboards/jd45/keymaps/jeebak/keymap.c b/keyboards/jd45/keymaps/jeebak/keymap.c index 0da114a1ed..c711939fcf 100644 --- a/keyboards/jd45/keymaps/jeebak/keymap.c +++ b/keyboards/jd45/keymaps/jeebak/keymap.c @@ -1,4 +1,4 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -17,33 +17,35 @@ extern keymap_config_t keymap_config; #define _ADJUST 16 // Keycodes -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV }; -enum macro_keycodes { - KC_ALT_TAB, - KC_CMD_TAB, - KC_CTL_TAB, - KC_CMD_SLSH, - KC_AG_FIND, - KC_AG_AGAIN, - KC_AG_UNDO, - KC_AG_CUT, - KC_AG_COPY, - KC_AG_PASTE, - KC_AG_DESK_L, - KC_AG_DESK_R, - KC_AG_TAB_C, - KC_AG_TAB_N, - KC_AG_TAB_R, +enum macro_keycodes +{ + KC_ALT_TAB, + KC_CMD_TAB, + KC_CTL_TAB, + KC_CMD_SLSH, + KC_AG_FIND, + KC_AG_AGAIN, + KC_AG_UNDO, + KC_AG_CUT, + KC_AG_COPY, + KC_AG_PASTE, + KC_AG_DESK_L, + KC_AG_DESK_R, + KC_AG_TAB_C, + KC_AG_TAB_N, + KC_AG_TAB_R, }; // Fillers to make layering more clear @@ -51,29 +53,29 @@ enum macro_keycodes { #define XXXXXXX KC_NO // Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper -#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI -#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper +#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI +#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt // Requires KC_TRNS/_______ for the trigger key in the destination layer -#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor -#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor -#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab -#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab -#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab -#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) -#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings -#define AG_AGAIN M(KC_AG_AGAIN) -#define AG_UNDO M(KC_AG_UNDO) -#define AG_CUT M(KC_AG_CUT) -#define AG_COPY M(KC_AG_COPY) -#define AG_PASTE M(KC_AG_PASTE) -#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and -#define AG_D_R M(KC_AG_DESK_R) // Right -#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, -#define AG_T_N M(KC_AG_TAB_N) // Tab New, and -#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed +#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab +#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab +#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab +#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) +#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings +#define AG_AGAIN M(KC_AG_AGAIN) +#define AG_UNDO M(KC_AG_UNDO) +#define AG_CUT M(KC_AG_CUT) +#define AG_COPY M(KC_AG_COPY) +#define AG_PASTE M(KC_AG_PASTE) +#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and +#define AG_D_R M(KC_AG_DESK_R) // Right +#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, +#define AG_T_N M(KC_AG_TAB_N) // Tab New, and +#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed /* Qwerty * @@ -89,18 +91,18 @@ enum macro_keycodes { */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - CTL_ESC , KC_A, KC_S,LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, |