Browse Source

[Keymap] Tominabox1 userspace creation (#7014)

* rebaselined the whole fork and added cool matrix animations

* Updated dfu bootloader rules, oleds working on test map

* Moving test branch into main

moving my _test branch files into the main since the repo is now in the dev branch, don't see any reason to keep separate folders.

* Update keymap.c

Adding DOT to number layer

* added LED sleeping

* working on getting matrix rgb to sleep upon usb suspend

uploading to github for qmk staff help

* Added master sleep on usb suspend

Unfortunately the sleep function does not work on the slave side so will probably revert this change later

* bringing hhkb config up to current with other tominabox1 configs

* Update config.h

since master side is the only one that sleeps, going to disable this for now.

* testing oled stuff

* Update rules.mk

* tinkering with oled still

* Finally fixed custom image with corne doug

* Adding keymap to dimple instead of screwing up the upstream references.

* Changed oled image to peepo ggers

* working on oled sleep

* Update keymap.c

* fixes oled wake/sleep issues

* Adding 🅱️ and BEPIS macros

* Update .gitignore

* Cleaning up and improving documentation

* Update keymap.c

* Adding my minivan keymap

* Fixed error on keymap

* fixed OLEDs not turning on and moved tapping term to the keymap file

* Changed tapping term from 200 to 250

* Revised Fkey layers, arrows, question mark locations

* Update keymap.c

* tweaked tapping term and types on CRKBD, revised layout on HHKB

* Update keymap.c

* general code cleanup, keymap displays

* Set up userspace for common keymap elements

* tapping term stuff for shift

* testing

* Fixed new tapdance for accessing number and fkey layers

* Update tominabox1.h

* stuff

* fixing function calls for userspace

* cleaning up crkbd config and moving stuff to userspace

* finally fixed oled lightup issues

* cleaning up a few maps and rules

* Removing permissive hold and returning spacefn to all boards.

* Settting up wrapper keymaps for Dimple, Minivan, and Corne

Wrappers

* small tweaks

* Update wrappers.h

* finishing wrappers on Minivan and Dimple

* Revised tapping term definition

Providing additional tapping term config for CRKBD only.

* Code cleanup and documentation

* Update readme.md

* Update readme.md

* Wrapers and continued code cleanup and documentation

* moved oled py scripts to user folder
* completed wrapper implementation of CRKBD
* added matrix startup mode - not working yet pending upstream changes
* removed unused code in tominabox1.c

* Fixing custom keycodes and tap dance indices

fixed custom keycodes and tap dance indices
Adding beginning of dimple RGB matrix definition
changed oled on corne to scrolling matrix thing
Added copy pasta

* Secondary layer tweaks

Swapping hands of numbers and symbols as well as tweaking tapping terms accordingly

* Update tominabox1.c

Continued refinement of tapping term to support better right hand symbol access.

* Fixes from pr 7014

Removed gitignore data from qmk master
Reverted changes to Drashna's crkbd keymap
Accepted changes to crkbd keymap
Added ignore to hhkb keymap - I think I need this because Teensy. Will revisit another time

* Removing hhkb keymap for rework

* Adding back hhkb keymap

Re-adding hhkb folder with ignores

* Reverting changes to Dimple default

totally did not intend to modify these

* Update keymap.c

Reverting changes to Drashna's corne map

* Accepting recommended changes

* Reduced tap hold caps delay
moved bootmagic enable to general usage
Revised tapping terms
Removed unused keycode defs

* bootmagic

* Update rules.mk

* Fixed permissions (support 7014) and bootmagic addition

Fixed permissions on Drashna's keymap and Dimple default keymap files.
Adding bootmagic to my crkbd config.

* Fixing permissions
pull/7084/head
tominabox1 4 years ago
committed by Drashna Jaelre
parent
commit
c26faed2b6
14 changed files with 1512 additions and 0 deletions
  1. +46
    -0
      keyboards/crkbd/keymaps/tominabox1/keymap.c
  2. +3
    -0
      keyboards/hhkb/keymaps/tominabox1/.gitignore
  3. +12
    -0
      keyboards/hhkb/keymaps/tominabox1/keymap.c
  4. +109
    -0
      keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c
  5. +74
    -0
      keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c
  6. +2
    -0
      users/tominabox1/.gitignore
  7. +80
    -0
      users/tominabox1/config.h
  8. +433
    -0
      users/tominabox1/dimple_rgb.c
  9. +243
    -0
      users/tominabox1/doug.c
  10. +5
    -0
      users/tominabox1/readme.md
  11. +26
    -0
      users/tominabox1/rules.mk
  12. +281
    -0
      users/tominabox1/tominabox1.c
  13. +56
    -0
      users/tominabox1/tominabox1.h
  14. +142
    -0
      users/tominabox1/wrappers.h

+ 46
- 0
keyboards/crkbd/keymaps/tominabox1/keymap.c View File

@ -0,0 +1,46 @@
#include QMK_KEYBOARD_H
#include "tominabox1.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_wrapper(
___________________CRKBD1__________________,
___________________CRKBD2__________________,
___________________CRKBD3__________________,
___________________CRKBD4__________________
),
[_RAISE] = LAYOUT_wrapper(
___________________RAISE1__________________,
___________________RAISE2__________________,
___________________CRKBD_RAISE3____________,
___________________CRKBD_RAISE4____________
),
[_LOWER] = LAYOUT_wrapper(
_________________LOWER_1___________________,
_________________LOWER_2___________________,
___________________CRKBD_LOW3______________,
___________________CRKBD_LOW4______________
),
[_ADJUST] = LAYOUT_wrapper(
___________________ADJST1__________________,
___________________CRKBD_ADJST2____________,
___________________CRKBD_ADJST3____________,
___________________CRKBD_ADJST4____________
),
[_ARROW] = LAYOUT_wrapper(
___________________ARROW1__________________,
___________________ARROW2__________________,
___________________ARROW3__________________,
___________________ARROW4__________________
),
[_FKEY] = LAYOUT_wrapper(
___________________FKEY1___________________,
___________________FKEY2___________________,
___________________CRKBD_FKEY3_____________,
___________________CRKBD_FKEY4_____________
)
};

