diff options
28 files changed, 1057 insertions, 1184 deletions
diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index fe1ca295d8..7653206ae5 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -3,8 +3,6 @@ // Preonic keyboards by Jack Humbert. #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -12,13 +10,16 @@ extern keymap_config_t keymap_config; // 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 _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _DVORMAC 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _DVORMAC, + _LOWER, + _RAISE, + _ADJUST +}; enum planck_keycodes { DVORAK = SAFE_RANGE, @@ -27,7 +28,7 @@ enum planck_keycodes { DVORMAC, LOWER, RAISE, - BACKLIT + ADJUST }; // Adding macros to make the keymaps below much easier to read. @@ -37,6 +38,9 @@ enum planck_keycodes { #define ALTENT ALT_T(KC_ENT) #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer @@ -159,57 +163,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case DVORAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_DVORAK); } return false; - break; case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; - break; - case DVORAK: + case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_QWERTY); } return false; - break; case DVORMAC: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); + set_single_persistent_default_layer(_DVORMAC); } 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; - 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; -}; +}
\ No newline at end of file diff --git a/keyboards/atreus/keymaps/xyverz/readme.md b/keyboards/atreus/keymaps/xyverz/readme.md index ec7d836c17..aa44f01dae 100644 --- a/keyboards/atreus/keymaps/xyverz/readme.md +++ b/keyboards/atreus/keymaps/xyverz/readme.md @@ -9,7 +9,7 @@ to a final go with this. I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held, -and Enter/ALT on the right thumb key for all layers. +and Enter/ALT on the right thumb key for all alpha layers. I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. @@ -44,7 +44,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 2: Colemak layer +### Layer 2: Colemak layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | @@ -56,7 +56,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 3: Dvorak for Mac layout +### Layer 3: Dvorak for Mac layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | @@ -68,7 +68,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' -### Keymap 4: LOWER layer +### Layer 4: LOWER layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | @@ -81,7 +81,7 @@ Control. `----------------------------------' `----------------------------------' -### Keymap 5: RAISE layer +### Layer 5: RAISE layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | @@ -93,7 +93,7 @@ Control. | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------' -### Keymap 6: ADJUST layer +### Layer 6: ADJUST layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index a7c33ce9ea..52b0188506 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,19 +14,21 @@ CHANGELOG: 0.1 - Initial commit. Based off of Profet's default keymap. - 0.2 - Converted to a more Planck/Preonic keymap style file with + 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. - 0.3 - Moved location of media & volume keys. Added Print Screen, + 0.3 - Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Added readme. - 0.4 - After more useage, I realized that the ESC key was in the way + 0.4 - After more useage, I realized that the ESC key was in the way of my muscle memory (gee, thanks, Planck!) so I moved it to the normal Caps Lock position, and moved Caps Lock to the same position on the RAISE and LOWER layers. Added code to turn off the Pro Micro LEDs after flashing. 0.5 - Converted keymap to LAYOUT standard. + 0.6 - Swapped ESC and GRV in all layers. + 0.7 - Brought code up to current standards. TODO: @@ -39,66 +41,59 @@ TODO: // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -// 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 _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _WOW 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 - -enum atreus52_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - WOW, - LOWER, - RAISE -}; + +enum layer_names { _DVORAK, _QWERTY, _COLEMAK, _WOW, _DESTINY, _LOWER, _RAISE, _ADJUST }; + +enum atreus52_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, WOW, DESTINY, LOWER, RAISE, ADJUST }; // Aliases to make the keymap clearer. #define CTL_ENT CTL_T(KC_ENT) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( /* dvorak */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_QWERTY] = LAYOUT ( /* qwerty */ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_COLEMAK] = LAYOUT ( /* colemak */ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_GRV, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT ), + [_DESTINY] = LAYOUT ( /* Dvorak with minor modifications for playing Destiny 2 and other FPS Looters */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + [_LOWER] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, @@ -114,76 +109,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_ADJUST] = LAYOUT ( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_F13, KC_F14, KC_F15, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, DESTINY, WOW, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - }; +//clang-format on void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case WOW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_WOW); - } - 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; - 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) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case WOW: + set_single_persistent_default_layer(_WOW); + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + } + } + return true; }; diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md index cf00b65e3a..f91a87da4f 100644 --- a/keyboards/atreus62/keymaps/xyverz/readme.md +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -23,6 +23,13 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. * Put Tilde/Grave in the upper-left corner * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. +### 0.5 + * Converted keymap to LAYOUT standard. +### 0.6 + * Swapped ESC and GRV in all layers. +### 0.7 + * Brought code up to new standards (as of 27 June 2019). + * Updated this readme file. ### TODO: @@ -34,11 +41,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 0: Dvorak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -48,11 +55,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 1: QWERTY layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + | Grv | A | S | D | F | G | | D | H | T | N | S | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -62,11 +69,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Keymap 2: Colemak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + | Grv | A | R | S | T | D | | H | N | E | I | O | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -80,14 +87,28 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Caps | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | `-----------------------------------------' `-----------------------------------------' -### Keymap 4: LOWER layer +### Layer 4: Destiny layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Grv | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Del ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 5: LOWER layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -102,7 +123,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h `-----------------------------------------' `-----------------------------------------' -### Keymap 5: RAISE layer +### Keymap 6: RAISE layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -116,7 +137,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | `-----------------------------------------' `-----------------------------------------' -### Keymap 6: ADJUST layer +### Keymap 7: ADJUST layer ,-----------------------------------------. ,-----------------------------------------. | | | | | | | | | | | | | | diff --git a/keyboards/clueboard/66/keymaps/xyverz/config.h b/keyboards/clueboard/66/keymaps/xyverz/config.h deleted file mode 100644 index 979cbf5768..0000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define TAPPING_TERM 600 // ms diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk deleted file mode 100644 index 6fa110a7b6..0000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,46 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index 395a014acb..5a1974336a 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -1,36 +1,13 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -// Default ECO Layout -// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 - #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 _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Aliases to make reading the keymap easier -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; +// Aliases to keep the keymap tidy +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. + +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -143,53 +120,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif +}; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - 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; - 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) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK |