diff options
author | zvecr <git@zvecr.com> | 2018-12-14 21:29:30 +0000 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-12-14 13:29:30 -0800 |
commit | cb149650efd07cbdc3cacb1fe2eb58f17eee5965 (patch) | |
tree | b86ff3dd99628c496d822b1b5d9d9968bbc2ec0c /keyboards/lets_split_eh/keymaps/default | |
parent | 4446f86bfd273512d473d33c46d99690db5fbc51 (diff) |
Keyboard: Lets split eh default keymap - Fixes for superseded default layer functionality (#4581)
* Fixes for superseded default layer functionality
* Fixes for superseded default layer functionality
Diffstat (limited to 'keyboards/lets_split_eh/keymaps/default')
-rw-r--r-- | keyboards/lets_split_eh/keymaps/default/config.h | 7 | ||||
-rw-r--r-- | keyboards/lets_split_eh/keymaps/default/keymap.c | 68 | ||||
-rw-r--r-- | keyboards/lets_split_eh/keymaps/default/rules.mk | 3 |
3 files changed, 12 insertions, 66 deletions
diff --git a/keyboards/lets_split_eh/keymaps/default/config.h b/keyboards/lets_split_eh/keymaps/default/config.h index a1df337bd9..c535299e74 100644 --- a/keyboards/lets_split_eh/keymaps/default/config.h +++ b/keyboards/lets_split_eh/keymaps/default/config.h @@ -18,9 +18,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif
\ No newline at end of file + // place overrides here diff --git a/keyboards/lets_split_eh/keymaps/default/keymap.c b/keyboards/lets_split_eh/keymaps/default/keymap.c index 8ef9735749..1983459f68 100644 --- a/keyboards/lets_split_eh/keymaps/default/keymap.c +++ b/keyboards/lets_split_eh/keymaps/default/keymap.c @@ -1,30 +1,19 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.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 _LOWER 3 #define _RAISE 4 #define _FUNCTION 15 #define _ADJUST 16 -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FUNCTION MO(_FUNCTION) +#define ADJUST MO(_ADJUST) // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) @@ -45,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + FUNCTION, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), @@ -90,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | |Qwerty|RGBVAD|RGBSAD|RGBHUD|RGBTOG| + * | | | | | | | | |RGBVAD|RGBSAD|RGBHUD|RGBTOG| * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | |BLSTEP| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -99,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( \ TSKMGR, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \ - _______, _______, _______, _______, _______, _______, _______, QWERTY, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ ), @@ -124,47 +113,10 @@ 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); +uint32_t layer_state_set_user(uint32_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 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; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } return true; -}
\ No newline at end of file +} diff --git a/keyboards/lets_split_eh/keymaps/default/rules.mk b/keyboards/lets_split_eh/keymaps/default/rules.mk index 457a3d01d4..e69de29bb2 100644 --- a/keyboards/lets_split_eh/keymaps/default/rules.mk +++ b/keyboards/lets_split_eh/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif |