Skip to content

Commit

Permalink
Test FN layer and fix for non-taipo keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Glodigit committed Sep 13, 2023
1 parent ad5fafc commit e9d63b7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
3 changes: 3 additions & 0 deletions keyboards/lets_split/keymaps/Glodigit/config.h
Expand Up @@ -21,5 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
//#define ONESHOT_TAP_TOGGLE

#define TAIPO_ENABLE
#define TAIPO_FLAVOR_POSH

#undef DEBOUNCING_DELAY //gateron clears are too sensitive
#define DEBOUNCING_DELAY 36
52 changes: 43 additions & 9 deletions keyboards/lets_split/keymaps/Glodigit/keymap.c
Expand Up @@ -10,6 +10,7 @@
// entirely and just use numbers.
#define _BASE 0
#define _TAIPO 1
#define _FN 5

#define XXXX KC_NO

Expand All @@ -30,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
QK_BOOT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
TG(_TAIPO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, KC_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
_______, KC_Q, _______, _______, _______, TG(_FN), _______, _______, _______, _______, _______, _______ \
),

/* Taipo Layer
Expand All @@ -51,17 +52,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TP_BLP, XXXX, XXXX, TP_LIT, TP_LOT, _______, _______, TP_ROT, TP_RIT, XXXX, XXXX, TP_BRP \
),

};
/* Test function layer
* ,------------------------------------------ ------------------------------------------.
* |RESET | W | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |TAIPO | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | X | | | | | | | | | | | |
* `------------------------------------------ ------------------------------------------'
*/
[_FN] = LAYOUT_ortho_4x12( \
QK_BOOT, KC_W, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
TG(_TAIPO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, KC_X, _______, _______, _______, TG(_FN), _______, _______, _______, _______, _______, _______ \
),

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (IS_LAYER_ON(_TAIPO)) {
return taipo_process_record_user(keycode, record);
} else {
return true;
}
};

void matrix_scan_user(void) {
#ifdef TAIPO_ENABLE
if (get_highest_layer(layer_state) == _TAIPO) {
taipo_matrix_scan_user();
}
}
#endif
};

#ifdef TAIPO_ENABLE
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (get_highest_layer(layer_state) == _TAIPO) {
switch (keycode)
{
case TP_TLP ... TP_ROT:
return taipo_process_record_user(keycode, record);
break;

default:
return true;
break;
}

} else {
return true;
}
};
#endif

0 comments on commit e9d63b7

Please sign in to comment.