From f55e7a30bd626d39da656bbf227538839d5ab3ad Mon Sep 17 00:00:00 2001
From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com>
Date: Tue, 25 Aug 2020 23:03:20 +0800
Subject: [PATCH 1/5] added via keymap
added via keymap
## Description
I have added a via keymap to enable support in via software
## Types of Changes
- [] Core
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [] Keyboard (addition or update)
- [x] Keymap/layout/userspace (addition or update)
- [] Documentation
## Issues Fixed or Closed by This PR
*
## Checklist
- [x] My code follows the code style of this project: [**C**](https://docs.qmk.fm/#/coding_conventions_c), [**Python**](https://docs.qmk.fm/#/coding_conventions_python)
- [x] I have read the [**PR Checklist** document](https://docs.qmk.fm/#/pr_checklist) and have made the appropriate changes.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing).
- [x] I have added tests to cover my changes.
- [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
---
keyboards/keebio/viterbi/keymaps/via/keymap.c | 135 ++++++++++++++++++
keyboards/keebio/viterbi/keymaps/via/rules.mk | 3 +
2 files changed, 138 insertions(+)
create mode 100644 keyboards/keebio/viterbi/keymaps/via/keymap.c
create mode 100644 keyboards/keebio/viterbi/keymaps/via/rules.mk
diff --git a/keyboards/keebio/viterbi/keymaps/via/keymap.c b/keyboards/keebio/viterbi/keymaps/via/keymap.c
new file mode 100644
index 000000000000..aa790c7dd93d
--- /dev/null
+++ b/keyboards/keebio/viterbi/keymaps/via/keymap.c
@@ -0,0 +1,135 @@
+#include QMK_KEYBOARD_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 _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 3
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | Ins | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | Del |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | - | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | = | Esc | A | S | D | F | G | | H | J | K | L | ; | " |Enter |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Pg Up| Shift| Z | X | C | V | B | | N | M | , | . | / | Home | End |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ |
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+ [_QWERTY] = LAYOUT_ortho_5x14(
+ KC_INS, KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, KC_DEL ,
+ 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_LBRC, KC_RBRC,
+ KC_EQL, 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_ENT ,
+ KC_PGUP, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END ,
+ KC_PGDN, ADJUST , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS
+ ),
+
+/* Lower
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | | ~ | F1 | F3 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | _ | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | { | } |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | + | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT_ortho_5x14(
+ _______, KC_TILD, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
+ KC_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR,
+ KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______,
+ _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
+ ),
+
+/* Raise
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | | ~ | F1 | F3 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | _ | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | { | } |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT_ortho_5x14(
+ _______, KC_TILD, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
+ KC_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR,
+ KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______,
+ _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
+ ),
+
+ [_ADJUST] = LAYOUT_ortho_5x14(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______,
+ _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+
+};
+
+
+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);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
\ No newline at end of file
diff --git a/keyboards/keebio/viterbi/keymaps/via/rules.mk b/keyboards/keebio/viterbi/keymaps/via/rules.mk
new file mode 100644
index 000000000000..9d9f5465f3ac
--- /dev/null
+++ b/keyboards/keebio/viterbi/keymaps/via/rules.mk
@@ -0,0 +1,3 @@
+VIA_ENABLE = yes
+LINK_TIME_OPTIMIZATION_ENABLE = yes
+BOOTMAGIC_ENABLE = lite
\ No newline at end of file
From 8e1695138f475bd3c383f1704e4541acfc6debe5 Mon Sep 17 00:00:00 2001
From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com>
Date: Tue, 25 Aug 2020 23:39:25 +0800
Subject: [PATCH 2/5] replaced PRODUCT_ID 0x1157 with PRODUCT_ID 0x2157
replaced product id to distinguish rev2 from rev1.
bakingpy gave me permission through discord chat.
---
keyboards/keebio/viterbi/rev2/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h
index 0b78604d8f7f..9c65acbcc6cf 100644
--- a/keyboards/keebio/viterbi/rev2/config.h
+++ b/keyboards/keebio/viterbi/rev2/config.h
@@ -19,7 +19,7 @@ along with this program. If not, see .
/* USB Device descriptor parameter */
#define VENDOR_ID 0xCB10
-#define PRODUCT_ID 0x1157
+#define PRODUCT_ID 0x2157
#define DEVICE_VER 0x0200
#define MANUFACTURER Keebio
#define PRODUCT The Viterbi Keyboard
From 1bd30527684c5a3b077884d9e0ee6b7c080cef25 Mon Sep 17 00:00:00 2001
From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com>
Date: Mon, 31 Aug 2020 01:32:14 +0800
Subject: [PATCH 3/5] Update keyboards/keebio/viterbi/keymaps/via/keymap.c
Co-authored-by: Drashna Jaelre
---
keyboards/keebio/viterbi/keymaps/via/keymap.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/keyboards/keebio/viterbi/keymaps/via/keymap.c b/keyboards/keebio/viterbi/keymaps/via/keymap.c
index aa790c7dd93d..71c2dba540b8 100644
--- a/keyboards/keebio/viterbi/keymaps/via/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/via/keymap.c
@@ -5,10 +5,12 @@
// 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 1
-#define _RAISE 2
-#define _ADJUST 3
+enum layer_names {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -132,4 +134,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
}
return true;
-}
\ No newline at end of file
+}
From 0ec9605567dc6b7b1151f01b12602d1aeaf946cf Mon Sep 17 00:00:00 2001
From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com>
Date: Mon, 31 Aug 2020 01:34:49 +0800
Subject: [PATCH 4/5] Update keyboards/keebio/viterbi/keymaps/via/rules.mk
Co-authored-by: Ryan
---
keyboards/keebio/viterbi/keymaps/via/rules.mk | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/keyboards/keebio/viterbi/keymaps/via/rules.mk b/keyboards/keebio/viterbi/keymaps/via/rules.mk
index 9d9f5465f3ac..36b7ba9cbc98 100644
--- a/keyboards/keebio/viterbi/keymaps/via/rules.mk
+++ b/keyboards/keebio/viterbi/keymaps/via/rules.mk
@@ -1,3 +1,2 @@
VIA_ENABLE = yes
-LINK_TIME_OPTIMIZATION_ENABLE = yes
-BOOTMAGIC_ENABLE = lite
\ No newline at end of file
+LTO_ENABLE = yes
From aa861e864435683865d0261399d4b94ca72e6938 Mon Sep 17 00:00:00 2001
From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com>
Date: Fri, 11 Sep 2020 23:02:16 +0800
Subject: [PATCH 5/5] made a simplier keymap.c for via folder
Based from the default keymap, removed unnecessary codes.
---
keyboards/keebio/viterbi/keymaps/via/keymap.c | 113 ++----------------
1 file changed, 7 insertions(+), 106 deletions(-)
diff --git a/keyboards/keebio/viterbi/keymaps/via/keymap.c b/keyboards/keebio/viterbi/keymaps/via/keymap.c
index 71c2dba540b8..6360202ee016 100644
--- a/keyboards/keebio/viterbi/keymaps/via/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/via/keymap.c
@@ -1,62 +1,17 @@
#include QMK_KEYBOARD_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.
-enum layer_names {
- _QWERTY,
- _LOWER,
- _RAISE,
- _ADJUST,
-};
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* QWERTY
- * ,------------------------------------------------. ,------------------------------------------------.
- * | Ins | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | Del |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | - | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | = | Esc | A | S | D | F | G | | H | J | K | L | ; | " |Enter |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Pg Up| Shift| Z | X | C | V | B | | N | M | , | . | / | Home | End |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ |
- * `------------------------------------------------' `------------------------------------------------'
- */
- [_QWERTY] = LAYOUT_ortho_5x14(
+
+ LAYOUT_ortho_5x14(
KC_INS, KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, KC_DEL ,
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_LBRC, KC_RBRC,
KC_EQL, 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_ENT ,
KC_PGUP, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END ,
- KC_PGDN, ADJUST , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS
+ KC_PGDN, MO(3) , KC_LCTL, KC_LALT, KC_LGUI, MO(1) , KC_SPC , KC_SPC , MO(2) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS
),
-/* Lower
- * ,------------------------------------------------. ,------------------------------------------------.
- * | | ~ | F1 | F3 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | _ | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | { | } |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | + | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
- * `------------------------------------------------' `------------------------------------------------'
- */
- [_LOWER] = LAYOUT_ortho_5x14(
+ LAYOUT_ortho_5x14(
_______, KC_TILD, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
KC_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR,
KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______,
@@ -64,20 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
),
-/* Raise
- * ,------------------------------------------------. ,------------------------------------------------.
- * | | ~ | F1 | F3 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | _ | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | { | } |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
- * `------------------------------------------------' `------------------------------------------------'
- */
- [_RAISE] = LAYOUT_ortho_5x14(
+ LAYOUT_ortho_5x14(
_______, KC_TILD, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
KC_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR,
KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______,
@@ -85,53 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
),
- [_ADJUST] = LAYOUT_ortho_5x14(
+ LAYOUT_ortho_5x14(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
_______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______,
- _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
-
-
-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);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}