+ 3
- 0
keyboards/hhkb/keymaps/tominabox1/.gitignore View File

@ -0,0 +1,3 @@
*.h
matrix.c
rules.mk

+ 12
- 0
keyboards/hhkb/keymaps/tominabox1/keymap.c View File

@ -0,0 +1,12 @@
#include QMK_KEYBOARD_H
#include "tominabox1.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_GESC, 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_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)),
[1] = LAYOUT(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_DEL, KC_CAPS, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS),
[3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS)
};

+ 109
- 0
keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c View File

@ -0,0 +1,109 @@
#include QMK_KEYBOARD_H
#include "tominabox1.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base COLEMAK layer
* ,---------------------------------------------------------------.
* |GEsc| Q | W | F | P | G | J | L | U | Y | : | Bspc |
* |---------------------------------------------------------------|
* |Tab-Ctl| A | R | S | T | D | H | N | E | I | O |Quote|
* |---------------------------------------------------------------|
* |Shft/Cap| Z | X | C | V | B | K | M | , | Up | . |
* |---------------------------------------------------------------|
* |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght|
* `-----------------------------------------------------'
*/
[_BASE] = LAYOUT_wrapper(
__________________DIMPLE1__________________,
__________________DIMPLE2__________________,
__________________DIMPLE3L_________________,__________________DIMPLE3R_________________,
__________________DIMPLE4__________________
),
/* Lower Symbol Layer
* ,---------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |---------------------------------------------------------------|
* | Del | | | | | | | _ | + | { | } | | |
* |---------------------------------------------------------------|
* | | | | | | | | | ; |PgUp| ? |
* |---------------------------------------------------------------|
* | | | | | |Home|PgDn|End |
* `-----------------------------------------------------'
*/
[_LOWER] = LAYOUT_wrapper(
_________________LOWER_1___________________,
_________________LOWER_2___________________,
_________________LOWER_3___________________,
_________________LOWER_4___________________
),
/* Raise Number Layer
* ,---------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc |
* |---------------------------------------------------------------|
* | Ins | | | | | | | - | = | [ | ] | \ |
* |---------------------------------------------------------------|
* | | | | | | | | | | . | / |
* |---------------------------------------------------------------|
* |VolD|Mute|VolU| | | | | |
* `-----------------------------------------------------'
*/
[_RAISE] = LAYOUT_wrapper(
___________________RAISE1__________________,
___________________RAISE2__________________,
___________________RAISE3__________________,
___________________RAISE4__________________
),
/* Adjust Layer
* ,---------------------------------------------------------------.
* |RST |EEP | | | | | | | | | | |
* |---------------------------------------------------------------|
* | MP | | | | | | | | | | | |
* |---------------------------------------------------------------|
* | MODE | HUI| HUD|M_SN| | | | | | | |
* |---------------------------------------------------------------|
* |RGB-|RGB |RGB+| | | | | |
* `-----------------------------------------------------'
*/
[_ADJUST] = LAYOUT_wrapper(
___________________ADJST1__________________,
___________________ADJST2__________________,
___________________ADJST3__________________,
___________________ADJST4__________________
),
/* Fkey Layer
* ,---------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| |
* |---------------------------------------------------------------|
* | | | | | | | | | | F11| F12| |
* |---------------------------------------------------------------|
* | | | | | | | | | | | |
* |---------------------------------------------------------------|
* | | | | | |FKEY| | |
* `-----------------------------------------------------'
*/
[_FKEY] = LAYOUT_wrapper(
___________________FKEY1___________________,
___________________FKEY2___________________,
___________________FKEY3___________________,
___________________FKEY4___________________
),
};
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(E6);
} else {
writePinHigh(E6);
}
}

