diff options
author | Xyverz <xyverz@gmail.com> | 2019-10-28 16:09:01 -0700 |
---|---|---|
committer | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-10-28 16:09:01 -0700 |
commit | f19c8b2d5daedcbf833fe8320f290cad9d9f0b83 (patch) | |
tree | 3b0f08d1893b1525f234fd2d0f554f1dbf412316 /keyboards/atreus62 | |
parent | 8ab7f1f39e715c824cc0e1391aa9a469b2a18438 (diff) | |
download | qmk_firmware-f19c8b2d5daedcbf833fe8320f290cad9d9f0b83.tar.gz qmk_firmware-f19c8b2d5daedcbf833fe8320f290cad9d9f0b83.zip |
[Keymap] Updating keymaps (#7170)
* Added WOW layer
* Initial commit for this branch. Still a work in progress.
* Added Rorschach keyboard layout.
* Simplified keymap
Removed the media layer to help simplify things. Also corrected some
keymap mistakes in the Qwerty and Colemak layers.
* Added ErgoTravel keymap.
* reverted to previous layout.
* Added Sol keyboard layout.
* Minor changes to keymap.
* more changes
* Added sol graphic by Kagerufu and Cardiactuna
* Added colemak layer because I can.
* more changes to sol layout
* Streamlined Sol layout
* minor tweaks to sol layout
* further revisions to sol keymap.
* Removing deprecated #include statements from my keymaps
* Standardizing keymap `include` lines.
* Minor change to keymap.
Swapped ESC with GRV on all alpha layers.
* Tweaks to Atreus62 Keymap
Added a layer for FPS RPG Loot Shooters.
* Fixed readme.md for Atreus keymap.
Replaced "Keymap" with "Layer" in illustrations for continuity's sake
* More readme.md clean-up
More clarification in the Atreus readme file.
* Next verse, same as the first.
* Changes to Sol layout
Bringing my Sol layout more in line with my other Orthos.
* Fixed keymap GUI.
Replaced left-hand "RGUI" with "LGUI" on all layers as it should be.
* Added ALPS64 keymap
* Formatting corrections
* fixes to config.h and keymap.c
* Fixed errors
This commit fixes a pathing issue in keyboards/orthodox/keymaps/xyverz/config.h
and removes an stupid comma at the end of each LAYOUT stanza in
keyboards/rgbkb/sol/keymaps/xyverz/keymap.c left there by me.
* Fixed orthodox keymap config.h file
I hope this one fixes the problem. *sigh*
* Making suggested changes for PR#6192
Thanks to noroadsleft, fauxpark, and drashna. Still have
more work to do, but at least these suggestions have been applied.
* Fixing build errors
Travis has shown me the error of my ways...
* More fixes and corrections
Those pesky semicolons...
* More Fixes.
* Removing unneeded code snippet.
* fixed omitted semicolons
* Code updates to my keymaps
Updating the code for my Iris, Atreus62, and Atreus keymaps.
* Fixed Atreus62 Keymap
I forgot to add in the aliases for LOWER, RAISE, and ADJUST.
* Added userspace
Also made changes to Atreus62 Keymap to turn the red LEDs off on the ProMicro
* Fixing code that disables LEDs on ProMicros
Also tidied up my ErgoTravel keymap.
* Moving userspace to new branch
Moving my userspace to a new branch for the sake of keeping things
clean on the master branch.
* Added F13-F15 to Atreus62 Layout.
* Update readme.md.
* Updated Phantom keymap to current keymap standards
* Phantom keymap updates
Further updates - tidying and removing cruft.
Thank you zvecr on Discord for the help!
* Standards Updates
Bringing my Kinesis keymap up to current code standards
* Adding a readme
* Bring GH60 code to standard
* Utilizing layouts for 60_ansi and tkl_ansi
Moving my GH60 and Phantom keymaps into layouts/community/
* Alps64 layout removal
Removing my Alps64 keymap now that I've setup my 60_ansi layout.
* Moved Clueboard layout to community/66_ansi.
* Additions to 66_ansi config.h
* Bringing keymaps up to standard.
* More updates to keymaps.
* Syntax updates
* Revert "Syntax updates"
This reverts commit a892b2d9fcc0d4ba8fc22d676d5414120cc2c183.
* Moved WIP keymaps
Moved my WIP keymaps to my wip_keymaps branch to keep my master clean
* Updates requested by noroadsleft
* more changes per noroadsleft
More fixes as requested by noroadsleft. Further tidy-up and
standardization of my keymap code.
Diffstat (limited to 'keyboards/atreus62')
-rw-r--r-- | keyboards/atreus62/keymaps/xyverz/keymap.c | 151 | ||||
-rw-r--r-- | keyboards/atreus62/keymaps/xyverz/readme.md | 41 |
2 files changed, 90 insertions, 102 deletions
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 ,-----------------------------------------. ,-----------------------------------------. | | | | | | | | | | | | | | |