diff options
Diffstat (limited to 'keyboards/amj60/keymaps/iso_split_rshift/keymap.c')
| -rw-r--r-- | keyboards/amj60/keymaps/iso_split_rshift/keymap.c | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c new file mode 100644 index 000000000..60fb0bfb0 --- /dev/null +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 2 | // this is the style you want to emulate. | ||
| 3 | |||
| 4 | #include "amj60.h" | ||
| 5 | |||
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | #define _DEF 0 | ||
| 11 | #define _SPC 1 | ||
| 12 | #define _TAB 2 | ||
| 13 | #define _SFX 3 | ||
| 14 | |||
| 15 | // dual-role shortcuts | ||
| 16 | #define TABDUAL LT(_TAB, KC_TAB) | ||
| 17 | #define CAPSDUAL CTL_T(KC_ESC) | ||
| 18 | #define SPACEDUAL LT(_SPC, KC_SPACE) | ||
| 19 | #define ENTERDUAL CTL_T(KC_ENT) | ||
| 20 | // arrow cluster duality bottom right corner | ||
| 21 | #define ARRLEFT ALT_T(KC_LEFT) | ||
| 22 | #define ARRDOWN GUI_T(KC_DOWN) | ||
| 23 | #define ARRUP SFT_T(KC_UP) | ||
| 24 | #define ARRRIGHT CTL_T(KC_RIGHT) | ||
| 25 | // german brackets | ||
| 26 | #define GER_CUR_L RALT(KC_7) // [ | ||
| 27 | #define GER_CUR_R RALT(KC_0) // ] | ||
| 28 | #define GER_PAR_L LSFT(KC_8) // ( | ||
| 29 | #define GER_PAR_R LSFT(KC_9) // ) | ||
| 30 | #define GER_ANG_L KC_NUBS // < | ||
| 31 | #define GER_ANG_R LSFT(KC_NUBS) // > | ||
| 32 | #define GER_BRC_L RALT(KC_8) // [ | ||
| 33 | #define GER_BRC_R RALT(KC_9) // ] | ||
| 34 | |||
| 35 | // increase readability | ||
| 36 | #define _______ KC_TRNS | ||
| 37 | #define XXXXXXX KC_NO | ||
| 38 | |||
| 39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 40 | /* Keymap _DEF: Default Layer | ||
| 41 | * ,-----------------------------------------------------------. | ||
| 42 | * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | ||
| 43 | * |-----------------------------------------------------------| | ||
| 44 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 | ||
| 45 | * |-----------------------------------------------------------| | ||
| 46 | * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | | ||
| 47 | * |-----------------------------------------------------------| | ||
| 48 | * |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP | ||
| 49 | * |-----------------------------------------------------------| | ||
| 50 | * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is | ||
| 51 | * `-----------------------------------------------------------' LEFT DWN RIGHT | ||
| 52 | */ | ||
| 53 | [_DEF] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 54 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ | ||
| 55 | TABDUAL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
| 56 | CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ | ||
| 57 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ARRUP, TG(_SFX), \ | ||
| 58 | KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT), | ||
| 59 | |||
| 60 | /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) | ||
| 61 | * ,-----------------------------------------------------------. | ||
| 62 | * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| | ||
| 63 | * |-----------------------------------------------------------| | ||
| 64 | * | |Paus| Up| [ | ] | | | | ( | ) | | | | | | ||
| 65 | * |-----------------------------------------------------------| | ||
| 66 | * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | | ||
| 67 | * |-----------------------------------------------------------| | ||
| 68 | * | | | | | < | > | |M0 | | | | | Vol+ | | | ||
| 69 | * |-----------------------------------------------------------| | ||
| 70 | * | | | | |Alt |Prev|Vol-|Next| | ||
| 71 | * `-----------------------------------------------------------' | ||
| 72 | */ | ||
| 73 | [_SPC] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 74 | KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ | ||
| 75 | _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ | ||
| 77 | _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \ | ||
| 78 | _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), | ||
| 79 | |||
| 80 | /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) | ||
| 81 | * ,-----------------------------------------------------------. | ||
| 82 | * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE | ||
| 83 | * |-----------------------------------------------------------| | ||
| 84 | * | | | | | | | | | { | } | | | | | | ||
| 85 | * |-----------------------------------------------------------| | ||
| 86 | * | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn | | ||
| 87 | * |-----------------------------------------------------------| | ||
| 88 | * | | | | | | | |AF2| | | | | PgUp | | | ||
| 89 | * |-----------------------------------------------------------| | ||
| 90 | * | | | | |Alt |Pos1|PgDn|End | | ||
| 91 | * `-----------------------------------------------------------' | ||
| 92 | */ | ||
| 93 | [_TAB] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 94 | KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ | ||
| 95 | _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ | ||
| 96 | _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ | ||
| 97 | _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, KC_PGUP, _______, \ | ||
| 98 | _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), | ||
| 99 | |||
| 100 | /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) | ||
| 101 | * ,-----------------------------------------------------------. | ||
| 102 | * |RSET| | | | | | | 7| 8| 9| | | |Backsp | | ||
| 103 | * |-----------------------------------------------------------| | ||
| 104 | * | | | | | | | | 4 | 5 | 6 | | | | \ | | ||
| 105 | * |-----------------------------------------------------------| | ||
| 106 | * | | L | L | | | | | 1 | 2 | 3 | | | Return | | ||
| 107 | * |-----------------------------------------------------------| | ||
| 108 | * | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent | ||
| 109 | * |-----------------------------------------------------------| LED controlling | ||
| 110 | * |Ctrl|Win |Alt | |Alt |Left|Down|Right| | ||
| 111 | * `-----------------------------------------------------------' | ||
| 112 | */ | ||
| 113 | [_SFX] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 114 | RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ | ||
| 116 | _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ | ||
| 117 | _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ | ||
| 118 | _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 119 | }; | ||
| 120 | |||
| 121 | enum function_id { | ||
| 122 | LAUNCH, | ||
| 123 | RGBLED_TOGGLE, | ||
| 124 | }; | ||
| 125 | |||
| 126 | const uint16_t PROGMEM fn_actions[] = { | ||
| 127 | [1] = ACTION_FUNCTION(LAUNCH), | ||
| 128 | [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), | ||
| 129 | }; | ||
| 130 | |||
| 131 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 132 | { | ||
| 133 | // MACRODOWN only works in this function | ||
| 134 | switch(id) { | ||
| 135 | case 0: | ||
| 136 | return (record->event.pressed ? | ||
| 137 | MACRO( D(RALT), T(SPC), U(RALT), END ) | ||
| 138 | :MACRO( END )); | ||
| 139 | break; | ||
| 140 | case 1: | ||
| 141 | return (record->event.pressed ? | ||
| 142 | MACRO( D(LALT), T(F2), U(LALT), END ) | ||
| 143 | :MACRO( END )); | ||
| 144 | break; | ||
| 145 | } | ||
| 146 | return MACRO_NONE; | ||
| 147 | }; | ||