+ 74
- 0
keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c View File

@ -0,0 +1,74 @@
#include QMK_KEYBOARD_H
#include "tominabox1.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* |GESC| Q | W | F | P | G | J | L | U | Y | ; | BSPC |
* | TAB | A | R | S | T | D | H | N | E | I | O | ' |
* |SHIFT | Z | X | C | V | B | K | M | , | UP | . | / |
* |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY|
*/
[_BASE] = LAYOUT_arrow_wrapper(
__________________MINIVAN1_________________,
__________________MINIVAN2_________________,
__________________MINIVAN3_________________,
__________________MINIVAN4_________________
),
/*
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL |
* | | | | | | | | _ | + | { | } | PIPE|
* |SHIFT | | | | | | | |PGDN| UP | ? | / |
* |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY|
*/
[_LOWER] = LAYOUT_arrow_wrapper(
_________________LOWER_1___________________,
_________________LOWER_2___________________,
__________________MININUM3_________________,
__________________MININUM4_________________
),
/*
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC |
* | INS | | | | | | | - | = | [ | ] | \ |
* | | | | | | | | | | | / | |
* |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY|
*/
[_RAISE] = LAYOUT_arrow_wrapper(
___________________RAISE1__________________,
___________________RAISE2__________________,
___________________RVAN_3__________________,
___________________RVAN_4__________________
),
/*
* |REST|EERS| | | | | | | | | | |
* | | | | | | | | | | | | |
* | | | | | | | | | | | | |
* | | | | ENTR | SPACE | | | | |
*/
[_ADJUST] = LAYOUT_arrow_wrapper(
___________________ADJST1__________________,
___________________ADJST2__________________,
___________________ADJVAN3_________________,
___________________ADJVAN4_________________
),
/*
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| |
* | | | | | | | | | |F11 | F12| |
* | | | | | | | | | | | | |
* | | | | | | FKEY | | | |
*/
[_FKEY] = LAYOUT_arrow_wrapper(
___________________FKEY1___________________,
___________________FKEY2___________________,
___________________FVAN_3__________________,
___________________FVAN_4__________________
),
};

+ 2
- 0
users/tominabox1/.gitignore View File

@ -0,0 +1,2 @@
*.bmp
*.py

+ 80
- 0
users/tominabox1/config.h View File

@ -0,0 +1,80 @@
#pragma once
// Tapping term settings
#define TAPPING_TERM_PER_KEY
#define TAP_HOLD_CAPS_DELAY 350
#define BOOTMAGIC_KEY_SALT KC_BSPACE
#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q
// OLED settings
#define OLED_FONT_H "users/tominabox1/doug.c"
#define OLED_DISABLE_TIMEOUT
#define DEBOUNCE 5
// Setup RGB settings for the Dimple.
#ifdef KEYBOARD_lazydesigners_dimple
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
#define RGBLED_NUM 50
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_SLEEP
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
#undef RGBLED_NUM
#define RGBLED_NUM 50
#define DRIVER_LED_TOTAL RGBLED_NUM
#endif // RGBL_MATRIX_ENABLE
#endif // KEYBOARD_lazydesigners_dimple
// RGB_Matrix settings
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_HUE_STEP 8
#define RGB_MATRIX_SAT_STEP 8
#define RGB_MATRIX_VAL_STEP 8
#define RGB_MATRIX_SPD_STEP 10
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
/* Disable the animations you don't want/need. You will need to disable a good number of these
because they take up a lot of space. Disable until you can successfully compile your firmware. */
// #define DISABLE_RGB_MATRIX_ALPHAS_MODS
// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BREATHING
// #define DISABLE_RGB_MATRIX_CYCLE_ALL
// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define DISABLE_RGB_MATRIX_DUAL_BEACON
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// #define DISABLE_RGB_MATRIX_RAINDROPS
#define DISABLE_RGB_MATRIX_JELLYBEN_RAINDROPS
// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif //RGB_MATRIX_ENABLE
// Hex size reduction options
#ifndef NO_DEBUG
#define NO_DEBUG
#endif // !NO_DEBUG
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
#define NO_PRINT
#endif // !NO_PRINT
#define NO_ACTION_ONESHOT

+ 433
- 0
users/tominabox1/dimple_rgb.c View File

