aboutsummaryrefslogtreecommitdiff
path: root/keyboards/eco
diff options
context:
space:
mode:
authorXyverz <xyverz@gmail.com>2019-10-28 16:09:01 -0700
committernoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-10-28 16:09:01 -0700
commitf19c8b2d5daedcbf833fe8320f290cad9d9f0b83 (patch)
tree3b0f08d1893b1525f234fd2d0f554f1dbf412316 /keyboards/eco
parent8ab7f1f39e715c824cc0e1391aa9a469b2a18438 (diff)
downloadqmk_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/eco')
-rw-r--r--keyboards/eco/keymaps/xyverz/keymap.c115
1 files changed, 39 insertions, 76 deletions
diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c
index 395a014ac..5a1974336 100644
--- a/keyboards/eco/keymaps/xyverz/keymap.c
+++ b/keyboards/eco/keymaps/xyverz/keymap.c
@@ -1,36 +1,13 @@
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// Default ECO Layout
5// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039
6
7#include QMK_KEYBOARD_H 1#include QMK_KEYBOARD_H
8 2
9extern keymap_config_t keymap_config; 3enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
10
11// Each layer gets a name for readability, which is then used in the keymap matrix below.
12// The underscores don't mean anything - you can have a layer called STUFF or any other name.
13// Layer names don't all need to be of the same length, obviously, and you can also skip them
14// entirely and just use numbers.
15#define _QWERTY 0
16#define _COLEMAK 1
17#define _DVORAK 2
18#define _LOWER 3
19#define _RAISE 4
20#define _ADJUST 16
21
22enum planck_keycodes {
23 QWERTY = SAFE_RANGE,
24 COLEMAK,
25 DVORAK,
26 LOWER,
27 RAISE,
28 BACKLIT
29};
30 4
31// Aliases to make reading the keymap easier 5enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST };
32#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
33 6
7// Aliases to keep the keymap tidy
8#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
9
10// clang-format off
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 11const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 12
36 /* Qwerty 13 /* Qwerty
@@ -143,53 +120,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
143 ), 120 ),
144 121
145}; 122};
123// clang-format on
124
125#ifdef AUDIO_ENABLE
126float tone_qwerty[][2] = SONG(QWERTY_SOUND);
127float tone_dvorak[][2] = SONG(DVORAK_SOUND);
128float tone_colemak[][2] = SONG(COLEMAK_SOUND);
129#endif
130
131void matrix_init_user(void) {
132#ifdef BOOTLOADER_CATERINA
133 // This will disable the red LEDs on the ProMicros
134 setPinInput(D5);
135 writePinLow(D5);
136 setPinInput(B0);
137 writePinLow(B0);
138#endif
139};
146 140
147void persistent_default_layer_set(uint16_t default_layer) { 141layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); };
148 eeconfig_update_default_layer(default_layer);
149 default_layer_set(default_layer);
150}
151 142
152bool process_record_user(uint16_t keycode, keyrecord_t *record) { 143bool process_record_user(uint16_t keycode, keyrecord_t *record) {
153 switch (keycode) { 144 if (record->event.pressed) {
154 case QWERTY: 145 switch (keycode) {
155 if (record->event.pressed) { 146 case QWERTY:
156 persistent_default_layer_set(1UL<<_QWERTY); 147 set_single_persistent_default_layer(_QWERTY);
157 } 148 return false;
158 return false; 149 case COLEMAK:
159 break; 150 set_single_persistent_default_layer(_COLEMAK);
160 case COLEMAK: 151 return false;
161 if (record->event.pressed) { 152 case DVORAK:
162 persistent_default_layer_set(1UL<<_COLEMAK); 153 set_single_persistent_default_layer(_DVORAK);
163 } 154 return false;
164 return false; 155 }
165 break; 156 }
166 case DVORAK: 157 return true;
167 if (record->event.pressed) { 158} \ No newline at end of file
168 persistent_default_layer_set(1UL<<_DVORAK);
169 }
170 return false;
171 break;
172 case LOWER:
173 if (record->event.pressed) {
174 layer_on(_LOWER);
175 update_tri_layer(_LOWER, _RAISE, _ADJUST);
176 } else {
177 layer_off(_LOWER);
178 update_tri_layer(_LOWER, _RAISE, _ADJUST);
179 }
180 return false;
181 break;
182 case RAISE:
183 if (record->event.pressed) {
184 layer_on(_RAISE);
185 update_tri_layer(_LOWER, _RAISE, _ADJUST);
186 } else {
187 layer_off(_RAISE);
188 update_tri_layer(_LOWER, _RAISE, _ADJUST);
189 }
190 return false;
191 break;
192 }
193 return true;
194}
195