Added my keyboard layouts for dz60 and lily58

master
TuDatTr 2021-05-24 20:04:04 +02:00
parent bbe453599f
commit c860dd5972
6 changed files with 450 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#define UNICODE_CYCLE_PERSIST false
#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX

View File

@ -0,0 +1,202 @@
/* Copyright 2021 @tudattr
*
* 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
// Layers
#define _DEFAULT 0
#define _MACRO 1
#define _FUNCTION 2
#define _LIGHTS 3
enum custom_keycodes {
LENNY = SAFE_RANGE,
TBL,
SHRG,
UWU,
LYING,
DENKO,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base layer
*
* ,---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ~ |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | _MACRO/Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backspace |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | LCtrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | _LIGHTS |
* `---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------´
* | LGui | LAlt | _FUNCTION/Space | RAlt | PrntScrn | _MACRO |
* `--------------------------------------------------------------------------------------------------------------------------------------------´
*/
[_DEFAULT] = LAYOUT_all (
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
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_BSPC,
KC_LCTRL, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_LIGHTS), KC_NO,
KC_NO, KC_LGUI, KC_LALT, KC_NO, LT(_FUNCTION, KC_SPC), KC_NO, KC_RALT, KC_PSCR, KC_NO, MO(_MACRO), KC_NO),
/* Macro Layer (Default Unicode: Windows (Windows, Linux))
*
* ,---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
* | Mute | | | | | | | | | | | | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | | | | | | | | | | | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | (´ω) | | | | | | Previous | VolDown | VolUp | Next | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | ( ͡° ͜ʖ ͡°) | (°° | ¯\_()_/¯ | | BrghtDown | BrghtUp | | | | | uwu | _(:3)_ |
* `---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------´
* | | | | PrvUnicode | NxtUnicode | |
* `--------------------------------------------------------------------------------------------------------------------------------------------´
*/
[_MACRO] = LAYOUT_all (
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
DENKO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_NO, LENNY, TBL, SHRG, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UWU, LYING, KC_NO,
KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, UC_RMOD, UC_MOD, KC_NO, KC_TRNS, KC_NO),
/* Function Layer
*
* ,---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INS | ` |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F22 | F23 | F24 |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | | | | | Left | Down | Up | Right | | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | | | | | | | | | | | | |
* `---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------´
* | | | | | | |
* `--------------------------------------------------------------------------------------------------------------------------------------------´
*/
[_FUNCTION] = LAYOUT_all (
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
KC_ESC, 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_INS, KC_GRV,
KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,
KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO),
/* Light Layer
*
* ,---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
* | Toggle | Static | Breathing | Rainbow | KnghtRdr | Christmas | Gradient | Swirl | Snake | | | | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | HueUp | SatUp | BrghtUp | SpdUp | | | | | | | | | |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | HueDown | SatDown | BrghtDown | SpdDown | | | | | | | | Bootloader Mode |
* |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
* | | | | | | | | | | | | | |
* `---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------´
* | | | | | | |
* `--------------------------------------------------------------------------------------------------------------------------------------------´
*/
[_LIGHTS] = LAYOUT_all (
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_SW, RGB_M_SN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,
KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case LENNY:
if (record->event.pressed) {
send_unicode_string("( ͡° ͜ʖ ͡°)");
}
break;
case TBL:
if (record->event.pressed) {
send_unicode_string("(╯°□°)╯彡 ┻━┻");
}
break;
case SHRG:
if (record->event.pressed) {
send_unicode_string("¯\\_(ツ)_/¯");
}
break;
case UWU:
if (record->event.pressed) {
SEND_STRING("`MMMMMMMMM0;xKkKKKKKKKKKKKKKKKKKKKk0KKKKKKKKKKKO',N`\n");
SEND_STRING("`MMMMMMMNoo0KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK0l;`\n");
SEND_STRING("`MMMMMWd;OKKKKKKKKKKoKKKKKKKKKKKKO0KKKKKKKKKKKKKKKk`\n");
SEND_STRING("`MMMMW:oKKKKKKKKKKKdlKKKKKKKKKKK0okKKKKKKKKKKKKKKKX`\n");
SEND_STRING("`MMMN:kKKKKKKKKKKK0'dKKKKKKKKKKKc,oKKKKKKKKKKKKKKKK`\n");
SEND_STRING("`MMX,kKKKKKK0kKKK0;.kKKKKKKKKKKK'd;0KKKKKKKKKKKKKKK`\n");
SEND_STRING("`MW;oKKKKKKK:dKKk,k,xKKKKOKKKKKl;WdcKKKKxKKKOOKKKKK`\n");
SEND_STRING("`Mx:KKKKKKKc:K0l;KWclKKKdlKKKKd'XWWcoKKKxlKKKlKKKKK`\n");
SEND_STRING("`W,kKKKKKO;l0d',dodc.OKK:dKKKo;KOdoo.l0KKcdKK:0KKKK`\n");
SEND_STRING("`0;KKKKKo;dlcoOKNWWWdcKKccK0coNWWWWNKd'lx0:dKcxKKKK`\n");
SEND_STRING("`doKKxo:.dONWWWWWWWWWklOO,oxXWWWWWWWWWXxd0KoocoKKKK`\n");
SEND_STRING("`lxKO;00 dWWXXWWWWWkNWWOkxcxXWW0dXWWWWWXO0O0O;oKKKK`\n");
SEND_STRING("`lxO':KK:kWN.:WWWW0.xWWWWWWWNWWc.dWWWW0.cWWWWcdKKKK`\n");
SEND_STRING("`ko:'dKKodWN. 'cl, .XWWWWWWWWWWO. :oo;. dWWWW'kKKKK`\n");
SEND_STRING("`N:;,OK0o:KK0o;,,;dKOWWWNNWWWN:xXl,..'c0NNWWO,KKKKK`\n");
SEND_STRING("`Mxd'000o'OOOOO0KXNX.dWO..kWWl ONNXKKK00KKXX;oKKKKK`\n");
SEND_STRING("`MM0'K00,:OOOO00KXNWO.''Ok'.'.xNNXK0000000Kd,0KKKKK`\n");
SEND_STRING("`MMo.0K0,oKKKKXXNNWWWNXWWWWXNWWWNNXKKKKKKK0,kKKKKOo`\n");
SEND_STRING("`MMc'xKK,,XNNWWWWWWWWWWWWWWWWWWWWWNNNNNNNX:dKKKKk.,`\n");
SEND_STRING("`MM:c:Kk.',KWWWWWWWWWWWWWWWWWWWWWWWWWWWWNlxKKKKd'oK`\n");
SEND_STRING("`MMcdlox.:,.c0WWWWWWWWWWWWWWWWWWWWWWWWN0;oKKKk;c0KK`\n");
SEND_STRING("`MMdoKdl.ccc:,,cox0KXNNWWWWWNNXX0kdol:'l0KOo;,xKKKK`\n");
}
break;
case DENKO:
if (record->event.pressed) {
send_unicode_string("(´・ω・`)");
}
break;
case LYING:
if (record->event.pressed) {
send_unicode_string("_(:3」∠)_");
}
break;
default:
if (record->event.pressed) {
}
break;
}
return true;
}
void eeconfig_init_user(void) {
set_unicode_input_mode(UC_WINC);
}