@ -0,0 +1,433 @@
#include "dz60rgb.h"
#include "config.h"
#if defined (dzrgb60_iso)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
{0, K_11, J_11, L_11},
{0, K_10, J_10, L_10},
{0, K_9, J_9, L_9},
{0, K_8, J_8, L_8},
{0, K_7, J_7, L_7},
{0, K_6, J_6, L_6},
{0, K_5, J_5, L_5},
{0, K_4, J_4, L_4},
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
{0, H_15, G_15, I_15},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
{0, H_11, G_11, I_11},
{0, H_10, G_10, I_10},
{0, H_9, G_9, I_9},
{0, H_8, G_8, I_8},
{0, H_7, G_7, I_7},
{0, H_6, G_6, I_6},
{0, H_5, G_5, I_5},
{0, H_4, G_4, I_4},
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
{0, B_14, A_14, C_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
{0, E_10, D_10, F_10},
{0, E_9, D_9, F_9},
{0, E_8, D_8, F_8},
{0, E_7, D_7, F_7},
{0, E_6, D_6, F_6},
{0, E_5, D_5, F_5},
{0, E_4, D_4, F_4},
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
{0, B_9, A_9, C_9},
{0, B_8, A_8, C_8},
{0, B_7, A_7, C_7},
{0, B_6, A_6, C_6},
{0, B_5, A_5, C_5},
{0, B_4, A_4, C_4},
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, E_15, D_15, F_15},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
led_config_t g_led_config = { {
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 },
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 },
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
}, {
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
{ 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
{ 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
}, {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
1, 4, 1, 1, 1
} };
#elif defined (dzrgb60_hhkb)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
{0, K_11, J_11, L_11},
{0, K_10, J_10, L_10},
{0, K_9, J_9, L_9},
{0, K_8, J_8, L_8},
{0, K_7, J_7, L_7},
{0, K_6, J_6, L_6},
{0, K_5, J_5, L_5},
{0, K_4, J_4, L_4},
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
{0, H_11, G_11, I_11},
{0, H_10, G_10, I_10},
{0, H_9, G_9, I_9},
{0, H_8, G_8, I_8},
{0, H_7, G_7, I_7},
{0, H_6, G_6, I_6},
{0, H_5, G_5, I_5},
{0, H_4, G_4, I_4},
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
{0, E_10, D_10, F_10},
{0, E_9, D_9, F_9},
{0, E_8, D_8, F_8},
{0, E_7, D_7, F_7},
{0, E_6, D_6, F_6},
{0, E_5, D_5, F_5},
{0, E_4, D_4, F_4},
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
{0, B_9, A_9, C_9},
{0, B_8, A_8, C_8},
{0, B_7, A_7, C_7},
{0, B_6, A_6, C_6},
{0, B_5, A_5, C_5},
{0, B_4, A_4, C_4},
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
led_config_t g_led_config = { {
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 },
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 },
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
}, {
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
{ 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
}, {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 1, 4, 1, 1, 1
} };
#elif defined (dzrgb60_hhkb_iso)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
{0, K_11, J_11, L_11},
{0, K_10, J_10, L_10},
{0, K_9, J_9, L_9},
{0, K_8, J_8, L_8},
{0, K_7, J_7, L_7},
{0, K_6, J_6, L_6},
{0, K_5, J_5, L_5},
{0, K_4, J_4, L_4},
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
{0, K_15, J_15, L_15},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
{0, H_11, G_11, I_11},
{0, H_10, G_10, I_10},
{0, H_9, G_9, I_9},
{0, H_8, G_8, I_8},
{0, H_7, G_7, I_7},
{0, H_6, G_6, I_6},
{0, H_5, G_5, I_5},
{0, H_4, G_4, I_4},
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
{0, E_15, D_15, F_15},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
{0, E_10, D_10, F_10},
{0, E_9, D_9, F_9},
{0, E_8, D_8, F_8},
{0, E_7, D_7, F_7},
{0, E_6, D_6, F_6},
{0, E_5, D_5, F_5},
{0, E_4, D_4, F_4},
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
{0, B_9, A_9, C_9},
{0, B_8, A_8, C_8},
{0, B_7, A_7, C_7},
{0, B_6, A_6, C_6},
{0, B_5, A_5, C_5},
{0, B_4, A_4, C_4},
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
led_config_t g_led_config = { {
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 },
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 },
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
}, {
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
{ 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
}, {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 1, 4, 1, 1, 1
} };
#elif defined (dzrgb60_ansi)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
{0, K_11, J_11, L_11},
{0, K_10, J_10, L_10},
{0, K_9, J_9, L_9},
{0, K_8, J_8, L_8},
{0, K_7, J_7, L_7},
{0, K_6, J_6, L_6},
{0, K_5, J_5, L_5},
{0, K_4, J_4, L_4},
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
{0, H_11, G_11, I_11},
{0, H_10, G_10, I_10},
{0, H_9, G_9, I_9},
{0, H_8, G_8, I_8},
{0, H_7, G_7, I_7},
{0, H_6, G_6, I_6},
{0, H_5, G_5, I_5},
{0, H_4, G_4, I_4},
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
{0, E_10, D_10, F_10},
{0, E_9, D_9, F_9},
{0, E_8, D_8, F_8},
{0, E_7, D_7, F_7},
{0, E_6, D_6, F_6},
{0, E_5, D_5, F_5},
{0, E_4, D_4, F_4},
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
{0, B_9, A_9, C_9},
{0, B_8, A_8, C_8},
{0, B_7, A_7, C_7},
{0, B_6, A_6, C_6},
{0, B_5, A_5, C_5},
{0, B_4, A_4, C_4},
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, E_15, D_15, F_15},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
led_config_t g_led_config = { {
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
}, {
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
{ 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
{ 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
}, {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
1, 4, 1, 1, 1
} };
#else
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
{0, K_11, J_11, L_11},
{0, K_10, J_10, L_10},
{0, K_9, J_9, L_9},
{0, K_8, J_8, L_8},
{0, K_7, J_7, L_7},
{0, K_6, J_6, L_6},
{0, K_5, J_5, L_5},
{0, K_4, J_4, L_4},
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
{0, H_11, G_11, I_11},
{0, H_10, G_10, I_10},
{0, H_9, G_9, I_9},
{0, H_8, G_8, I_8},
{0, H_7, G_7, I_7},
{0, H_6, G_6, I_6},
{0, H_5, G_5, I_5},
{0, H_4, G_4, I_4},
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
{0, E_10, D_10, F_10},
{0, E_9, D_9, F_9},
{0, E_8, D_8, F_8},
{0, E_7, D_7, F_7},
{0, E_6, D_6, F_6},
{0, E_5, D_5, F_5},
{0, E_4, D_4, F_4},
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
{0, B_9, A_9, C_9},
{0, B_8, A_8, C_8},
{0, B_7, A_7, C_7},
{0, B_6, A_6, C_6},
{0, B_5, A_5, C_5},
{0, B_4, A_4, C_4},
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, E_15, D_15, F_15},
{0, H_15, G_15, I_15},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
{0, K_16, J_16, L_16},
};
led_config_t g_led_config = { {
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 },
{ 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 }
}, {
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
{ 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
{ 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 },
{ 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, { 224, 64 }, { 208, 64 },
{ 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
}, {
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
1, 1, 1, 4, 1, 1, 1
} };
#endif

+ 243
- 0
users/tominabox1/doug.c View File

@ -0,0 +1,243 @@
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
#ifndef FONT5X7_H
#define FONT5X7_H
#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
// Standard ASCII 5x7 font
const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
0x00, 0x2C, 0x2C, 0x2C, 0x34, 0x34,
0x34, 0x24, 0x2C, 0x2C, 0x2C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x14,
0x14, 0x3C, 0x20, 0x00, 0x00, 0x04,
0x0C, 0x00, 0x00, 0x20, 0x00, 0xC0,
0x00, 0x00, 0x00, 0xA0, 0x20, 0x30,
0x7C, 0x78, 0x0C, 0x0C, 0x18, 0x18,
0x18, 0x14, 0x14, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x5C, 0x5C, 0x24, 0x20,
0xA0, 0xA0, 0xA0, 0x20, 0x60, 0x20,
0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x14, 0x94, 0x94,
0x14, 0x94, 0x94, 0x94, 0x94, 0x14,
0x1C, 0x1C, 0x1C, 0x88, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x08,
0x84, 0x84, 0x84, 0x84, 0x80, 0x98,
0x80, 0x9C, 0x9C, 0x90, 0x80, 0x00,
0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x10, 0x00,
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x40, 0x00, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x50, 0xA0, 0x40, 0x80, 0x80, 0x40,
0xA0, 0x50, 0x00, 0x00, 0xF0, 0x00,
0x01, 0x08, 0x08, 0x88, 0x08, 0x08,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x0C,
0x0E, 0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x82, 0x80, 0x80,
0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
0x00, 0xC0, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x40, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
0x01, 0x01, 0x01, 0x60, 0x60, 0x40,
0xF1, 0xB3, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x90, 0x90, 0xD0, 0xC0,
0xE0, 0xE0, 0x00, 0x00, 0x00, 0x01,
0x00, 0x90, 0xA0, 0xA0, 0x63, 0x60,
0x40, 0x40, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x02, 0x02, 0x02, 0x03, 0x00,
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x06, 0x00, 0x70, 0x10, 0x10,
0x31, 0x11, 0x16, 0x06, 0x07, 0x01,
0x00, 0x08, 0x08, 0x08, 0x70, 0x70,
0x40, 0x40, 0x41, 0x46, 0x46, 0x41,
0x40, 0x40, 0x00, 0x00, 0x07, 0x00,
0x00, 0x00, 0x00, 0x75, 0x75, 0x15,
0x77, 0x77, 0x35, 0x15, 0x75, 0x75,
0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x70, 0x70, 0x56, 0x56, 0x56,
0x51, 0x11, 0x26, 0x00, 0x00, 0x00,
0x00, 0x17, 0x10, 0x10, 0x70, 0x00,
0x00, 0x00, 0x30, 0x20, 0x27, 0x77,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xE0, 0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x90, 0x90, 0x90, 0x90,
0x90, 0xF0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x40,
0xF0, 0x30, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#endif // FONT5X7_H

+ 5
- 0
users/tominabox1/readme.md View File

@ -0,0 +1,5 @@
# Overview
My user-space code covers the [Minivan](../../keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c), [Dimple](../../keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c), [CRKBD](../../keyboards/crkbd/keymaps/tominabox1/keymap.c), and [Teensy based HHKB converter](../../keyboards/hhkb/keymaps/tominabox1/). My code makes extensive use of @Drashna's code and much love and praise goes to him for figuring a lot of this stuff out!
My usercode utilizes the layout wrappers contained in [wrappers.h](wrappers.h). All of the keymaps are derivative of the Dimple keymap and utilize its wrappers in the definition of additional wrappers.

+ 26
- 0
users/tominabox1/rules.mk View File

@ -0,0 +1,26 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
CONSOLE_ENABLE = no
TAP_DANCE_ENABLE = yes
NKRO_ENABLE = yes
BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
ifeq ($(strip $(KEYBOARD)), crkbd/rev1)
RGB_MATRIX_ENABLE = WS2812
EXTRAFLAGS += -flto
BOOTLOADER = qmk-dfu
OLED_DRIVER_ENABLE = yes
endif
ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple)
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
# RGB_MATRIX_ENABLE = WS2812
endif
SRC += tominabox1.c

+ 281
- 0
users/tominabox1/tominabox1.c View File

@ -0,0 +1,281 @@
#include "tominabox1.h"
#ifdef KEYBOARD_lazydesigners_dimple
#ifdef RGBLIGHT_ENABLE
__attribute__ ((weak))
void keyboard_post_init_keymap(void) {}
void keyboard_post_init_user(void) { // sets the backlighting to come on upon successful load then turn off
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(RGB_RED);
rgblight_mode_noeeprom(0);
wait_ms(700);
rgblight_disable_noeeprom();
}
#endif // RGBLIGHT
#endif // Dimple
#ifdef RGB_MATRIX_ENABLE
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type);
static bool is_suspended;
static bool rgb_matrix_enabled;
__attribute__ ((weak))
void suspend_power_down_keymap(void) {}
void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
if (!is_suspended) {
is_suspended = true;
rgb_matrix_enabled = (bool)rgb_matrix_config.enable;
rgb_matrix_disable_noeeprom();
}
}
__attribute__ ((weak))
void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
is_suspended = false;
if (rgb_matrix_enabled) {
rgb_matrix_enable_noeeprom();
}
}
# include "lib/lib8tion/lib8tion.h"
extern led_config_t g_led_config;
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) {
HSV hsv = {hue, sat, val};
if (hsv.v > rgb_matrix_config.hsv.v) {
hsv.v = rgb_matrix_config.hsv.v;
}
switch (mode) {
case 1: // breathing
{
uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8);
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
break;
}
default: // Solid Color
{
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
break;
}
}
}
#endif //RGB_MATRIX_ENABLE
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code16(S(KC_2));
} else {
SEND_STRING("tom.campie@gmail.com");
}
}
void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
unregister_code16(S(KC_2));
} else {
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[KC_EMAIL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset),
[TD_SFT_CPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
};
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT
#ifdef KEYBOARD_crkbd_rev1
#endif // CRKBD
uint16_t get_tapping_term(uint16_t keycode) {
switch (keycode) {
case LSFT_T(KC_CAPS):
return 250;
case KC_ENT_LOW:
return 150;
case KC_SPC_RSE:
return(250);
case LCTL_T(KC_TAB):
return 300;
default:
return TAPPING_TERM;
}
};
__attribute__ ((weak))
layer_state_t layer_state_set_keymap (layer_state_t state) {
return state;
}
uint32_t layer_state_set_user(uint32_t state) {
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
switch (biton32(state)) {
case _LOWER:
break;
case _RAISE:
break;
case _ADJUST:
break;
default:
break;
}
return state;
}
#ifdef KEYBOARD_crkbd_rev1
__attribute__((weak))
void matrix_scan_keymap(void) {}
extern bool oled_initialized;
void matrix_scan_user(void) {
if(!oled_initialized) {
wait_ms(200);
oled_init(0);
return;
}
matrix_scan_keymap();
}
extern uint8_t is_master;
#endif // CRKBD
uint16_t oled_timer;
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
#endif
if (record->event.pressed) {
#ifdef OLED_DRIVER_ENABLE
oled_timer = timer_read();
oled_on();
#endif // OLED_DRIVER_ENABLE
switch (keycode) {
case KC_BBB:
if (record->event.pressed) {
SEND_STRING(":b:");
} else {}
break;
case KC_BEPIS:
if (record->event.pressed) {
SEND_STRING("BEPIS");
} else {}
break;
}
}
return true;
}
#ifdef KEYBOARD_crkbd_rev1
#ifdef OLED_DRIVER_ENABLE
void render_logo(void) {
static const char PROGMEM logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
0};
oled_write_P(logo, false);
}
void render_status_main(void) {
// Host Keyboard USB Status
oled_write_P(PSTR("USB: "), false);
switch (USB_DeviceState) {
case DEVICE_STATE_Unattached:
oled_write_P(PSTR("Unattached\n"), false);
break;
case DEVICE_STATE_Suspended:
oled_write_P(PSTR("Suspended\n"), false);
break;
case DEVICE_STATE_Configured:
oled_write_P(PSTR("Connected\n"), false);
break;
case DEVICE_STATE_Powered:
oled_write_P(PSTR("Powered\n"), false);
break;
case DEVICE_STATE_Default:
oled_write_P(PSTR("Default\n"), false);
break;
case DEVICE_STATE_Addressed:
oled_write_P(PSTR("Addressed\n"), false);
break;
default:
oled_write_P(PSTR("Invalid\n"), false);
}
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) {
case _BASE:
oled_write_P(PSTR("Colemak\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Numbers\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("Symbols\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
case _ARROW:
oled_write_P(PSTR("Navigation\n"), false);
break;
case _FKEY:
oled_write_P(PSTR("Function\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status
oled_write_ln_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("Caps Lock\n") : PSTR(" \n"), false);
}
__attribute__ ((weak))
void oled_task_keymap(void) {}
void oled_task_user(void) {
if (timer_elapsed(oled_timer) > 20000) {
oled_off();
return;
}
if (is_master) {
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
oled_scroll_left();
}
oled_task_keymap();
}
#endif // OLED_Driver
#endif // crkbd

+ 56
- 0
users/tominabox1/tominabox1.h View File

@ -0,0 +1,56 @@
#pragma once
#include "quantum.h"
#include "action.h"
#include "version.h"
#include "wrappers.h"
// #define KC_SFT_CPS MT(MOD_LSFT, KC_CAPS) // Act as Shift on hold and as CapsLock on tap
#define SPC_LOW LT(_LOWER, KC_ENT) // Left space on tap, LOWER on hold
#define SPC_UPR LT(_RAISE, KC_SPC) // Left space on tap, UPPER on hold
extern keymap_config_t keymap_config;
enum layers {
_BASE,
_LOWER,
_RAISE,
_ADJUST,
_ARROW,
_FKEY
};
enum custom_keycodes {
BASE = SAFE_RANGE,
KC_BEPIS,
KC_BBB,
LOWER,
RAISE,
ADJUST,
ARROW,
FKEY,
KC_LFT_NUM_F,
RGBRST,
KC_PASTA
};
enum tap_dance_indexes {
KC_EMAIL,
TD_SFT_CPS,
};
#define KC_ARROW MO(4)
#define KC_LTOG RGB_TOG
#define KC_LHUI RGB_HUI
#define KC_LHUD RGB_HUD
#define KC_LSAI RGB_SAI
#define KC_LSAD RGB_SAD
#define KC_LVAI RGB_VAI
#define KC_LVAD RGB_VAD
#define KC_LMOD RGB_MOD
#define KC_CTLTB CTL_T(KC_TAB) // Tab on tap, ctrl on hold
#define KC_SFT_CPS TD(TD_SFT_CPS) // Hold for shift, double tap for caps
#define KC_ENT_LOW LT(_LOWER, KC_ENT) // Return on tap, Lower on hold
#define KC_SPC_RSE LT(_RAISE, KC_SPC) // Space on tap, raise on hold
#define KC_EML TD(KC_EMAIL) // Double tap @ for email macro
#define KC_FKEY LT(_FKEY, KC_ENT) // Return on tap, Fkey on hold
#define KC_NUMF TD(KC_LFT_NUM_F)

+ 142
- 0
users/tominabox1/wrappers.h View File

@ -0,0 +1,142 @@
#pragma once
#include "tominabox1.h"
/*
Since our quirky block definitions are basically a list of comma separated
arguments, we need a wrapper in order for these definitions to be
expanded before being used as arguments to the LAYOUT_xxx macro.
*/
#if (!defined(LAYOUT) && defined(KEYMAP))
# define LAYOUT KEYMAP
#endif
// clang-format off
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_arrow_wrapper(...) LAYOUT_arrow(__VA_ARGS__)
/*
_____ _ _
| __ \(_) | |
| | | |_ _ __ ___ _ __ | | ___
| | | | | '_ ` _ \| '_ \| |/ _ \
| |__| | | | | | | | |_) | | __/
|_____/|_|_| |_| |_| .__/|_|\___|
| |
|_|
*/
// Dimple Base layer
#define __________________DIMPLE1__________________ KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC
#define __________________DIMPLE2__________________ LCTL_T(KC_TAB), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT
#define __________________DIMPLE3L_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
#define __________________DIMPLE3R_________________ KC_K, KC_M, KC_COMM, KC_UP, LT(_FKEY,KC_DOT)
#define __________________DIMPLE4__________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT
// Dimple Symbol Layer
#define _________________LOWER_1___________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC
#define _________________LOWER_2___________________ KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE
#define _________________LOWER_3___________________ KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_QUES
#define _________________LOWER_4___________________ LCA(KC_DEL), KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END
// Dimple Number layer
#define ___________________RAISE1__________________ KC_TILD, KC_EXLM, TD(KC_EMAIL), KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL
#define ___________________RAISE2__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS
#define ___________________RAISE3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_SLSH
#define ___________________RAISE4__________________ KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO
// Dimple F-key layer
#define ___________________FKEY1___________________ KC_PASTA, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO
#define ___________________FKEY2___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_NO
#define ___________________FKEY3___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________FKEY4___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO
// Dimple Adjust layer
#define ___________________ADJST1__________________ RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________ADJST2__________________ RGB_M_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________ADJST3__________________ RGB_MOD, RGB_HUI, RGB_HUD, RGB_M_SN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________ADJST4__________________ RGB_VAD, RGB_TOG, RGB_VAI, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO
/*
__ __ _ _
| \/ (_) (_)
| \ / |_ _ __ ___ ____ _ _ __
| |\/| | | '_ \| \ \ / / _` | '_ \
| | | | | | | | |\ V / (_| | | | |
|_| |_|_|_| |_|_| \_/ \__,_|_| |_|
*/
// Minivan Base Layer
#define __________________MINIVAN1_________________ __________________DIMPLE1__________________
#define __________________MINIVAN2_________________ __________________DIMPLE2__________________
#define __________________MINIVAN3_________________ __________________DIMPLE3L_________________, __________________DIMPLE3R_________________, KC_RSFT
#define __________________MINIVAN4_________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT, MO(_FKEY)
/* Minivan Symbol Layer
#define _________________LOWER_1___________________
#define _________________LOWER_2___________________ */
#define __________________MININUM3_________________ _________________LOWER_3___________________, KC_SLSH
#define __________________MININUM4_________________ _________________LOWER_4___________________, KC_END
/* Minvian Number Layer
#define ___________________RAISE1__________________
#define ___________________RAISE2__________________ */
#define ___________________RVAN_3__________________ ___________________RAISE3__________________, KC_NO
#define ___________________RVAN_4__________________ ___________________RAISE4__________________, KC_NO
/* Minvian F-key layer
#define ___________________FKEY1___________________
#define ___________________FKEY2___________________ */
#define ___________________FVAN_3__________________ ___________________FKEY3___________________, KC_NO
#define ___________________FVAN_4__________________ ___________________FKEY4___________________, KC_TRNS
/* Minivan Adjust Layer
#define ___________________ADJST1__________________
#define ___________________ADJST2__________________ */
#define ___________________ADJVAN3_________________ ___________________ADJST3__________________, KC_NO
#define ___________________ADJVAN4_________________ ___________________ADJST4__________________, KC_TRNS
/*
_____ _____ _ ______ _____
/ ____| __ \| |/ / _ \| __ \
| | | |__) | ' /| |_) | | | |
| | | _ /| < | _ <| | | |
| |____| | \ \| . \| |_) | |__| |
\_____|_| \_\_|\_\____/|_____/
*/
// CRKBD Base Layer
#define ___________________CRKBD1__________________ __________________DIMPLE1__________________
#define ___________________CRKBD2__________________ __________________DIMPLE2__________________
#define ___________________CRKBD3__________________ __________________DIMPLE3L_________________, KC_K, KC_M,KC_COMM, KC_DOT, KC_SLSH, KC_BBB
#define ___________________CRKBD4__________________ KC_LGUI, KC_LALT,KC_ENT_LOW, KC_SPC_RSE, KC_ARROW, KC_FKEY
/* CRKBD Number layer
#define ___________________RAISE1__________________
#define ___________________RAISE1__________________ */
#define ___________________CRKBD_RAISE3____________ ___________________RVAN_3__________________
#define ___________________CRKBD_RAISE4____________ ___________________CRKBD4__________________
/* CRKBD Symbol Layer
#define _________________LOWER_1___________________
#define _________________LOWER_2___________________ */
#define ___________________CRKBD_LOW3______________ __________________MININUM3_________________
#define ___________________CRKBD_LOW4______________ ___________________CRKBD4__________________
/* CRKBD F-key layer
#define ___________________FKEY1___________________
#define ___________________FKEY2___________________ */
#define ___________________CRKBD_FKEY3_____________ ___________________FVAN_3__________________
#define ___________________CRKBD_FKEY4_____________ ___________________CRKBD4__________________
/* CRKBD adjust layer
#define ___________________ADJST1__________________ */
#define ___________________CRKBD_ADJST2____________ KC_LTOG,KC_LHUI,KC_LSAI,KC_LVAI,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________CRKBD_ADJST3____________ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________CRKBD_ADJST4____________ ___________________CRKBD4__________________
// CRKBD arrow layer
#define ___________________ARROW1__________________ KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO
#define ___________________ARROW2__________________ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO,KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO
#define ___________________ARROW3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___________________ARROW4__________________ ___________________CRKBD4__________________
// clang-format on

Loading…
Cancel
Save