summaryrefslogtreecommitdiff
path: root/keyboards/handwired/not_so_minidox/keymaps
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-12-01 11:19:07 +0000
committerGitHub <noreply@github.com>2021-12-01 11:19:07 +0000
commit3d06860f3cd8af5d9a2b4e9736b3024d0f37343f (patch)
treebd884e84c36f30176f259793789d0c91e1b06c3d /keyboards/handwired/not_so_minidox/keymaps
parent3716e02ff33b1a7841a8a893bcb0385466f82481 (diff)
downloadqmk_firmware-3d06860f3cd8af5d9a2b4e9736b3024d0f37343f.tar.gz
qmk_firmware-3d06860f3cd8af5d9a2b4e9736b3024d0f37343f.zip
Convert not_so_minidox to SPLIT_KEYBOARD (#15306)
Diffstat (limited to 'keyboards/handwired/not_so_minidox/keymaps')
-rw-r--r--keyboards/handwired/not_so_minidox/keymaps/default/keymap.c56
1 files changed, 5 insertions, 51 deletions
diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c
index 296a7a281d..435eed2f1f 100644
--- a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c
+++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c
@@ -8,17 +8,10 @@
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
-#define _ADJUST 16
+#define _ADJUST 3
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
+#define KC_LOWR MO(_LOWER)
+#define KC_RASE MO(_RAISE)
#define KC_RST RESET
#define KC_CAD LCTL(LALT(KC_DEL))
@@ -72,45 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_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);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_ADJUST);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- }
- return true;
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
}