diff options
author | lokher <lokher@gmail.com> | 2022-12-06 17:04:10 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-12-06 17:04:10 +0800 |
commit | 27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch) | |
tree | 7ac943fb1ba4f430a7220efd18f66f6a77205c30 /keyboards/thevankeyboards/minivan/keymaps | |
parent | e736133392fe6427cfb995da0787337189828272 (diff) | |
parent | 2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff) |
Merge upstream master
Diffstat (limited to 'keyboards/thevankeyboards/minivan/keymaps')
11 files changed, 5712 insertions, 0 deletions
diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c new file mode 100644 index 0000000000..fb86bda7a9 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c @@ -0,0 +1,225 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DV 0 +#define _NM 1 +#define _NV 2 +#define _MN 3 +#define _FN 4 + +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define NM_SP LT(_NM, KC_SPC) +#define NV_SP LT(_NV, KC_SPC) +#define MN_EN LT(_MN, KC_ENT) +#define FN_EX LT(_FN, KC_ESC) + +// Curly braces have their own keys. These are defined to make them not mess up +// the grid in layer 2. +#define L_CURB LSFT(KC_LBRC) +#define R_CURB LSFT(KC_RBRC) + +// Hypers +#define HYP0 HYPR(KC_0) +#define HYP1 HYPR(KC_1) +#define HYP2 HYPR(KC_2) +#define HYP3 HYPR(KC_3) +#define HYP4 HYPR(KC_4) +#define HYP5 HYPR(KC_5) +#define HYP6 HYPR(KC_6) +#define HYP7 HYPR(KC_7) +#define HYP8 HYPR(KC_8) +#define HYP9 HYPR(KC_9) + +// MEH +#define MEH0 MEH(KC_0) +#define MEH1 MEH(KC_1) +#define MEH2 MEH(KC_2) +#define MEH3 MEH(KC_3) +#define MEH4 MEH(KC_4) +#define MEH5 MEH(KC_5) +#define MEH6 MEH(KC_6) +#define MEH7 MEH(KC_7) +#define MEH8 MEH(KC_8) +#define MEH9 MEH(KC_9) + +// CAG +#define CAG0 LCAG(KC_0) +#define CAG1 LCAG(KC_1) +#define CAG2 LCAG(KC_2) +#define CAG3 LCAG(KC_3) +#define CAG4 LCAG(KC_4) +#define CAG5 LCAG(KC_5) +#define CAG6 LCAG(KC_6) +#define CAG7 LCAG(KC_7) +#define CAG8 LCAG(KC_8) +#define CAG9 LCAG(KC_9) + +// ALTS +#define ALT0 LALT(KC_0) +#define ALT1 LALT(KC_1) +#define ALT2 LALT(KC_2) +#define ALT3 LALT(KC_3) +#define ALT4 LALT(KC_4) +#define ALT5 LALT(KC_5) +#define ALT6 LALT(KC_6) +#define ALT7 LALT(KC_7) +#define ALT8 LALT(KC_8) +#define ALT9 LALT(KC_9) +#define ALTX LALT(KC_GRV) +#define ALTL LALT(KC_LEFT) +#define ALTR LALT(KC_RIGHT) +#define ALTESC LALT(KC_ESC) +#define ALTEQL LALT(KC_EQL) +#define ALTMIN LALT(KC_MINS) + +// BACK AND FORWARD +#define XBACK LGUI(LALT(KC_LEFT)) +#define XFFWD LGUI(LALT(KC_RIGHT)) + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + SWTCH +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* DVORAK + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | TAB | ' | , | . | P | Y | F | G | C | R | L | BACKSPACE | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | LCTL | A | O | E | U | I | D | H | T | N | S | MN/ENTER | + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | LSHFT | ; | Q | J | K | X | B | M | W | V | Z | RSHFT | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * | FN EX | GUI | ALT | NM / SPACE | NV / SPACE | RALT | - | = | ESC | + * `---------+----------+----------+-----^^^------+----^^^-----+-------+-------+-------+-------' + */ + [_DV] = LAYOUT_arrow( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MN_EN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + FN_EX, KC_LGUI, KC_LALT, NM_SP, NV_SP, KC_RALT, KC_MINS, KC_EQL, KC_ESC + ), + + + +/* NUMBERS + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | DELETE | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | LCTL | ! | @ | [ | { | ( | ) | } | ] | | | ? | ENTER | + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | LSFT | ` | ~ | # | $ | % | ^ | & | * | _ | + | = | + * | LSFT | ` | ~ | # | $ | % | ^ | & | * | _ | + | / | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * | | GUI | LALT |-----TRNS-----| SPACE | RALT | - | = | \ | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + */ + [_NM] = LAYOUT_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_LBRC, L_CURB, KC_LPRN, KC_RPRN, R_CURB, KC_RBRC, KC_PIPE, KC_QUES, _______, + _______, KC_GRV, KC_TILD, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_SLSH, + _______, _______, _______, _______, KC_SPC, _______, KC_MINS, KC_EQL, KC_BSLS + ), + + + +/* NAVIGATION + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | ESC | MWU | MWL | MU | MWR | MPRV | MNXT | HOME | UP | END | PGUP | DELETE | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | LCTL | MWD | ML | MD | MR | MRWD | MFFD | LEFT | DOWN | RIGHT| PGDN | MB2 | + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | LSFT | HYP1 | HYP2 | HYP3 | HYP4 | HYP5 | HYP6 | HYP7 | HYP8 | HYP9 | HYP0 | VOLUP | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * | | GUI | LALT | MB1 |----TRNS----| MUTE | PLAY | STOP | VOLDN | + * `---------+----------+----------+-----^^^------+----^^^-----+-------+-------+-------+-------' + */ + [_NV] = LAYOUT_arrow( + KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, KC_MPRV, KC_MNXT, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_DEL, + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_MRWD, KC_MFFD, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_BTN2, + _______, HYP1, HYP2, HYP3, HYP4, HYP5, HYP6, HYP7, HYP8, HYP9, HYP0, KC_VOLU, + _______, _______, _______, KC_BTN1, _______, KC_MUTE, KC_MPLY, KC_MSTP, KC_VOLD + ), + + + +/* MODIFIED NUMBERS + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | ALTESC | CAG1 | CAG2 | CAG3 | CAG4 | CAG5 | CAG6 | CAG7 | CAG8 | CAG9 | CAG0 | SWTCH | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | ALT ` | ALT1 | ALT2 | ALT3 | ALT4 | ALT5 | ALT6 | ALT7 | ALT8 | ALT9 | ALT0 |----TRNS---| + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | ALT = | MEH1 | MEH2 | MEH3 | MEH4 | MEH5 | MEH6 | MEH7 | MEH8 | MEH9 | MEH0 | | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * | ALT - | | XBACK | ALT LEFT | ALT RIGHT | XFFWD | | | | + * `---------+----------+----------+-----^^^------+----^^^-----+-------+-------+-------+-------' + */ + [_MN] = LAYOUT_arrow( + ALTESC, CAG1, CAG2, CAG3, CAG4, CAG5, CAG6, CAG7, CAG8, CAG9, CAG0, SWTCH, + ALTX, ALT1, ALT2, ALT3, ALT4, ALT5, ALT6, ALT7, ALT8, ALT9, ALT0, _______, + ALTEQL, MEH1, MEH2, MEH3, MEH4, MEH5, MEH6, MEH7, MEH8, MEH9, MEH0, XXXXXXX, + ALTMIN, XXXXXXX, XBACK, ALTL, ALTR, XFFWD, XXXXXXX, XXXXXXX, XXXXXXX + ), + + + +/* FUNCTIONS + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DELETE | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | LCTL | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | LSFT | | | | | | | | | | | | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * |---TRNS---| CAPS | LALT | | SWTCH | RALT | | QK_BOOT |--TRNS-| + * `---------+----------+----------+-----^^^------+----^^^-----+-------+-------+-------+-------' + */ + [_FN] = LAYOUT_arrow( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR, KC_SLEP, KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_CAPS, _______, XXXXXXX, SWTCH, KC_RALT, XXXXXXX, QK_BOOT, _______ + ) + + + +/* Transparent placeholder for more layers + * ,---------+------+------+------+------+------+------+------+------+------+------+------------. + * | | | | | | | | | | | | | + * |---------`------`------`------`------`------`------`------`------`------`------`------------| + * | | | | | | | | | | | | | + * |----------`------`------`------`------`------`------`------`------`------`------`-----------| + * | | | | | | | | | | | | | + * |-----------`------`------`------`------`------`-------`------`------`------`------`---------| + * | | | | | | | | | | + * `---------+----------+----------+-----^^^------+----^^^-----+-------+-------+-------+-------' + */ +// [_TR] = LAYOUT_arrow( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case SWTCH: + SEND_STRING(SS_DOWN(X_LGUI)); + SEND_STRING(SS_DOWN(X_LSFT)); + SEND_STRING(SS_TAP(X_ENTER)); + SEND_STRING(SS_UP(X_LSFT)); + SEND_STRING(SS_UP(X_LGUI)); + return false; + } + } + return true; +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c new file mode 100644 index 0000000000..0600856660 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +#define _QW 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 +#define _L4 4 + +#define LT4_TAB LT(_L4, KC_TAB) +#define LT3_ESC LT(_L3, KC_ESC) + +enum custom_keycodes { + QW = SAFE_RANGE, + L1, + L2, + L3, + L4 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_arrow( /* Qwerty */ + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), LT(4,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), SC_SENT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_L2,KC_ENT), LT(_L1,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_L1] = LAYOUT_arrow( /* LAYER 1 */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DELETE, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + [_L2] = LAYOUT_arrow( /* LAYER 2 */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, + KC_DELETE, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [_L3] = LAYOUT_arrow( /* LAYER 3 */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, KC_MUTE, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + [_L4] = LAYOUT_arrow( /* LAYER 4 */ + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_M_P, RGB_HUD, RGB_HUI, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, _______, RGB_SAD, RGB_SAI, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, + QK_BOOT, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______ + ) +};
\ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c new file mode 100644 index 0000000000..ae3619859a --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_arrow_command( /* Qwerty */ + QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MT(MOD_RSFT, KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, MO(3), LT(1, KC_SPC), LT(1, KC_SPC), MO(4), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_arrow_command( /* LAYER 2 */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_arrow_command( /* LAYER 1 */ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + [3] = LAYOUT_arrow_command( /* LAYER 3 */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [4] = LAYOUT_arrow_command( /* Gaming Layer*/ + KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, + KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(5, KC_SLSH), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [5] = LAYOUT_arrow_command( /* QK_BOOT Layer*/ + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + // Set up RGB effects on _only_ the third LED (index 2) + rgblight_set_effect_range(2, 1); + // Set LED effects to breathing mode in a tealish blue color + rgblight_sethsv_noeeprom(185, 255, 255); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); + + // Init the first two LEDs to a static color + setrgb(0, 0, 0, (LED_TYPE *)&led[0]); + setrgb(0, 0, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE +} + +layer_state_t layer_state_set_user(layer_state_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led0r = 0; uint8_t led0g = 0; uint8_t led0b = 0; + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + + if (layer_state_cmp(state, 1)) { + led0r = 255; + } + if (layer_state_cmp(state, 2)) { + led0g = 255; + } + + if (layer_state_cmp(state, 4)) { + led1b = 255; + } + if (layer_state_cmp(state, 5)) { + led1r = 255; + } + + setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]); + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c new file mode 100644 index 0000000000..b54af62011 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c @@ -0,0 +1,409 @@ +/* + * License (GPL): + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + + * Author: © 2020 by Jos Boersema + * + */ + +// --------------------------------------v--------------------------------------- +// Configuration: +// --------------------------------------v--------------------------------------- + +// See the user configuration file: ./base_numpad.h + +// --------------------------------------^--------------------------------------- +// Below here no more comfortable configuration options..... +// --------------------------------------^--------------------------------------- + +// This is moved into ./user_config.h, because global #defines are affected. +//((#include "./base_numpad.h" // Pull in the user configuration)) + + /* ⬇ */ + + /* Layer _..._BASE: default BASE layer (Dvorak) + * + * This thing is different from the usual different letters arrangement. + * It is a numbers pad, one for the left hand, and one for the right + * hand. Both are as identical as possible. The use case is the same as + * a number pad keyboard: single handed numbers input. + * + * The number 5 is under the middle finger home row, as expected for blind + * number pad typing. + * + * The left/upper key, where normally BASE is located, is now OTHER_BASE. + * That switches the board to the ‛Default’ layout, which is effectively the + * same way as a return to BASE in the sense of BASE being the letters/layer + * switch layer. “Other Base” reached from the normal letters/layer-switching + * BASE layout will then turn the keyboard into these number pads layers. + * + * A modified Numbers&Symbols layer _NSY is still supplied with this Numbers + * Pad layout (as with other Base layers). + * + * The standard numbers pad layer _PAD also still exists. That one has the + * numbers arranged differently. + * + */ + +// When putting this layer on ‛Default’, it produced undesired side effects: +// • _RAR and _MOV hold keys on the ‛Alternate’ letters layer, failed to switch back. +// • Parts of the Numbers Pad keys got activated through transparent layer switch keys on letters layer. +// Since there is no use for Numpad on ‛Default’ Base anyway, this is simply not supported, which seems to solve the problem. + + +# ifndef NUMPAD_BASE_SINGLE + + [ _ALT_BASE ] = LAYOUT_redefined ( + +/* + Layer _..._BASE (Number pad, square layout) + + <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2> + <|> + !AlterGo Bspc 7 8 9 - | Bspc 7 8 9 - Bspc //!AlterGo: to _DEF_BASE + = * 4 5 6 + | * 4 5 6 + = + _NSY¹ / 1 2 3 , | / 1 2 3 , _NSY¹ + ------------------------------------------------------------------------ + xxx 0 . Ent | NumL 0 . Ent + <|> + <1 ± <2 <3 <4 | 4> 3> ± 2> 1> + … | …² + + Layer _..._BASE (Number pad, with NumLock off) + + <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring >pin>pink2> + <|> + !AlterGo Bspc Home Up PgUp - | Bspc Home Up PgUp - Bspc //!AlterGo: to _DEF_BASE + = * Left 5 Right + | * Left 5 Right + = // modified 5 + _NSY¹ / End Down PgDn , | / End Down PgDn , _NSY¹ + ------------------------------------------------------------------------- + xxx Ins Del Ent | NumL Ins Del Ent + <|> + <1 ± <2 <3 <4 | 4> 3> ± 2> 1> + … | …² + + ₁) Toggle to the accompanying Super-Sub-Script (_NSY) layer. + ₂) Note anomaly: additional hardware key ‛arrow’ shifted one to the left. + +*/ +// +// <pink2 , <pinky , <ring , <middl , <indx , <ind|, indx> , inde> , midd> , ring> , pink> , pink2> , +// -*!- , , , , , <|,> , , , , , , + OTHER_BASE_GO , KC_BSPC , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC , + KC_KP_EQUAL , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_KP_EQUAL , + CTO_NUMS , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , CTO_NUMS , +// ------------------------------------------------------------------------------------------------------------------------------------------------------- + XXXXXXX + +# ifdef TRANSMINIVAN_LEFTSIDE + , TRANS_LEFT +# endif + +# ifdef MORE_KEY__COMMAND + , MORE_key1 // Note anomaly, not MORE_key1_BASE: numpad is treated as a common layer here, because that is ± how it functions. +# endif + + , KC_KP_0 , KC_KP_DOT , KC_KP_ENTER + +# ifdef TRANSMINIVAN_MIDLEFT + , TRANS_MIDLEFT +# endif + + , KC_NUM , KC_KP_0 +// ---⬇ +// Note anomaly: the additional 'arrow' hardware key is shifted one to the +// left, compared to other Base layouts, and so is TRANS_RIGHT This is to +// maintain 'window/command' key on the same key between layers. + +# ifdef TRANSMINIVAN_RIGHTSIDE + , TRANS_RIGHT +# endif + +# ifdef MORE_KEY__ARROW + + //, MORE_key2 + , KC__YGUI + +// Note anomaly: not the usual configurable key (MORE_key2), but GUI. This +// is because position has shifted already, and this GUI allows all the usual +// keys on a 100% keyboard to be reached with all modifiers, including GUIs, +// if 'command' hardware key is included. Unfortunately this causes a gap +// in the numpad layout, but pressing GUI by itself in error will unlikely +// produce serious mistakes. Maintaining similar keys between layers seems +// more important. Since Numpad already is a navigation cluster, it seems +// more important to allow all keys to be reachable with all modifiers, +// including GUIs, than to have a quick switch over to the _MOV layer here. +// Obviously it is fair enough to do this differently, but if someone needs a +// Numpad + either GUI key combination, that could be a real problem without +// GUIs here, whereas adding a _MOV switch is a matter of convenience. It +// seems important to be able to type anything a regular 100% keyboard can, +// or as near to it as possible. +// +// These anomalies are the same for all the Numpad layers here. + +# endif +// ---⬆ + , KC_KP_DOT + + , KC_KP_ENTER +// , , , <|,> , , , +// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1> + + ), + + /* ⬆⬇ */ + + /* Layer _ALT_NSY: super-/sub-script numbers numpad, square layout + */ + + [ _ALT_NSY ] = LAYOUT_redefined ( + +/* + Layer _..._BASE (super-/sub-script numbers, Numlock on/off) + + <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2> + <|> + BASE Bspc ⁷₇ ⁸₈ ⁹₉ - | Bspc ⁷₇ ⁸₈ ⁹₉ - Bspc + = * ⁴₄ ⁵₅ ⁶₆ + | * ⁴₄ ⁵₅ ⁶₆ + = + LSht / ¹₁ ²₂ ³₃ , | / ¹₁ ²₂ ³₃ , RSht + -*- <|> -*- //(toggle) Access on Base + ------------------------------------------------------------------------ + xxx ⁰₀ .DEL Ent | xxx ⁰₀ .DEL Ent + <|> + <1 ± <2 <3 <4 | 4> 3> ± 2> 1> + … | …¹ + + ₁) Note anomaly: additional hardware key ‛arrow’ shifted one to the left. + +*/ +//High/low numbers guide: +//¹₁ ²₂ ³₃ ⁴₄ ⁵₅ | ⁶₆ ⁷₇ ⁸₈ ⁹₉ ⁰₀ +//XP_DRA_BA XP_DRA_BB XP_DRA_BC XP_DRA_BD XP_DRA_BE XP_DRA_BF XP_DRA_BG XP_DRA_BH XP_DRA_BI XP_DRA_BJ +// +// <pink2 , <pinky , <ring , <middl , <indx , <ind|, indx> , inde> , midd> , ring> , pink> , pink2> , +// -*!- , , , , , <|,> , , , , , , + CTO_BASE , KC_BSPC , XP_DRA_BG , XP_DRA_BH , XP_DRA_BI , KC_KP_MINUS , KC_BSPC , XP_DRA_BG , XP_DRA_BH , XP_DRA_BI , KC_KP_MINUS , KC_BSPC , + KC_KP_EQUAL , KC_KP_ASTERISK , XP_DRA_BD , XP_DRA_BE , XP_DRA_BF , KC_KP_PLUS , KC_KP_ASTERISK , XP_DRA_BD , XP_DRA_BE , XP_DRA_BF , KC_KP_PLUS , KC_KP_EQUAL , + KC_LSFT , KC_KP_SLASH , XP_DRA_BA , XP_DRA_BB , XP_DRA_BC , KC_KP_COMMA , KC_KP_SLASH , XP_DRA_BA , XP_DRA_BB , XP_DRA_BC , KC_KP_COMMA , KC_RSFT , +// ----------------------------------------------------------------------------------------------------------------------------------------------------------------- + XXXXXXX + +# ifdef TRANSMINIVAN_LEFTSIDE + , TRANS_LEFT +# endif + +# ifdef MORE_KEY__COMMAND + , MORE_key1 +# endif + + , XP_DRA_BJ , KC_KP_DOT , KC_KP_ENTER + +# ifdef TRANSMINIVAN_MIDLEFT + , TRANS_MIDLEFT +# endif + + , XXXXXXX , XP_DRA_BJ + +// See comment on the first layout in this file (double handed Base layer), about the next few keys: +// ---⬇ + +# ifdef TRANSMINIVAN_RIGHTSIDE + , TRANS_RIGHT +# endif + +# ifdef MORE_KEY__ARROW + //, MORE_key2 + , KC__YGUI +# endif +// ---⬆ + , KC_KP_DOT + + , KC_KP_ENTER +// , , , <|,> , , , +// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1> + + ), + + /* ⬆⬇ */ + +# else // NUMPAD_BASE_SINGLE is defined ==================================================================== + + [ _ALT_BASE ] = LAYOUT_redefined ( + +/* + + * Layer Numbers Pad on Base: + * « See also documentation in keymap.c at _PAD layer, of which this is almost entirely a copy » + * One difference is the key to go to the _ALT_NSY layer (denoted “NUMS:” just below). + * The other difference is the key to switch to default Base and also immediately goes there + * (denoted “!AlterGo” here). + + Layer _ALT_BASE (Number pad, with NumLock on) + + <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2> + <|> + !AlterGo NUMS: xxx xxx xxx xxx | = 7 8 9 - Bspc // NUMS: to ¹/₁ + LCtl xxx xxx xxx xxx xxx | * 4 5 6 + RCtl + LSht xxx xxx xxx xxx xxx | / 1 2 3 , RSht + ------------------------------------------------------------------------ + LAlt Del Tab Ent | NumL 0 . RAlt + <|> + <1 ± <2 <3 <4 | 4> 3> ± 2> 1> + … | …¹ + + Layer _ALT_BASE (Number pad, with NumLock off) + + <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring >pin>pink2> + <|> + !AlterGo NUMS: xxx xxx xxx xxx | = Home Up PgUp - Bspc // NUMS: to ¹/₁ + LCtl xxx xxx xxx xxx xxx | * Left 5 Right + RCtl // modified 5 + LSht xxx xxx xxx xxx xxx | / End Down PgDn , RSht + ------------------------------------------------------------------------- + LAlt Del Tab Ent | NumL Ins Del RAlt + <|> + <1 ± <2 <3 <4 | 4> 3> ± 2> 1> + … | …¹ + + ₁) Note anomaly: additional hardware key ‛arrow’ shifted one to the left. + +*/ + +//High/low numbers guide: +//¹₁ ²₂ ³₃ ⁴₄ ⁵₅ | ⁶₆ ⁷₇ ⁸₈ ⁹₉ ⁰₀ +//XP_DRA_BA XP_DRA_BB XP_DRA_BC XP_DRA_BD XP_DRA_BE XP_DRA_BF XP_DRA_BG XP_DRA_BH XP_DRA_BI XP_DRA_BJ +// +// <pink2 , <pinky , <ring , <middl , <index , <indx2 |, indx2> , index> , middl> , ring> , pinky> , pink2> , +// , , , , , -*- <|,> , , , , , , + OTHER_BASE_GO , CTO_NUMS , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_EQUAL , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC , + KC_LCTL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_RCTL , + KC_LSFT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , KC_RSFT , +// ------------------------------------------------------------------------------------------------------------------------------------ + KC_LALT + +# ifdef TRANSMINIVAN_LEFTSIDE + , TRANS_LEFT +# endif + +# ifdef MORE_KEY__COMMAND + , MORE_key1 +# endif + + , KC_DEL , KC_TAB , KC_KP_ENTER + +# ifdef TRANSMINIVAN_MIDLEFT + , TRANS_MIDLEFT +# endif< |