Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
342 lines (325 sloc) 21.1 KB
/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
*
* 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
enum layers {
_QWERTY = 0,
_LOWER,
_RAISE,
_ADJUST
};
enum custom_keycodes {
FORCE_HASH = SAFE_RANGE,
SCREENSHOT_COPY
};
//Tap Dance Declarations
enum {
TD_LPARENS = 0,
TD_RPARENS
};
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_LPARENS] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT_PAREN, KC_LBRC),
[TD_RPARENS] = ACTION_TAP_DANCE_DOUBLE(KC_RIGHT_PAREN, KC_RBRC)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
* | Esc | Q | W | E | R | T | | Y | U | I | O | P |Backsp |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | ([ | Z | X | C | V | B |Adjust|Space | |Space |Rai/Up| N | M | , < | . > | / ? | )] |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | Play | Ctrl | Alt | GUI |Space | | Enter| Left | Down |Right | Play |
* | | | | |LShift| |Rshift| GUI | Alt | Ctrl | |
* `----------------------------------' `----------------------------------'
*/
[_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, LT(_RAISE, KC_F), KC_G, KC_H, LT(_LOWER, KC_J), KC_K, KC_L, KC_SCLN, KC_QUOT,
TD(TD_LPARENS), KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_ADJUST), KC_SPC, KC_SPC, LT(_RAISE, KC_UP), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_RPARENS),
KC_MPLY, KC_LCTRL, KC_LALT, KC_LGUI, MT(MOD_LSFT, KC_SPC), MT(MOD_RSFT, KC_ENT), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), MT(MOD_RCTL, KC_RGHT), KC_MPLY
),
/*
* Lower Layer: Numbers left hand
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | * | 1 | 2 | 3 | | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | / | 4 | 5 | 6 | | |xxxxxx| | | | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | = | 7 | 8 | 9 | | | | | | \ | | | | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | - | + | 0 | _ | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_LOWER] = LAYOUT(
SCREENSHOT_COPY, _______, KC_ASTERISK, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, KC_DELETE,
_______, _______, KC_SLSH, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______,
_______, _______, KC_EQL, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_BSLS, _______, _______, _______, _______, _______,
_______, KC_MINS, KC_PLUS, KC_0, KC_UNDERSCORE, _______, _______, _______, _______, _______
),
/*
* Raise Layer: Symbols right hand
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | ! | @ | ? | $ | | |
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | |xxxxxx| | | ^ | % | * | & | £ | ` |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | | | | | | | | | # | \ | | | < | > | = | ~ |
* |--------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+--------|
* | | | | | | | - | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_RAISE] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_EXCLAIM, KC_AT, KC_QUES, KC_DOLLAR, _______, _______,
_______, _______, _______, _______, _______, _______, KC_CIRCUMFLEX, KC_PERCENT, KC_ASTERISK, KC_AMPERSAND, KC_HASH, KC_GRV,
_______, _______, _______, _______, _______, _______, _______, _______, _______, FORCE_HASH, KC_BSLS, KC_PIPE, KC_LT, KC_GT, KC_EQL, KC_TILDE,
_______, _______, _______, _______, _______, KC_MINS, _______, _______, _______, KC_MPLY
),
/*
* Adjust Layer: Function keys, RGB
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_ADJUST] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______,
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// /*
// * Layer template
// *
// * ,-------------------------------------------. ,-------------------------------------------.
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
// * | | | | | | | | | | | | | | | | | |
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
// * | | | | | | | | | | | |
// * | | | | | | | | | | | |
// * `----------------------------------' `----------------------------------'
// */
// [_LAYERINDEX] = LAYOUT(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
};
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
static void render_logo(void) {
static const char PROGMEM logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0,
0xC0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xF8, 0xF8, 0xF0, 0xF0, 0xF0, 0xF0,
0xF0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xF0, 0xF0, 0xF0, 0xF0, 0xC0, 0xC0,
0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x70, 0xFE, 0xFF, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0x38, 0x88, 0xF0, 0xF8, 0xFF, 0xFF,
0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF,
0xFF, 0xF8, 0xF0, 0x80, 0x38, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC, 0xFF, 0xFE, 0x70, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xC1, 0xE1, 0xFB, 0xFB, 0xFB, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x7F, 0x7E, 0xFC, 0xF3, 0xE7, 0xF3, 0xFB, 0xFD, 0xF9, 0xF3, 0xEF, 0x9F, 0x3F, 0x7F, 0xFF, 0xFF,
0xFF, 0x7F, 0x3F, 0x9F, 0xEF, 0xF7, 0xF9, 0xFD, 0xFB, 0xF7, 0xE7, 0xF3, 0xFC, 0x7E, 0x7F, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFB, 0xFB, 0xFB, 0xE1, 0xC1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x3F, 0x3F, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
0xFE, 0xFE, 0xFE, 0x3E, 0xFE, 0xFE, 0xFD, 0xF9, 0xFB, 0xF7, 0xCF, 0x1F, 0x7F, 0xFE, 0xFC, 0xF9,
0xFC, 0xFE, 0x7F, 0x1F, 0xCF, 0xF7, 0xFB, 0xF9, 0xFD, 0xFE, 0xFE, 0x3E, 0x7E, 0xFE, 0xFE, 0xFE,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x3F, 0x3F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFC, 0xFD, 0xFD, 0xFD, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0xFF, 0xFF,
0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFD, 0xFD, 0xFD, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0x0F, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F, 0xFF, 0x7F, 0x7F, 0x3F, 0x8F, 0xE0, 0xFF, 0xFF,
0xFF, 0xE0, 0x8F, 0x3F, 0x7F, 0x7F, 0xFF, 0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x1F, 0x07, 0x71, 0xFC, 0xFF, 0xFF, 0xFE, 0xFE, 0xEE, 0xC7, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xEF, 0xC7, 0xEE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFC, 0x71, 0x07, 0x1F, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x07, 0x03, 0x07, 0x1F, 0x3F, 0x7F, 0x0F, 0x03, 0x03, 0x03,
0x03, 0x03, 0x0F, 0x7F, 0x3F, 0x0F, 0x07, 0x03, 0x07, 0x0F, 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
};
oled_write_raw_P(logo, sizeof(logo));
}
static void render_master_logo(void) {
static const char PROGMEM logo[] = {
0x00, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0xC0, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x40, 0x40, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xF0,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 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, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x0F, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x02, 0x01, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
0x18, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0x40, 0x40,
0x40, 0x40, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x1C, 0x1C, 0x1C, 0x1F, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, 0x1C, 0x18,
0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0xF1, 0xC1, 0x01, 0x21, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x20, 0x30,0
};
oled_write_raw_P(logo, sizeof(logo));
oled_advance_page(false);
oled_advance_page(false);
oled_advance_page(false);
oled_advance_page(false);
}
static void render_status(void) {
render_master_logo();
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("QWERT\n"), false);
oled_write_P(PSTR("Rotary L: Vol\n"), false);
oled_write_P(PSTR("Rotary R: tmux pane\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("Numbers LH\n"), false);
oled_write_P(PSTR("Rotary L: Vol\n"), false);
oled_write_P(PSTR("Rotary R: tmux pane\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Symbols RH\n"), false);
oled_write_P(PSTR("Rotary L: Vol\n"), false);
oled_write_P(PSTR("Rotary R: tmux window\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("F1\n"), false);
oled_write_P(PSTR("Rotary L: Vol\n"), false);
oled_write_P(PSTR("Rotary R: tmux window\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
}
}
void oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
}
}
#endif
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == 1) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
// Next tmux window
SEND_STRING(SS_LCTRL("b")"n");
} else {
// Previous tmux window
SEND_STRING(SS_LCTRL("b")"m");
}
} else {
if (clockwise) {
// Next tmux pane
SEND_STRING(SS_LCTRL("b")"o");
} else {
// Previous tmux pane
SEND_STRING(SS_LCTRL("b")"p");
}
}
}
}
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FORCE_HASH:
if (record->event.pressed) {
SEND_STRING(SS_LALT("3"));
return false;
}
break;
case SCREENSHOT_COPY:
if (record->event.pressed) {
SEND_STRING(SS_LCTRL(SS_LSFT(SS_LGUI("4"))));
}
return false;
break;
}
return true;
}
You can’t perform that action at this time.