diff options
Diffstat (limited to 'keyboards/handwired')
4 files changed, 65 insertions, 211 deletions
diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h index eb31ca1b8e..e2e8510b62 100644 --- a/keyboards/handwired/atreus50/atreus50.h +++ b/keyboards/handwired/atreus50/atreus50.h @@ -3,7 +3,7 @@ #include "quantum.h" -// The first section contains all of the arguements +// The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c index 1e53d050b0..46a5995d0d 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c @@ -1,39 +1,6 @@ #include QMK_KEYBOARD_H #include "keymap_uk.h" - -extern keymap_config_t keymap_config; - -enum planck_layers { - _QWERTY, - _MAC, - _LOWER, - _MLWR, - _RAISE, - _MRSE, - _FUNC, - _MFNC, - _FUNC2, - _MFNC2, - _ADJUST, - _MOUSE -}; - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - MAC, - FUNC, - MFNC, - FUNC2, - MFNC2, - LOWER, - MLWR, - RAISE, - MRSE, - MOUSE, - DYNAMIC_MACRO_RANGE -}; - -#include "dynamic_macro.h" +#include "ajp10304.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -49,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , + LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) , KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT , MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) @@ -103,10 +70,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT( - KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , - KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , - _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , - MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______ + KC_GRV, XXXXXXX, M_WORD_SEL, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , + KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , + _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , + MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______ ), /* Adjust (Lower + Raise) @@ -121,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( - M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , + M_CUSTOM, RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ , TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -129,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Mouse * ,------------------------------------------ |-----------------------------------------. - * | ESC | | | | | | | | | | | | | + * | ESC | | | | | | | | | BTN3 | | | | * |------+------+------+------+------+------- |------+------+------+------+------+------| * | ACC0 | ACC1 | ACC2 | | | | | | BTN1 | UP | BTN2 | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -139,12 +106,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_MOUSE] = LAYOUT( - KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_ESC , _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN3, _______, _______, _______ , KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ , KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +/* Num Pad + * ,------------------------------------------ |-----------------------------------------. + * | ESC | | | | | | |NMLOCK| 7 | 8 | 9 | / | | + * |------+------+------+------+------+------- |------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------| + * | | | | | | | | | | 0 | . | , | - | | + * `-------------------------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_DOT, KC_COMM, KC_KP_MINUS, _______ +), + + /* Function 2 (Right hand side) * ,------------------------------------------ |-----------------------------------------. * | | |WRDSEL| | | | | LNDEL| | | | | | @@ -157,10 +144,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_FUNC2] = LAYOUT( - _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______, - _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL, _______, _______, _______, M_LINE_DEL, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL, M_DUP, _______, _______, _______, M_JOIN, _______, _______, _______, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M_MODE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MAC] = LAYOUT( @@ -178,10 +165,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_MRSE] = LAYOUT( - _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ , - _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , - _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , + _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MFNC] = LAYOUT( @@ -192,151 +179,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_MFNC2] = LAYOUT( - _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______, - _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, M_LINE_DEL_MAC, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL_MAC, M_DUP_MAC, _______, _______, _______, M_JOIN_MAC, _______, _______, _______, _______, + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M_MODE_MAC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -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) { - - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - 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; - 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; - case MLWR: - if (record->event.pressed) { - layer_on(_LOWER); - layer_on(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - layer_off(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MRSE: - if (record->event.pressed) { - layer_on(_RAISE); - layer_on(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - layer_off(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MFNC: - if (record->event.pressed) { - layer_on(_FUNC); - layer_on(_MFNC); - } else { - layer_off(_FUNC); - layer_off(_MFNC); - } - return false; - case MFNC2: - if (record->event.pressed) { - layer_on(_FUNC2); - layer_on(_MFNC2); - } else { - layer_off(_FUNC2); - layer_off(_MFNC2); - } - return false; - } - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) { - // These would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - switch(keycode) { - case 0: // Some custom string here - SEND_STRING(""); - return false; - - case 1: // Word Select - SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL)); - return false; - - case 2: // Word Select Mac - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); - return false; - - case 3: // Line Select - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - return false; - - case 4: // Line Select Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - return false; - - case 5: // Line Delete - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 6: // Line Delete Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 7: // Duplicate Selection - SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); - return false; - - case 8: // Duplicate Selection Mac - SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); - return false; - - case 9: // Join line - SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); - return false; - - case 10: // Join line Mac - SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); - return false; - - case 98: // Print mode - SEND_STRING("PC"); - return false; - - case 99: // Print mode - SEND_STRING("OSX"); - return false; - } - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md index 41ad0f5118..5c6a703a8e 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md @@ -1,11 +1,15 @@ # AJP10304 Custom Atreus50 Layout -# Also available for the Planck and JJ40 +# Also available for the Planck, Shark and JJ40 **Note:** In the tables below where there are two characters on a key, the second is the output when shift is applied. **Note:** The below tables assume a UK layout. +#### Flashing + +`make handwired/atreus50:ajp10304:flash` + ##### Main Qwerty Layer * Tab: when held, operates as shift. @@ -43,13 +47,13 @@ Activated when `Lower` is held in the above `qwerty` layer. | Shift | \| | `¬ | #~ | '@ | -_ | | | =+ | #~ | [{ | ]} | '@ |Shift | | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play | - ##### Raise Layer - Activated when `Raise` is held in the above `qwerty` layer. +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. - * Preferred layer for typing brackets. - * Allows for cursor navigation to be used solely with the right hand. - * WRDSEL: Select the word where the cursor is. - * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. | | | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| @@ -98,11 +102,20 @@ Activated when `fn` and `raise` held together. | | | | | | | | | | | | | | | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| -| ESC | | | | | | | | | | | | | | +| ESC | | | | | | | | | | BTN3 | | | | | ACC0 | ACC1 | ACC2 | | | | | | | BTN1 | UP | BTN2 | | | | ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | | | | | | | | | Ctrl | Alt | | | | | | | +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | Ctrl | Alt | | 0 | . | , | - | | + + -##Program Command -teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk index fc5d9ba1aa..900dbaed11 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk @@ -1,8 +1,3 @@ AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes - -TEMP := $(OPT_DEFS) -OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP)) -OPT_DEFS += -DBOOTLOADER_SIZE=512 - BOOTLOADER = halfkay |