View File

@ -0,0 +1,2 @@
UNICODE_ENABLE = yes
MOUSEKEY_ENABLE = no

View File

@ -0,0 +1,42 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
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/>.
*/
#pragma once
#define EE_HANDS
#define USE_SERIAL_PD2
#define OLED_TIMEOUT 300000
#define NO_MUSIC_MODE
#define PERMISSIVE_HOLD
#define IGNORE_MOD_TAP_INTERRUPT
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#endif
#define TAPPING_TERM 120
#ifdef COMBO_COUNT
#undef COMBO_COUNT
#endif
#define COMBO_COUNT 2
#define COMBO_TERM 20

View File

@ -0,0 +1,198 @@
/* Copyright 2021 @tudattr
*
* 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
#include <stdio.h>
#include <string.h>
// Animation
#define IDLE_FRAMES 5
#define IDLE_SPEED 20
#define TAP_FRAMES 2
#define TAP_SPEED 60
#define ANIM_FRAME_DURATION 200
#define ANIM_SIZE 512
char wpm[16];
uint32_t anim_timer = 0;
uint32_t anim_sleep = 0;
uint8_t current_idle_frame = 0;
uint8_t current_tap_frame = 0;
static long int oled_timeout = 300000;
// Layers
# define _DFLT 0
# define _FUNC 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* DEFAULT
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | FUNC | /Space / \Enter \ | FUNC |BackSP| RALT |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_DFLT] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
KC_LGUI, KC_LALT, MO(_FUNC), KC_SPC , KC_ENT, TG(_FUNC), KC_BSPC, KC_RALT \
),
/* FUNC
* ,-----------------------------------------. ,-----------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | F13 | F14 | F15 | F16 | F17 | F18 | | F19 | F20 | F21 | F22 | F23 | F24 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | PRNT | BRID | BRIU | | | |-------. ,-------| LEFT | DOWN | UP | RIGHT| | |
* |------+------+------+------+------+------| MPLAY | | MSTP |------+------+------+------+------+------|
* | | | | | | |-------| |-------| - | = | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | MUTE | /VOLDWN / \VOLUP \ | DFLT | DEL | RALT |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_FUNC] = LAYOUT( \
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_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21, KC_F22 , KC_F23 , KC_F24, \
KC_PSCR, KC_BRID, KC_BRIU, _______, _______, _______, KC_LEFT, KC_DOWN , KC_UP , KC_RIGHT, _______, _______,\
_______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_MINS, KC_EQL ,_______,_______ , _______, _______,\
_______, _______, KC_MUTE, KC_VOLD , KC_VOLU, TG(_FUNC), KC_DEL, _______ \
),
};
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) return OLED_ROTATION_180;
else return rotation;
}
static void render_status(void) {
oled_write_P(PSTR(" @TuDatTr\n"), false);
oled_write_P(PSTR(" Layer "), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR(" 0"), false);
break;
case 1:
oled_write_P(PSTR(" 1"), false);
break;
default:
oled_write_P(PSTR(" ?"), false);
break;
}
oled_write_P(PSTR("\n\n "), false);
sprintf(wpm, "%03d", get_current_wpm());
oled_write(wpm, false);
oled_write_P(PSTR(" wpm"), false);
}
static void render_anim(void) {
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
},
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
},
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
},
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
},
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
static const char PROGMEM prep[][ANIM_SIZE] = {
{
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159,95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
},
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
void animation_phase(void) {
if (get_current_wpm() <= IDLE_SPEED) {
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE);
}
if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) {
oled_write_raw_P(prep[0], ANIM_SIZE);
}
if (get_current_wpm() >= TAP_SPEED) {
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE);
}
}
sprintf(wpm, "%03d", get_current_wpm());
if (strcmp(wpm, "000") != 0) {
anim_sleep = timer_read32();
} else {
if (timer_elapsed32(anim_sleep) > oled_timeout) {
anim_sleep = 0;
}
}
if (timer_elapsed32(anim_sleep) > oled_timeout) {
oled_off();
} else {
oled_on();
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
anim_timer = timer_read32();
animation_phase();
}
}
}
void oled_task_user(void) {
if (is_keyboard_master()) {
render_status();
} else {
render_anim();
}
}
#endif

View File

@ -0,0 +1,3 @@
OLED_DRIVER_ENABLE = yes
WPM_ENABLE = yes
EXTRAKEY_ENABLE = yes