This repository has been archived on 2025-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dgvigil-keebs/draculad/keymap.c
2023-11-09 04:34:11 -06:00

376 lines
27 KiB
C

/*
Copyright 2021 @mangoiv
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#ifdef OS_DETECTION_ENABLE
#include "os_detection.h"
#endif
enum layer_number {
_BASE,
_NAV,
_NUM,
_SYM,
_FUN,
_MUS,
_MOUSE
};
enum custom_keycodes {
M_PASS1 = SAFE_RANGE,
M_PASS2
};
// Tap Dance declarations
enum {
TD_Q_ESC,
};
// Tap Dance definitions
tap_dance_action_t tap_dance_actions[] = {
// Tap once for Q, twice for Escape
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC),
};
enum combos {
FA_GUI,
FS_ALT,
FD_CTL,
JQUOT_GUI,
JL_ALT,
JK_CTL
};
const uint16_t PROGMEM fa_combo[] = {KC_F, KC_A, COMBO_END};
const uint16_t PROGMEM fs_combo[] = {KC_F, KC_S, COMBO_END};
const uint16_t PROGMEM fd_combo[] = {KC_F, KC_D, COMBO_END};
const uint16_t PROGMEM jquote_combo[] = {KC_J, KC_QUOT, COMBO_END};
const uint16_t PROGMEM jl_combo[] = {KC_J, KC_L, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
combo_t key_combos[] = {
[FA_GUI] = COMBO(fa_combo, KC_LGUI),
[FS_ALT] = COMBO(fs_combo, KC_LALT),
[FD_CTL] = COMBO(fd_combo, KC_LCTL),
[JQUOT_GUI] = COMBO(jquote_combo, KC_RGUI),
[JL_ALT] = COMBO(jl_combo, KC_RALT),
[JK_CTL] = COMBO(jk_combo, KC_RCTL),
};
// LEFT THUMB KEYS
#define MUS_ESC LT(_MUS, KC_ESC)
#define NAV_BKSP LT(_NAV, KC_BSPC)
#define MOUSE_TAB LT(_MOUSE, KC_TAB)
// RIGHT THUMB KEYS
#define SYM_ENTER LT(_SYM, KC_ENTER)
#define NUM_SPC LT(_NUM, KC_SPC)
#define FUN_DEL LT(_FUN, KC_DEL)
// TAP DANCE
#define Q_ESC TD(TD_Q_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
Q_ESC, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
KC_MUTE, QK_CAPS_WORD_TOGGLE,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
MUS_ESC, NAV_BKSP,MOUSE_TAB, SYM_ENTER,NUM_SPC,FUN_DEL
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_NAV] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
_______, _______, _______, _______, _______, _______, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, M_PASS2, M_PASS1, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
_______, _______, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_NUM] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, _______, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, _______, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_DOT, KC_1, KC_2, KC_3, KC_BSLS, _______, _______, _______, _______, _______,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
KC_DOT, KC_0, KC_MINUS, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_SYM] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RBRC, _______, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_LPRN, KC_RPRN, _______, _______, _______,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
KC_LPRN, KC_RPRN, KC_UNDS, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_FUN] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, QK_DYNAMIC_TAPPING_TERM_UP,_______, _______, _______, QK_BOOT,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_F11, KC_F4, KC_F5, KC_F6, _______, QK_DYNAMIC_TAPPING_TERM_DOWN, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
KC_F10, KC_F1, KC_F2, KC_F3, _______, _______, _______, _______, _______, _______,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
KC_RPRN, KC_UNDS, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_MUS] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
_______, _______, _______, KC_MSTP, KC_MPLY, KC_MUTE
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_MOUSE] = LAYOUT(
// ┌────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┐
_______, _______, _______, _______, _______, _______, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R,
// ├────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R,
// └────────┴────────┴────────┴────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┘
_______, _______,
// ┌────────┬────────┼────────┼ ┼────────┼────────┬────────┐
_______, _______, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
)
};
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (is_keyboard_master()) {
if(is_keyboard_left()){
return OLED_ROTATION_270;
}
else {
return OLED_ROTATION_90;
}
} else {
return OLED_ROTATION_0;
}
}
static void render_logo(void) {
static const char PROGMEM drac_logo[] = {
// drac_logo, 128x64px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0,
0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00,
0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0,
0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff,
0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00,
0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f,
0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc,
0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60,
0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0,
0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8,
0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08,
0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80,
0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03,
0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01,
0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
oled_write_raw_P(drac_logo, sizeof(drac_logo));
}
static void render_status(void) {
oled_write_P(PSTR("~~~~~~~~~\nDarthVigil\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\n"), false);
oled_write_P(PSTR("\n"), false);
#ifdef OS_DETECTION_ENABLE
char data;
switch (detected_host_os()) {
case OS_UNSURE:
data = 0x01; // Face mark
break;
case OS_LINUX:
data = 0x99; // Penguin
break;
case OS_WINDOWS:
data = 0x97; // Window
break;
case OS_MACOS:
data = 0x95; // Banana
break;
case OS_IOS:
data = 0x9B; // But Robot Android !
break;
default:
data = 0x4F; // ?
break;
}
oled_write_char(data, false);
#endif
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR("TAP:"), false);
oled_write(get_u16_str(g_tapping_term, ' '), false);
oled_write_P(PSTR("\n"), false);
led_t led_state = host_keyboard_led_state();
oled_write_P(PSTR("\nCaps: "), false);
oled_write_P(led_state.caps_lock ? PSTR("ON ") : PSTR("OFF"), false);
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR("\n"), false);
switch (get_highest_layer(layer_state)) {
case _BASE:
oled_write_P(PSTR("BASE "), false);
break;
case _NAV:
oled_write_P(PSTR("NAV "), false);
break;
case _NUM:
oled_write_P(PSTR("NUM! "), false);
break;
case _SYM:
oled_write_P(PSTR("SYMB@ "), false);
break;
case _FUN:
oled_write_P(PSTR("FUN F1 "), false);
break;
case _MUS:
oled_write_P(PSTR("MUSIC "), false);
break;
case _MOUSE:
oled_write_P(PSTR("MOUSE "), false);
break;
default:
oled_write_P(PSTR("IDK/? "), false);
break;
}
}
bool oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
}
return false;
}
#endif //OLED_ENABLE
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case M_PASS1:
if (record->event.pressed) {
SEND_STRING("T3lg3Ranch!2023");
}
return false;
case M_PASS2:
if (record->event.pressed) {
SEND_STRING("C0pperfield!2023");
}
return false;
}
return true;
}
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
// Mappings for 1st Encoder // Mappings for 2nd Encoder
[0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, // Mapping for Base layer
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, // Mapping for Layer 1
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, // Mapping for Layer 2
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, // Mapping for Layer 3
[4] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, // Mapping for Layer 3
[5] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, // Mapping for Layer 3
[6] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, // Mapping for Layer 3
// You can add more layers here if you need them, or you can also delete lines for layers you are not using
};
#endif