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/mjt | |
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/mjt')
-rw-r--r-- | keyboards/jd45/keymaps/mjt/keymap.c | 105 |
1 files changed, 53 insertions, 52 deletions
diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c index 610552ecfa..a53b09642a 100644 --- a/keyboards/jd45/keymaps/mjt/keymap.c +++ b/keyboards/jd45/keymaps/mjt/keymap.c @@ -1,33 +1,34 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H /* Mike's Layout for JD45 with backlight LEDs acting as layer indicator */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, - FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, - FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ), -[1] = KEYMAP( -GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, -TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, -TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, -TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ), -[2] = KEYMAP( -TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, -TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, -TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, -TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS ) -/* , -[3] = KEYMAP( + [0] = LAYOUT( + TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, + FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, + FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, + NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO), + [1] = LAYOUT( + GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, + TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, + TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, + TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS), + [2] = LAYOUT( + TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, + TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, + TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, + TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS) + /* , +[3] = LAYOUT( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/ }; -enum macro_id { +enum macro_id +{ M_LAYER1, M_LAYER2 }; @@ -38,43 +39,43 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_MACRO(M_LAYER1), [2] = ACTION_LAYER_TAP_TOGGLE(2), [3] = ACTION_BACKLIGHT_STEP(), - [4] = ACTION_BACKLIGHT_TOGGLE() -}; + [4] = ACTION_BACKLIGHT_TOGGLE()}; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case M_LAYER1: - // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality - // action_function_tap may also handle this... - if (record->event.pressed) - { - breathing_period_set(3); - breathing_enable(); - layer_on(1); - } - else - { - breathing_period_set(1); - breathing_self_disable(); - layer_off(1); - } + // MACRODOWN only works in this function + switch (id) + { + case M_LAYER1: + // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality + // action_function_tap may also handle this... + if (record->event.pressed) + { + breathing_period_set(3); + breathing_enable(); + layer_on(1); + } + else + { + breathing_period_set(1); + breathing_self_disable(); + layer_off(1); + } break; - case M_LAYER2: - if (record->event.pressed) - { - breathing_period_set(2); - breathing_pulse(); - layer_on(2); - } - else - { - breathing_period_set(1); - breathing_self_disable(); - layer_off(2); - } + case M_LAYER2: + if (record->event.pressed) + { + breathing_period_set(2); + breathing_pulse(); + layer_on(2); + } + else + { + breathing_period_set(1); + breathing_self_disable(); + layer_off(2); + } break; - } + } return MACRO_NONE; }; |