Merge branch 'qmk:master' into hailey_branch

hailey_branch
Hailey Clark 3 years ago committed by GitHub
commit a13851229f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 17
      keyboards/chocv/chocv.c
  3. 43
      keyboards/chocv/chocv.h
  4. 43
      keyboards/chocv/config.h
  5. 54
      keyboards/chocv/info.json
  6. 30
      keyboards/chocv/keymaps/default/keymap.c
  7. 24
      keyboards/chocv/keymaps/default/readme.md
  8. 26
      keyboards/chocv/readme.md
  9. 20
      keyboards/chocv/rules.mk
  10. 3
      keyboards/converter/m0110_usb/config.h
  11. 112
      keyboards/coseyfannitutti/discipline/keymaps/briianpowell/keymap.c
  12. 15
      keyboards/coseyfannitutti/discipline/keymaps/briianpowell/readme.md
  13. 96
      keyboards/gentleman65/keymaps/briianpowell/keymap.c
  14. 14
      keyboards/gentleman65/keymaps/briianpowell/readme.md
  15. 100
      keyboards/gopolar/gg86/config.h
  16. 79
      keyboards/gopolar/gg86/gg86.c
  17. 116
      keyboards/gopolar/gg86/gg86.h
  18. 295
      keyboards/gopolar/gg86/info.json
  19. 48
      keyboards/gopolar/gg86/keymaps/bongocat/config.h
  20. 226
      keyboards/gopolar/gg86/keymaps/bongocat/keymap.c
  21. 378
      keyboards/gopolar/gg86/keymaps/bongocat/oled/bongocat.c
  22. 17
      keyboards/gopolar/gg86/keymaps/bongocat/oled/bongocat.h
  23. 3
      keyboards/gopolar/gg86/keymaps/bongocat/readme.md
  24. 4
      keyboards/gopolar/gg86/keymaps/bongocat/rules.mk
  25. 325
      keyboards/gopolar/gg86/keymaps/default/keymap.c
  26. 52
      keyboards/gopolar/gg86/keymaps/horrortroll/config.h
  27. 88
      keyboards/gopolar/gg86/keymaps/horrortroll/keymap.c
  28. 304
      keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h
  29. 22
      keyboards/gopolar/gg86/keymaps/horrortroll/led/cool_diagonal.c
  30. 74
      keyboards/gopolar/gg86/keymaps/horrortroll/led/custom_gradient.c
  31. 27
      keyboards/gopolar/gg86/keymaps/horrortroll/led/flower_blooming/flower_blooming.c
  32. 20
      keyboards/gopolar/gg86/keymaps/horrortroll/led/flower_blooming/flower_blooming.h
  33. 68
      keyboards/gopolar/gg86/keymaps/horrortroll/led/kitt.c
  34. 25
      keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.c
  35. 45
      keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.h
  36. 55
      keyboards/gopolar/gg86/keymaps/horrortroll/led/random_breath_rainbow.c
  37. 68
      keyboards/gopolar/gg86/keymaps/horrortroll/oled/oled_stuff.h
  38. 12
      keyboards/gopolar/gg86/keymaps/horrortroll/readme.md
  39. 17
      keyboards/gopolar/gg86/keymaps/horrortroll/rgb_matrix_user.inc
  40. 3
      keyboards/gopolar/gg86/keymaps/horrortroll/rules.mk
  41. 325
      keyboards/gopolar/gg86/keymaps/via/keymap.c
  42. 1
      keyboards/gopolar/gg86/keymaps/via/rules.mk
  43. 249
      keyboards/gopolar/gg86/lib/glcdfont.c
  44. 60
      keyboards/gopolar/gg86/lib/logo.c
  45. 17
      keyboards/gopolar/gg86/lib/logo.h
  46. 130
      keyboards/gopolar/gg86/lib/wave.h
  47. 24
      keyboards/gopolar/gg86/readme.md
  48. 32
      keyboards/gopolar/gg86/rules.mk
  49. 58
      keyboards/handwired/dqz11n1g/config.h
  50. 51
      keyboards/handwired/dqz11n1g/dqz11n1g.h
  51. 141
      keyboards/handwired/dqz11n1g/info.json
  52. 72
      keyboards/handwired/dqz11n1g/keymaps/default/keymap.c
  53. 17
      keyboards/handwired/dqz11n1g/keymaps/default/readme.md
  54. 131
      keyboards/handwired/dqz11n1g/matrix.c
  55. 80
      keyboards/handwired/dqz11n1g/readme.md
  56. 24
      keyboards/handwired/dqz11n1g/rules.mk
  57. 6
      keyboards/handwired/minorca/config.h
  58. 6
      keyboards/handwired/promethium/keymaps/default/config.h
  59. 68
      keyboards/keebmonkey/kbmg68/config.h
  60. 80
      keyboards/keebmonkey/kbmg68/info.json
  61. 20
      keyboards/keebmonkey/kbmg68/kbmg68.c
  62. 38
      keyboards/keebmonkey/kbmg68/kbmg68.h
  63. 45
      keyboards/keebmonkey/kbmg68/keymaps/default/keymap.c
  64. 27
      keyboards/keebmonkey/kbmg68/readme.md
  65. 20
      keyboards/keebmonkey/kbmg68/rules.mk
  66. 32
      keyboards/keychron/q1/rev_0100/keymaps/teimor/config.h
  67. 95
      keyboards/keychron/q1/rev_0100/keymaps/teimor/keymap.c
  68. 48
      keyboards/keychron/q1/rev_0100/keymaps/teimor/keymap_user.h
  69. 13
      keyboards/keychron/q1/rev_0100/keymaps/teimor/readme.md
  70. 91
      keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c
  71. 25
      keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.h
  72. 14
      keyboards/keychron/q1/rev_0100/keymaps/teimor/rules.mk
  73. 50
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_mac_caps.c
  74. 23
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_mac_caps.h
  75. 49
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_setup.c
  76. 38
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_setup.h
  77. 28
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_user.c
  78. 50
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_win_caps.c
  79. 23
      keyboards/keychron/q1/rev_0100/keymaps/teimor/tap_dance_win_caps.h
  80. 86
      keyboards/mechlovin/zed60/config.h
  81. 22
      keyboards/mechlovin/zed60/halconf.h
  82. 150
      keyboards/mechlovin/zed60/info.json
  83. 36
      keyboards/mechlovin/zed60/keymaps/default/keymap.c
  84. 1
      keyboards/mechlovin/zed60/keymaps/default/readme.md
  85. 50
      keyboards/mechlovin/zed60/keymaps/via/keymap.c
  86. 1
      keyboards/mechlovin/zed60/keymaps/via/readme.md
  87. 1
      keyboards/mechlovin/zed60/keymaps/via/rules.mk
  88. 23
      keyboards/mechlovin/zed60/mcuconf.h
  89. 27
      keyboards/mechlovin/zed60/readme.md
  90. 20
      keyboards/mechlovin/zed60/rules.mk
  91. 17
      keyboards/mechlovin/zed60/zed60.c
  92. 66
      keyboards/mechlovin/zed60/zed60.h
  93. 96
      keyboards/mechwild/mokulua/mirrored/config.h
  94. 10
      keyboards/mechwild/mokulua/mirrored/info.json
  95. 46
      keyboards/mechwild/mokulua/mirrored/keymaps/default/keymap.c
  96. 1
      keyboards/mechwild/mokulua/mirrored/keymaps/default/readme.md
  97. 46
      keyboards/mechwild/mokulua/mirrored/keymaps/via/keymap.c
  98. 1
      keyboards/mechwild/mokulua/mirrored/keymaps/via/readme.md
  99. 0
      keyboards/mechwild/mokulua/mirrored/keymaps/via/rules.mk
  100. 82
      keyboards/mechwild/mokulua/mirrored/mirrored.c
  101. Some files were not shown because too many files have changed in this diff Show More

4
.gitignore vendored

@ -5,6 +5,10 @@
.DS_Store .DS_Store
._* ._*
# Merge files
*.orig
*.rej
# Build artifacts # Build artifacts
.clang_complete .clang_complete
.build/ .build/

@ -0,0 +1,17 @@
/* Copyright 2021 BrickBots Labs
*
* 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 "chocv.h"

@ -0,0 +1,43 @@
/* Copyright 2021 BrickBots Labs
*
* 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
#include "quantum.h"
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_split_3x5_3( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09,\
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\
k30, k31, k32, k33, k34, k35 \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \
{ KC_NO, KC_NO, k30, k31, k32, k33, k34, k35, KC_NO, KC_NO} \
}

@ -0,0 +1,43 @@
/* Copyright 2021 BrickBots Labs
*
* 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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xBBB0
#define PRODUCT_ID 0x0002
#define DEVICE_VER 0x0001
#define MANUFACTURER BrickBots Labs
#define PRODUCT chocV
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 10
#define MATRIX_ROW_PINS { F4, F5, D1, D0 }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, C6, D7, E6, B4, B5}
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

@ -0,0 +1,54 @@
{
"keyboard_name": "chocV",
"url": "https://github.com/brickbots/chocV",
"maintainer": "Brickbots",
"layouts": {
"LAYOUT_split_3x5_3": {
"layout": [
{"label":"Q", "x":0, "y":0.3},
{"label":"W", "x":1, "y":0.1},
{"label":"E", "x":2, "y":0},
{"label":"R", "x":3, "y":0.1},
{"label":"T", "x":4, "y":0.2},
{"label":"Y", "x":8, "y":0.2},
{"label":"U", "x":9, "y":0.1},
{"label":"I", "x":10, "y":0},
{"label":"O", "x":11, "y":0.1},
{"label":"P", "x":12, "y":0.3},
{"label":"A", "x":0, "y":1.3},
{"label":"S", "x":1, "y":1.1},
{"label":"D", "x":2, "y":1},
{"label":"F", "x":3, "y":1.1},
{"label":"G", "x":4, "y":1.2},
{"label":"H", "x":8, "y":1.2},
{"label":"J", "x":9, "y":1.1},
{"label":"K", "x":10, "y":1},
{"label":"L", "x":11, "y":1.1},
{"label":";", "x":12, "y":1.3},
{"label":"Z", "x":0, "y":2.3},
{"label":"X", "x":1, "y":2.1},
{"label":"C", "x":2, "y":2},
{"label":"V", "x":3, "y":2.1},
{"label":"B", "x":4, "y":2.2},
{"label":"N", "x":8, "y":2.2},
{"label":"M", "x":9, "y":2.1},
{"label":",", "x":10, "y":2},
{"label":".", "x":11, "y":2.1},
{"label":"/", "x":12, "y":2.3},
{"label":"KC_LSFT", "x":3, "y":3.7},
{"label":"LC_LALT", "x":4, "y":3.7},
{"label":"KC_ENT", "x":5, "y":3.2, "h":1.5},
{"label":"KC_SPC", "x":7, "y":3.2, "h":1.5},
{"label":"KC_DEL", "x":8, "y":3.7},
{"label":"KC_RCTL", "x":9, "y":3.7}
]
}
}
}

@ -0,0 +1,30 @@
/* Copyright 2021 BrickBots Labs
*
* 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
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_QWERTY,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_split_3x5_3(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LSFT, KC_LALT, KC_ENT, KC_SPC, KC_DEL, KC_RCTL
),
};

@ -0,0 +1,24 @@
# chocV Keymap
The default keymap provided here is useful for testing and as a base
for your own mapping, but does not include layers and is missing many
keycodes. To build the default keymap for testing:
make chocv:default
## Give Miryoku a try
If you are looking for a full fetured keymap, you can build the
firmware with Miryoku without any additional work
For details and building instructions and options please see the
[The official Miryoku QMK
Repo](https://github.com/manna-harbour/miryoku_qmk/tree/miryoku/users/manna-harbour_miryoku)
The command to build with the default Miryoku layout is:
make chocv:manna-habour_miryoku

@ -0,0 +1,26 @@
# chocV
A 36 key choc keyboard based on the [Horizon](https://github.com/skarrmann/horizon)
construction and a trimmed down [BabyV](https://www.instagram.com/eyeohdesigns/?hl=en) layout!
![chocV Lineage](https://raw.githubusercontent.com/brickbots/chocV/main/images/lineage.jpeg "chocV Lineage")
* Keyboard Maintainer: [Brickbots](https://github.com/brickbots)
* Hardware Supported: The chocV PCB is public domain and is compatible with any
pro-micro footprint MCU
* Hardware Availability: [The chocV github repo](https://github.com/brickbots/chocV)
Make example for this keyboard (after setting up your build environment):
make chocv:default
Flashing example for this keyboard:
make chocv:default:flash
## Bootloader
Enter the bootloader using the hardware reset button on the top middle of the
near the MCU.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

@ -0,0 +1,20 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = qmk-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LAYOUTS = split_3x5_3

@ -42,9 +42,6 @@ Ported to QMK by Techsock <info@techsock.com>
get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \
) )
/* boot magic key */
#define BOOTMAGIC_KEY_SALT KC_M
/* ports */ /* ports */
#define M0110_CLOCK_PORT PORTD #define M0110_CLOCK_PORT PORTD
#define M0110_CLOCK_PIN PIND #define M0110_CLOCK_PIN PIND

@ -0,0 +1,112 @@
/* Copyright 2019 COSEYFANNITUTTI
*
* 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
#define FN_ESC LT(_FUNC, KC_ESC)
enum discipline_layers {
_QWERTY,
_WORKMAN,
_FUNC,
};
enum discpline_keycodes {
QWERTY = SAFE_RANGE,
WORKMAN,
FUNC,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY: Default Layer
* ,--------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backs| `~|
* |---------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del|
* |---------------------------------------------------------------|
* |Fn/CL | A| S| D| F| G| H| J| K| L| ;| '| Enter|PgU|
* |---------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
* |---------------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_65_ansi(
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_BSPC, 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_BSLS, KC_DEL,
FN_ESC, 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_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL,KC_LEFT, KC_DOWN, KC_RGHT
),
/* Workman
* ,---------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backs| `~|
* |---------------------------------------------------------------|
* |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| Del|
* |---------------------------------------------------------------|
* |Fn/CL | A| S| H| T| G| Y| N| E| O| I| '| Enter| PgU|
* |---------------------------------------------------------------|
* |Shift | Z| X| M| C| V| K| L| ,| .| /|Shift |Up| PgD|
* |---------------------------------------------------------------|
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_WORKMAN] = LAYOUT_65_ansi(
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_BSPC, KC_GRV,
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
FN_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Function
* ,---------------------------------------------------------------.
* |RST| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
* |---------------------------------------------------------------|
* | | | | | | | | | | | | | | |INS|
* |---------------------------------------------------------------|
* | | | | | | | | | | | | | |HME|
* |---------------------------------------------------------------|
* | | | | | | | | | | | | | |VL+|END|
* |---------------------------------------------------------------|
* | | | | PLY/PS | | | | |PRV|VL-|NXT|
* `---------------------------------------------------------------'
*/
[_FUNC] = LAYOUT_65_ansi(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______, RESET,
_______,KC_WH_U,KC_BTN1,KC_MS_U,KC_BTN2,_______,_______,AG_NORM,AG_SWAP,QWERTY,WORKMAN,_______,_______,_______, KC_INS,
_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP,
_______,KC_WH_L,KC_BTN3,KC_WH_R,_______,_______,_______,_______,_______,_______,_______, _______,KC_VOLU, KC_PGDN,
_______,_______,_______, KC_MPLY, _______,_______,_______,KC_MPRV,KC_VOLD, KC_MNXT
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN);
}
return false;
}
return true;
}

@ -0,0 +1,15 @@
# Discipline Keyboard Compilation
## Features
- Base Layers
- QWERTY
- Workman
- Mouse Keys
- Entertainment Keys
## Building and flashing
```
make coseyfannitutti/discipline:briianpowell:flash
```

@ -0,0 +1,96 @@
/* Copyright 2021 Omar Afzal
*
* 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
#define FN_ESC LT(_FUNC, KC_ESC)
enum gentleman_layers {
_QWERTY,
_WORKMAN,
_FUNC,
};
enum gentleman_keycodes {
QWERTY = SAFE_RANGE,
WORKMAN,
FUNC,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_all(
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_BSPC, KC_BSPC, KC_TRNS,
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_BSLS, KC_DEL,
FN_ESC, 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_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_WORKMAN] = LAYOUT_all(
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_BSPC, KC_BSPC, KC_TRNS,
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
FN_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_FUNC] = LAYOUT_all(
KC_GRV, 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_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, AG_NORM, AG_SWAP, QWERTY, WORKMAN, KC_TRNS, KC_INS,
KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, KC_END, KC_TRNS, KC_HOME,
KC_TRNS, KC_WH_L, KC_BTN3, KC_WH_R, KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_SAI, RGB_SAD, KC_TRNS, RGB_HUI, KC_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, RGB_HUD, KC_MNXT
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case _FUNC:
// Vertical Scroll
clockwise ? tap_code(KC_WH_D) : tap_code(KC_WH_U);
return false;
break;
default:
// Horizontal Scroll
if ((get_mods() & MOD_BIT(KC_LSFT)) == MOD_BIT(KC_LSFT)) {
clockwise ? tap_code(KC_WH_D) : tap_code(KC_WH_U);
return false;
}
// Volume
clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN);
break;
}
}
return false;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN);
}
return false;
}
return true;
}

@ -0,0 +1,14 @@
# Gentleman65 Keyboard Compilation
## Features
- Base Layers
- QWERTY
- Workman
- Entertainment Keys
## Building and flashing
```
make gentleman65:briianpowell:flash
```

@ -0,0 +1,100 @@
/* Copyright 2021 Gopolar
*
* 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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x0007
#define PRODUCT_ID 0x0007
#define DEVICE_VER 0x0001
#define MANUFACTURER Gopolar
#define PRODUCT GG86 Tai-Chi
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 17
/* key matrix pins */
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D5 }
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C6, B6, B5, B4, D7, D6, D4, C7, E6, D2, D3 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Forcing to use NKRO instead 6KRO */
#define FORCE_NKRO
/* Change larger keys per scan for elite gaming */
#define QMK_KEYS_PER_SCAN 12
/* Use the custom font */
#define OLED_FONT_H "lib/glcdfont.c"
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix config */
#define RGB_DI_PIN E2
#define DRIVER_LED_TOTAL 100
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_KEYPRESSES
/* RGB Matrix effect */
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_BAND_SAT
#define ENABLE_RGB_MATRIX_BAND_VAL
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_HUE_BREATHING
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
#define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

@ -0,0 +1,79 @@
/* Copyright 2021 Gopolar
*
* 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 "gg86.h"
// OLED animation
#include "lib/logo.h"
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
{ 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, NO_LED, 74, 73, 72 },
{ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 },
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38 },
{ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, NO_LED, 37, NO_LED, NO_LED, NO_LED },
{ 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, NO_LED, 10, NO_LED },
{ 0, 1, 2, NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, 4, 5, 6, NO_LED, 7, 8, 9 }
}, {
// Key matrix (0 -> 87)
{3 , 64}, {19 , 64}, {36 , 64}, {91 , 64}, {146, 64}, {162, 64}, {179, 64}, {198, 64}, {211, 64}, {224, 64},
{211, 52}, {182, 52}, {170, 52}, {146, 52}, {133, 52}, {120, 52}, {107, 52}, {94 , 52}, {81 , 52}, {68 , 52}, {55 , 52}, {42 , 52}, {29 , 52}, {16 , 52}, {2 , 52},
{2 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {174, 41},
{224, 29}, {211, 29}, {198, 29}, {179, 29}, {162, 29}, {149, 29}, {136, 29}, {123, 29}, {110, 29}, {97 , 29}, {84 , 29}, {71 , 29}, {58 , 29}, {45 , 29}, {32 , 29}, {19 , 29}, {3 , 29},
{0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17},
{224, 0}, {211, 0}, {198, 0}, {182, 0}, {169, 0}, {156, 0}, {143, 0}, {123, 0}, {110, 0}, {97 , 0}, {84 , 0}, {65 , 0}, {52 , 0}, {39 , 0}, {26 , 0}, {0 , 0},
// Underglow (88 -> 99)
{1 , 6}, {50 , 6}, {89 , 6}, {135, 6}, {176, 6}, {198, 6}, {221, 55}, {192, 58}, {138, 59}, {96 , 61}, {42 , 59}, {7 , 60},
}, {
// Key matrix (0 -> 87)
1, 1, 1, 4, 1, 1, 1, 4, 4, 4,
4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
8, 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, 4, 4, 4, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
// Underglow (88 -> 99)
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
} };
#endif
#ifdef OLED_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
startup_timer = timer_read();
return rotation;
}
bool oled_task_kb(void) {
static bool finished_logo = false;
if ((timer_elapsed(startup_timer) < 5000) && !finished_logo) {
render_logo();
} else {
finished_logo = true;
if (!oled_task_user()) {
return false;
}
}
return true;
}
#endif

@ -0,0 +1,116 @@
/* Copyright 2021 Gopolar
*
* 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
#include "quantum.h"
#define XXX KC_NO
/* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0E 0F 0G
*
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 2G
*
* 30 31 32 33 34 35 36 37 38 39 3A 3B 3D
*
* 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4F
*
* 50 51 52 55 5A 5B 5C 5E 5F 5G
*
*/
#define LAYOUT_all( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \
K50, K51, K52, K55, K5A, K5B, K5C, K5E, K5F, K5G \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F, K0G }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, XXX, XXX }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, XXX, K4F, XXX }, \
{ K50, K51, K52, XXX, XXX, K55, XXX, XXX, XXX, XXX, K5A, K5B, K5C, XXX, K5E, K5F, K5G }, \
}
/* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0E 0F 0G
*
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 2G
*
* 30 31 32 33 34 35 36 37 38 39 3A 3B 3D
*
* 40 42 43 44 45 46 47 48 49 4A 4B 4C 4F
*
* 50 51 52 55 5A 5B 5C 5E 5F 5G
*
*/
#define LAYOUT_tkl_ansi_tsangan( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \
K50, K51, K52, K55, K5A, K5B, K5C, K5E, K5F, K5G \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F, K0G }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, XXX, XXX }, \
{ K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, XXX, K4F, XXX }, \
{ K50, K51, K52, XXX, XXX, K55, XXX, XXX, XXX, XXX, K5A, K5B, K5C, XXX, K5E, K5F, K5G }, \
}
/* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0E 0F 0G
*
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2E 2F 2G
* 3D
* 30 31 32 33 34 35 36 37 38 39 3A 3B 2D
*
* 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4F
*
* 50 51 52 55 5A 5B 5C 5E 5F 5G
*
*/
#define LAYOUT_tkl_iso_tsangan( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K2D, K3D, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \
K50, K51, K52, K55, K5A, K5B, K5C, K5E, K5F, K5G \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F, K0G }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, XXX, XXX }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, XXX, K4F, XXX }, \
{ K50, K51, K52, XXX, XXX, K55, XXX, XXX, XXX, XXX, K5A, K5B, K5C, XXX, K5E, K5F, K5G }, \
}

@ -0,0 +1,295 @@
{
"keyboard_name": "GG86",
"url": "",
"maintainer": "Gopolar",
"layouts": {
"LAYOUT_all": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0},
{"label":"Print Screen", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0},
{"label":"`~", "x":0, "y":1.5},
{"label":"1!", "x":1, "y":1.5},
{"label":"2@", "x":2, "y":1.5},
{"label":"3#", "x":3, "y":1.5},
{"label":"4$", "x":4, "y":1.5},
{"label":"5%", "x":5, "y":1.5},
{"label":"6^", "x":6, "y":1.5},
{"label":"7&", "x":7, "y":1.5},
{"label":"8*", "x":8, "y":1.5},
{"label":"9(", "x":9, "y":1.5},
{"label":"0)", "x":10, "y":1.5},
{"label":"-_", "x":11, "y":1.5},
{"label":"=+", "x":12, "y":1.5},
{"label":"Backspace", "x":13, "y":1.5, "w":2},
{"label":"Insert", "x":15.25, "y":1.5},
{"label":"Home", "x":16.25, "y":1.5},
{"label":"PgUp", "x":17.25, "y":1.5},
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
{"label":"Q", "x":1.5, "y":2.5},
{"label":"W", "x":2.5, "y":2.5},
{"label":"E", "x":3.5, "y":2.5},
{"label":"R", "x":4.5, "y":2.5},
{"label":"T", "x":5.5, "y":2.5},
{"label":"Y", "x":6.5, "y":2.5},
{"label":"U", "x":7.5, "y":2.5},
{"label":"I", "x":8.5, "y":2.5},
{"label":"O", "x":9.5, "y":2.5},
{"label":"P", "x":10.5, "y":2.5},
{"label":"[{", "x":11.5, "y":2.5},
{"label":"]}", "x":12.5, "y":2.5},
{"label":"\\| / ISO Hash", "x":13.5, "y":2.5, "w":1.5},
{"label":"Delete", "x":15.25, "y":2.5},
{"label":"End", "x":16.25, "y":2.5},
{"label":"PgDn", "x":17.25, "y":2.5},
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
{"label":"A", "x":1.75, "y":3.5},
{"label":"S", "x":2.75, "y":3.5},
{"label":"D", "x":3.75, "y":3.5},
{"label":"F", "x":4.75, "y":3.5},
{"label":"G", "x":5.75, "y":3.5},
{"label":"H", "x":6.75, "y":3.5},
{"label":"J", "x":7.75, "y":3.5},
{"label":"K", "x":8.75, "y":3.5},
{"label":"L", "x":9.75, "y":3.5},
{"label":";:", "x":10.75, "y":3.5},
{"label":"'\"", "x":11.75, "y":3.5},
{"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
{"label":"Shift", "x":0, "y":4.5, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":4.5},
{"label":"Z", "x":2.25, "y":4.5},
{"label":"X", "x":3.25, "y":4.5},
{"label":"C", "x":4.25, "y":4.5},
{"label":"V", "x":5.25, "y":4.5},
{"label":"B", "x":6.25, "y":4.5},
{"label":"N", "x":7.25, "y":4.5},
{"label":"M", "x":8.25, "y":4.5},
{"label":",<", "x":9.25, "y":4.5},
{"label":".>", "x":10.25, "y":4.5},
{"label":"/?", "x":11.25, "y":4.5},
{"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
{"label":"Shift", "x":14, "y":4.5},
{"label":"\u2191", "x":16.25, "y":4.5},
{"label":"Ctrl", "x":0, "y":5.5, "w":1.5},
{"label":"Win", "x":1.5, "y":5.5},
{"label":"Alt", "x":2.5, "y":5.5, "w":1.5},
{"label":"Space", "x":4, "y":5.5, "w":7},
{"label":"Alt", "x":11, "y":5.5, "w":1.5},
{"label":"Fn", "x":12.5, "y":5.5},
{"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5},
{"label":"\u2190", "x":15.25, "y":5.5},
{"label":"\u2193", "x":16.25, "y":5.5},
{"label":"\u2192", "x":17.25, "y":5.5}
]
}
"LAYOUT_tkl_ansi_tsangan": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0},
{"label":"Print Screen", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0},
{"label":"`~", "x":0, "y":1.5},
{"label":"1!", "x":1, "y":1.5},
{"label":"2@", "x":2, "y":1.5},
{"label":"3#", "x":3, "y":1.5},
{"label":"4$", "x":4, "y":1.5},
{"label":"5%", "x":5, "y":1.5},
{"label":"6^", "x":6, "y":1.5},
{"label":"7&", "x":7, "y":1.5},
{"label":"8*", "x":8, "y":1.5},
{"label":"9(", "x":9, "y":1.5},
{"label":"0)", "x":10, "y":1.5},
{"label":"-_", "x":11, "y":1.5},
{"label":"=+", "x":12, "y":1.5},
{"label":"Backspace", "x":13, "y":1.5, "w":2},
{"label":"Insert", "x":15.25, "y":1.5},
{"label":"Home", "x":16.25, "y":1.5},
{"label":"PgUp", "x":17.25, "y":1.5},
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
{"label":"Q", "x":1.5, "y":2.5},
{"label":"W", "x":2.5, "y":2.5},
{"label":"E", "x":3.5, "y":2.5},
{"label":"R", "x":4.5, "y":2.5},
{"label":"T", "x":5.5, "y":2.5},
{"label":"Y", "x":6.5, "y":2.5},
{"label":"U", "x":7.5, "y":2.5},
{"label":"I", "x":8.5, "y":2.5},
{"label":"O", "x":9.5, "y":2.5},
{"label":"P", "x":10.5, "y":2.5},
{"label":"[{", "x":11.5, "y":2.5},
{"label":"]}", "x":12.5, "y":2.5},
{"label":"\\|", "x":13.5, "y":2.5, "w":1.5},
{"label":"Delete", "x":15.25, "y":2.5},
{"label":"End", "x":16.25, "y":2.5},
{"label":"PgDn", "x":17.25, "y":2.5},
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
{"label":"A", "x":1.75, "y":3.5},
{"label":"S", "x":2.75, "y":3.5},
{"label":"D", "x":3.75, "y":3.5},
{"label":"F", "x":4.75, "y":3.5},
{"label":"G", "x":5.75, "y":3.5},
{"label":"H", "x":6.75, "y":3.5},
{"label":"J", "x":7.75, "y":3.5},
{"label":"K", "x":8.75, "y":3.5},
{"label":"L", "x":9.75, "y":3.5},
{"label":";:", "x":10.75, "y":3.5},
{"label":"'\"", "x":11.75, "y":3.5},
{"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
{"label":"Shift", "x":0, "y":4.5, "w":2.25},
{"label":"Z", "x":2.25, "y":4.5},
{"label":"X", "x":3.25, "y":4.5},
{"label":"C", "x":4.25, "y":4.5},
{"label":"V", "x":5.25, "y":4.5},
{"label":"B", "x":6.25, "y":4.5},
{"label":"N", "x":7.25, "y":4.5},
{"label":"M", "x":8.25, "y":4.5},
{"label":",<", "x":9.25, "y":4.5},
{"label":".>", "x":10.25, "y":4.5},
{"label":"/?", "x":11.25, "y":4.5},
{"label":"Shift", "x":12.25, "y":4.5, "w":2.75},
{"label":"\u2191", "x":16.25, "y":4.5},
{"label":"Ctrl", "x":0, "y":5.5, "w":1.5},
{"label":"Win", "x":1.5, "y":5.5},
{"label":"Alt", "x":2.5, "y":5.5, "w":1.5},
{"label":"Space", "x":4, "y":5.5, "w":7},
{"label":"Alt", "x":11, "y":5.5, "w":1.5},
{"label":"Fn", "x":12.5, "y":5.5},
{"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5},
{"label":"\u2190", "x":15.25, "y":5.5},
{"label":"\u2193", "x":16.25, "y":5.5},
{"label":"\u2192", "x":17.25, "y":5.5}
]
}
"LAYOUT_tkl_iso_tsangan": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0},
{"label":"Print Screen", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0},
{"label":"`~", "x":0, "y":1.5},
{"label":"1!", "x":1, "y":1.5},
{"label":"2@", "x":2, "y":1.5},
{"label":"3#", "x":3, "y":1.5},
{"label":"4$", "x":4, "y":1.5},
{"label":"5%", "x":5, "y":1.5},
{"label":"6^", "x":6, "y":1.5},
{"label":"7&", "x":7, "y":1.5},
{"label":"8*", "x":8, "y":1.5},
{"label":"9(", "x":9, "y":1.5},
{"label":"0)", "x":10, "y":1.5},
{"label":"-_", "x":11, "y":1.5},
{"label":"=+", "x":12, "y":1.5},
{"label":"Backspace", "x":13, "y":1.5, "w":2},
{"label":"Insert", "x":15.25, "y":1.5},
{"label":"Home", "x":16.25, "y":1.5},
{"label":"PgUp", "x":17.25, "y":1.5},
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
{"label":"Q", "x":1.5, "y":2.5},
{"label":"W", "x":2.5, "y":2.5},
{"label":"E", "x":3.5, "y":2.5},
{"label":"R", "x":4.5, "y":2.5},
{"label":"T", "x":5.5, "y":2.5},
{"label":"Y", "x":6.5, "y":2.5},
{"label":"U", "x":7.5, "y":2.5},
{"label":"I", "x":8.5, "y":2.5},
{"label":"O", "x":9.5, "y":2.5},
{"label":"P", "x":10.5, "y":2.5},
{"label":"[{", "x":11.5, "y":2.5},
{"label":"]}", "x":12.5, "y":2.5},
{"label":"Delete", "x":15.25, "y":2.5},
{"label":"End", "x":16.25, "y":2.5},
{"label":"PgDn", "x":17.25, "y":2.5},
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
{"label":"A", "x":1.75, "y":3.5},
{"label":"S", "x":2.75, "y":3.5},
{"label":"D", "x":3.75, "y":3.5},
{"label":"F", "x":4.75, "y":3.5},
{"label":"G", "x":5.75, "y":3.5},
{"label":"H", "x":6.75, "y":3.5},
{"label":"J", "x":7.75, "y":3.5},
{"label":"K", "x":8.75, "y":3.5},
{"label":"L", "x":9.75, "y":3.5},
{"label":";:", "x":10.75, "y":3.5},
{"label":"'\"", "x":11.75, "y":3.5},
{"label":"ISO Hash", "x":12.75, "y":3.5},
{"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":4.5, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":4.5},
{"label":"Z", "x":2.25, "y":4.5},
{"label":"X", "x":3.25, "y":4.5},
{"label":"C", "x":4.25, "y":4.5},
{"label":"V", "x":5.25, "y":4.5},
{"label":"B", "x":6.25, "y":4.5},
{"label":"N", "x":7.25, "y":4.5},
{"label":"M", "x":8.25, "y":4.5},
{"label":",<", "x":9.25, "y":4.5},
{"label":".>", "x":10.25, "y":4.5},
{"label":"/?", "x":11.25, "y":4.5},
{"label":"Shift", "x":12.25, "y":4.5, "w":2.75},
{"label":"\u2191", "x":16.25, "y":4.5},
{"label":"Ctrl", "x":0, "y":5.5, "w":1.5},
{"label":"Win", "x":1.5, "y":5.5},
{"label":"Alt", "x":2.5, "y":5.5, "w":1.5},
{"label":"Space", "x":4, "y":5.5, "w":7},
{"label":"Alt", "x":11, "y":5.5, "w":1.5},
{"label":"Fn", "x":12.5, "y":5.5},
{"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5},
{"label":"\u2190", "x":15.25, "y":5.5},
{"label":"\u2193", "x":16.25, "y":5.5},
{"label":"\u2192", "x":17.25, "y":5.5}
]
}
}
}

@ -0,0 +1,48 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
/* Additional thing to reduce compiled size */
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
#define NO_ACTION_ONESHOT
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix config */
#undef RGB_MATRIX_KEYPRESSES
/* RGB Matrix effect */
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#undef ENABLE_RGB_MATRIX_BREATHING
#undef ENABLE_RGB_MATRIX_BAND_SAT
#undef ENABLE_RGB_MATRIX_BAND_VAL
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#undef ENABLE_RGB_MATRIX_RAINDROPS
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#undef ENABLE_RGB_MATRIX_HUE_PENDULUM
#undef ENABLE_RGB_MATRIX_HUE_WAVE
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
#endif

@ -0,0 +1,226 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
// OLED animation
#include "oled/bongocat.h"
#include <string.h>
#include <math.h>
#include <lib/lib8tion/lib8tion.h>
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_names {
_BASE,
_FN,
};
enum user_rgb_mode {
RGB_MODE_ALL,
RGB_MODE_KEYLIGHT,
RGB_MODE_UNDERGLOW,
RGB_MODE_NONE,
};
typedef union {
uint32_t raw;
struct {
uint8_t rgb_mode :8;
};
} user_config_t;
user_config_t user_config;
// enum layer_keycodes { };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12 PScScrPse
` 1 2 3 4 5 6 7 8 9 0 - = Bckspc HomScrPse
Tab q w e r t y u i o p [ ] \ EndScrPse
Caps a s d f g h j k l ; ' Enter
LSft \ z x c v b n m , . / RSft RSt
LCrl GUI LAlt Space RAlt Fn RCrl
~ ! @ # $ % ^ & * ( ) _ +
Q W E R T Y U I O P { } |
Caps A S D F G H J K L : " │ │
LSft | Z X C V B N M < > ? RSft RSt
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_BASE] = LAYOUT_all(
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_PSCR, KC_SLCK, KC_PAUSE,
KC_GRV, 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_BSPC, KC_INS, KC_HOME, KC_PGUP,
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_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
Slp M_TF13F14F15 F16RfhStp Est VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_FN] = LAYOUT_all(
KC_SLEP, RGB_M_T, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, EEP_RST, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
};
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
switch (user_config.rgb_mode) {
case RGB_MODE_ALL:
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
break;
case RGB_MODE_KEYLIGHT:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_NONE:
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
break;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_KEYLIGHT;
}
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_UNDERGLOW;
}
break;
case (LED_FLAG_UNDERGLOW): {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_NONE;
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
user_config.rgb_mode = RGB_MODE_ALL;
}
break;
}
eeconfig_update_user(user_config.raw);
}
return false;
}
return true;
}
void rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
RGB rgb = hsv_to_rgb(hsv);
if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
}
} else {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(25, 0, 0, 0);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(73, 0, 0, 0);
}
}
}
#ifdef OLED_ENABLE
bool oled_task_user(void) {
led_t led_usb_state = host_keyboard_led_state();
render_bongocat();
oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top)
oled_write_P(PSTR("WPM:"), false);
oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string
oled_set_cursor(17, 2);
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
oled_set_cursor(17, 3);
oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false);
return true;
}
#endif

@ -0,0 +1,378 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "quantum.h"
// WPM-responsive animation stuff here
#define IDLE_FRAMES 5
#define IDLE_SPEED 10 // below this wpm value your animation will idle
// #define PREP_FRAMES 1 // uncomment if >1
#define TAP_FRAMES 2
#define ANIM_WPM_LOWER 20 // above this wpm value typing animation to trigger
#define ANIM_FRAME_DURATION_MAX 450 // longest animation duration in ms
#define ANIM_FRAME_DURATION_MIN 100 // shortest animation duration in ms
#define IDLE_FRAME_DURATION 300 // how long each frame lasts in ms
#define ANIM_FRAME_RATIO 2.5 // how aggressively animation speeds up with wpm
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
#define ANIM_SIZE 525 // number of bytes in array, minimize for adequate firmware size, max is 1024
#define MAX(x, y) (((x) > (y)) ? (x) : (y)) // Math.max macro
uint32_t curr_anim_duration = 0; // variable animation duration
uint32_t bongo_timer = 0;
uint32_t bongo_sleep = 0;
uint8_t current_idle_frame = 0;
// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1
uint8_t current_tap_frame = 0;
// Code containing pixel art, contains:
// 5 idle frames, 1 prep frame, and 2 tap frames
// To make your own pixel art:
// save a png/jpeg of an 128x32 image (resource: https://www.pixilart.com/draw )
// follow this guide up to and including "CONVERT YOUR IMAGE" https://docs.splitkb.com/hc/en-us/articles/360013811280-How-do-I-convert-an-image-for-use-on-an-OLED-display-
// replace numbers in brackets with your own
// if you start getting errors when compiling make sure you didn't accedentally delete a bracket
void render_bongocat(void) {
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
//Idle 1 - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0,
0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
//Idle 2 - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0xf0,
0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x9f, 0x9f, 0xff,
0xff, 0x7f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1e, 0x1e, 0x3f, 0x3d, 0x3d, 0x3e, 0x7f, 0x7f, 0x7f, 0x7f, 0xf9, 0xf9, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
//Idle 3 - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0,
0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x9f, 0x9f, 0xff,
0xff, 0x7f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, 0x7e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1e, 0x1e, 0x3f, 0x3d, 0x3d, 0x3e, 0x7f, 0x7f, 0x7f, 0x7f, 0xf9, 0xf9, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
//Idle 4 - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0,
0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0x3c, 0x1c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
//Idle 5 - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0,
0xf8, 0xfc, 0xfe, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
};
static const char PROGMEM prep[][ANIM_SIZE] = {
{
//Prepare - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0,
0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0xf0, 0xf8,
0xdc, 0x36, 0x3e, 0xee, 0xfc, 0xe0, 0x9c, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7e, 0xbe, 0xbc, 0xbc, 0x7c, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x44, 0xc4, 0xc4, 0x68, 0x78,
0x59, 0x89, 0x91, 0x91, 0xd3, 0xf3, 0xa3, 0x23, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0x81,
0xfa, 0xff, 0xe6, 0xe7, 0xfd, 0xff, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x13, 0x12, 0x3c,
0x2c, 0x26, 0x27, 0x45, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x34, 0x3c, 0x2c, 0x44, 0xc8, 0xc8,
0xe9, 0xb9, 0x11, 0x11, 0x13, 0x93, 0xe3, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
};
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
{
//Tap left - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0,
0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0xf0, 0xf8,
0xdc, 0x36, 0x3e, 0xee, 0xfc, 0xe0, 0x9c, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x30, 0x38, 0x2c, 0x44, 0xc4, 0xc4, 0x68, 0x78,
0x59, 0x89, 0x91, 0x91, 0xd3, 0xf3, 0xa3, 0x23, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x3f, 0x1f, 0x07, 0x83, 0xc0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x13, 0x12, 0x3c,
0x2c, 0x26, 0x27, 0x45, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x24, 0x18, 0x3c, 0x7e, 0x7f, 0x7f,
0x7f, 0xbf, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x11, 0x11, 0x21, 0x23, 0x23, 0x21, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
//Tap right - 128x32
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0x9c, 0xf8, 0xfc, 0xfe, 0x80, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0,
0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x38, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x31, 0x00, 0x08,
0x10, 0x10, 0x10, 0x10, 0xa0, 0xa0, 0x20, 0x20, 0x40, 0x46, 0x4f, 0x5f, 0x9f, 0x9c, 0x90, 0x80,
0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xff,
0xff, 0xbf, 0x7f, 0x7f, 0xbf, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7e, 0xbe, 0xbc, 0xbc, 0x7c, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07, 0x0f, 0x0f, 0x0f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x0f, 0x8f, 0xc7, 0xe3, 0x31, 0x38, 0x2c, 0x04, 0x64, 0xf8, 0xfe, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0x8f, 0x27, 0x27, 0x27, 0xc7, 0xc7, 0x4f, 0x4f, 0x8f, 0x8f,
0x9f, 0x9f, 0x1f, 0x1f, 0x3f, 0x3e, 0x3e, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0xfc, 0xfc, 0xff, 0x81,
0xfa, 0xff, 0xe6, 0xe7, 0xfd, 0xff, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x60, 0x30, 0x10, 0x18, 0x08, 0x08, 0x08, 0x18, 0x10, 0x30,
0x60, 0x40, 0xc0, 0x86, 0x87, 0x85, 0xc4, 0x49, 0x69, 0x3e, 0x0e, 0x13, 0x11, 0x12, 0x12, 0x3d,
0x2d, 0x25, 0x26, 0x44, 0x68, 0x78, 0x58, 0x9d, 0x97, 0x93, 0xe3, 0x62, 0x34, 0x3c, 0x2c, 0x26,
0xc7, 0xc5, 0x69, 0x39, 0x19, 0x1d, 0x36, 0xa2, 0xe2, 0x62, 0x34, 0x3c, 0x2c, 0x44, 0xc8, 0xc8,
0xe9, 0xb9, 0x11, 0x11, 0x13, 0x93, 0xe3, 0x63, 0x27, 0x27, 0x47, 0x47, 0xcf, 0xcf, 0x0f, 0x08,
0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
};
// assumes 1 frame prep stage
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() < ANIM_WPM_LOWER) {
// oled_write_raw_P(prep[abs((PREP_FRAMES-1)-current_prep_frame)], ANIM_SIZE); // uncomment if IDLE_FRAMES >1
oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1
}
if (get_current_wpm() >= ANIM_WPM_LOWER) {
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE);
}
}
// variable animation duration. Don't want this value to get near zero as it'll bug out.
curr_anim_duration = MAX(ANIM_FRAME_DURATION_MIN, ANIM_FRAME_DURATION_MAX - ANIM_FRAME_RATIO * get_current_wpm());
if (get_current_wpm() > ANIM_WPM_LOWER) {
oled_on(); // not essential but turns on animation OLED with any alpha keypress
if (timer_elapsed32(bongo_timer) > curr_anim_duration) {
bongo_timer = timer_read32();
animation_phase();
}
bongo_sleep = timer_read32();
} else {
if (timer_elapsed32(bongo_sleep) > OLED_TIMEOUT) {
oled_off();
} else {
if (timer_elapsed32(bongo_timer) > IDLE_FRAME_DURATION) {
bongo_timer = timer_read32();
animation_phase();
}
}
}
}

@ -0,0 +1,17 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
void render_bongocat(void);

@ -0,0 +1,3 @@
# Keymap with VIA and Bongo Cat on OLED
Keymap is default 87 qwerty, with TKL 7u-spacebar layout

@ -0,0 +1,4 @@
SRC += oled/bongocat.c
VIA_ENABLE = yes
WPM_ENABLE = yes

@ -0,0 +1,325 @@
/* Copyright 2021 Gopolar
*
* 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
// OLED animation
#include "lib/wave.h"
#include <string.h>
#include <math.h>
#include <lib/lib8tion/lib8tion.h>
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
// enum layer_names { };
enum user_rgb_mode {
RGB_MODE_ALL,
RGB_MODE_KEYLIGHT,
RGB_MODE_UNDERGLOW,
RGB_MODE_NONE,
};
typedef union {
uint32_t raw;
struct {
uint8_t rgb_mode :8;
};
} user_config_t;
user_config_t user_config;
// enum layer_keycodes { };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12 PScScrPse
` 1 2 3 4 5 6 7 8 9 0 - = Bckspc HomScrPse
Tab q w e r t y u i o p [ ] \ EndScrPse
Caps a s d f g h j k l ; ' Enter
LSft \ z x c v b n m , . / RSft RSt
LCrl GUI LAlt Space RAlt Fn RCrl
~ ! @ # $ % ^ & * ( ) _ +
Q W E R T Y U I O P { } |
Caps A S D F G H J K L : " │ │
LSft | Z X C V B N M < > ? RSft RSt
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[0] = LAYOUT_all(
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_PSCR, KC_SLCK, KC_PAUSE,
KC_GRV, 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_BSPC, KC_INS, KC_HOME, KC_PGUP,
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_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
Slp M_TF13F14F15 F16RfhStp Est VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[1] = LAYOUT_all(
KC_SLEP, RGB_M_T, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, EEP_RST, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
/*
Slp F13F14F15F16 RfhStp VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[2] = LAYOUT_all(
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
/*
Slp F13F14F15F16 RfhStp VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[3] = LAYOUT_all(
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
};
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
switch (user_config.rgb_mode) {
case RGB_MODE_ALL:
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
break;
case RGB_MODE_KEYLIGHT:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_NONE:
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
break;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_KEYLIGHT;
}
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_UNDERGLOW;
}
break;
case (LED_FLAG_UNDERGLOW): {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_NONE;
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
user_config.rgb_mode = RGB_MODE_ALL;
}
break;
}
eeconfig_update_user(user_config.raw);
}
return false;
}
return true;
}
void rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
RGB rgb = hsv_to_rgb(hsv);
if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
}
} else {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(25, 0, 0, 0);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(73, 0, 0, 0);
}
}
}
#ifdef OLED_ENABLE
static void render_layer_info(void) {
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("QWERTY "), false);
break;
case 1:
oled_write_P(PSTR("Function "), false);
break;
case 2:
oled_write_P(PSTR("Function "), false);
break;
case 3:
oled_write_P(PSTR("Function "), false);
break;
default:
oled_write_P(PSTR("Undefined "), false);
}
}
static void render_layer_number(void) {
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("0"), false);
break;
case 1:
oled_write_P(PSTR("1"), false);
break;
case 2:
oled_write_P(PSTR("2"), false);
break;
case 3:
oled_write_P(PSTR("3"), false);
break;
default:
oled_write_P(PSTR("X"), false);
}
}
bool oled_task_user(void) {
led_t led_usb_state = host_keyboard_led_state();
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLK ") : PSTR("----- "), false);
oled_write_P(PSTR(" GOPOLAR "), false);
oled_write_P(led_usb_state.scroll_lock ? PSTR(" SCRLK") : PSTR(" -----"), false);
// sleep if it has been long enough since we last got a char
if (timer_elapsed32(wave_sleep) > OLED_TIMEOUT) {
oled_off();
} else {
oled_on();
}
// time for the next frame?
if (timer_elapsed(wave_timer) > FRAME_TIMEOUT) {
wave_timer = timer_read();
render_frame();
}
oled_set_cursor(0, 3);
render_layer_info();
oled_write_P(PSTR("Layer: "), false);
render_layer_number();
return true;
}
#endif

@ -0,0 +1,52 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 DYNAMIC_KEYMAP_LAYER_COUNT 2
#define NO_ACTION_ONESHOT
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix effect */
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#undef ENABLE_RGB_MATRIX_BAND_SAT
#undef ENABLE_RGB_MATRIX_BAND_VAL
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#undef ENABLE_RGB_MATRIX_RAINDROPS
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#undef ENABLE_RGB_MATRIX_HUE_WAVE
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#undef ENABLE_RGB_MATRIX_SPLASH
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

@ -0,0 +1,88 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "keymap_stuff.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12 PScScrPse
` 1 2 3 4 5 6 7 8 9 0 - = Bckspc HomScrPse
Tab q w e r t y u i o p [ ] \ EndScrPse
Caps a s d f g h j k l ; ' Enter
LSft \ z x c v b n m , . / RSft RSt
LCrl GUI LAlt Space RAlt Fn RCrl
~ ! @ # $ % ^ & * ( ) _ +
Q W E R T Y U I O P { } |
Caps A S D F G H J K L : " │ │
LSft | Z X C V B N M < > ? RSft RSt
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_BASE] = LAYOUT_all(
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_PSCR, KC_SLCK, KC_PAUSE,
KC_GRV, 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_BSPC, KC_INS, KC_HOME, KC_PGUP,
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_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
Rst MePVoDVoUMut StpPrvPlyNxt MaiHomCalSch RodModTog
NKO SpdSpi C_E
1Hd1Hi1Sd1Si1Vd1Vi
2Hd2Hi2Sd2Si2Vd2Vi
PreRefFlp Vai
Fn HudVadHui
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_FN] = LAYOUT_all(
RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, RGB_RMOD, RGB_MOD, RGB_TOG,
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_C_E, _______, _______,
_______, G1_HUD, G1_HUI, G1_SAD, G1_SAI, G1_VAD, G1_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, G2_HUD, G2_HUI, G2_SAD, G2_SAI, G2_VAD, G2_VAI, _______, _______, _______, _______, _______, _______,
_______, _______, G_PRE, REF_G, G_FLIP, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
),
};

@ -0,0 +1,304 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "oled/oled_stuff.h"
#include <string.h>
#include <math.h>
#include <lib/lib8tion/lib8tion.h>
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_names {
_BASE,
_FN,
};
// For CUSTOM_GRADIENT
HSV gradient_0 = {205, 250, 255};
HSV gradient_100 = {140, 215, 125};
bool reflected_gradient = false;
uint8_t gp_i = 0;
typedef struct {
HSV gradient_0;
HSV gradient_1;
bool reflected;
} CUSTOM_PRESETS;
enum user_rgb_mode {
RGB_MODE_ALL,
RGB_MODE_KEYLIGHT,
RGB_MODE_UNDERGLOW,
RGB_MODE_NONE,
};
typedef union {
uint32_t raw;
struct {
uint8_t rgb_mode :8;
};
} user_config_t;
user_config_t user_config;
enum layer_keycodes {
//Custom Gradient control keycode
G1_HUI = SAFE_RANGE, //Custom gradient color 1 hue increase
G1_HUD, //Custom gradient color 1 hue decrease
G1_SAI, //Custom gradient color 1 saturation increase
G1_SAD, //Custom gradient color 1 saturation decrease
G1_VAI, //Custom gradient color 1 value increase
G1_VAD, //Custom gradient color 1 value decrease
G2_HUI, //Custom gradient color 2 hue increase
G2_HUD, //Custom gradient color 2 hue decrease
G2_SAI, //Custom gradient color 2 saturation increase
G2_SAD, //Custom gradient color 2 saturation decrease
G2_VAI, //Custom gradient color 2 value increase
G2_VAD, //Custom gradient color 2 value decrease
G_PRE, //Gradient presets
REF_G, //Toggle between linear and reflected gradient
G_FLIP, //Flip the gradient colors
//Custom led effect keycode
RGB_C_E, //Cycle user effect
};
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
switch (user_config.rgb_mode) {
case RGB_MODE_ALL:
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
break;
case RGB_MODE_KEYLIGHT:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_NONE:
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
break;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
process_record_user_oled(keycode, record);
uint8_t color_adj_step = 5;
CUSTOM_PRESETS gradient_presets[] = {
{{41 , 255, 255}, {233, 245, 255}, false },
{{45 , 245, 155}, {160, 255, 80}, false },
{{173, 245, 40}, {41 , 255, 205}, true },
{{32 , 255, 165}, {217, 185, 70}, false },
{{240, 255, 145}, {115, 255, 245}, true },
{{118, 255, 255}, {242, 255, 255}, false },
{{212, 0 , 0}, {223, 235, 165}, true },
{{205, 250, 255}, {140, 215, 125}, false },
};
uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]);
switch (keycode) {
case G1_HUI:
if (record->event.pressed) {
gradient_0.h += color_adj_step;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G1_HUD:
if (record->event.pressed) {
gradient_0.h -= color_adj_step;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G1_SAI:
if (record->event.pressed) {
gradient_0.s = (gradient_0.s + color_adj_step * 2 <= 255) ? gradient_0.s + color_adj_step * 2 : 255;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G1_SAD:
if (record->event.pressed) {
gradient_0.s = (gradient_0.s - color_adj_step * 2 >= 0) ? gradient_0.s - color_adj_step * 2 : 0;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G1_VAI:
if (record->event.pressed) {
gradient_0.v = (gradient_0.v + color_adj_step * 2 <= 255) ? gradient_0.v + color_adj_step * 2 : 255;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G1_VAD:
if (record->event.pressed) {
gradient_0.v = (gradient_0.v - color_adj_step * 2 >= 0) ? gradient_0.v - color_adj_step * 2 : 0;
dprintf("Gradient 0 HSV: %d, %d, %d\n", gradient_0.h, gradient_0.s, gradient_0.v);
}
return false;
case G2_HUI:
if (record->event.pressed) {
gradient_100.h += color_adj_step;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G2_HUD:
if (record->event.pressed) {
gradient_100.h -= color_adj_step;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G2_SAI:
if (record->event.pressed) {
gradient_100.s = (gradient_100.s + color_adj_step * 2 <= 255) ? gradient_100.s + color_adj_step * 2 : 255;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G2_SAD:
if (record->event.pressed) {
gradient_100.s = (gradient_100.s - color_adj_step * 2 >= 0) ? gradient_100.s - color_adj_step * 2 : 0;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G2_VAI:
if (record->event.pressed) {
gradient_100.v = (gradient_100.v + color_adj_step * 2 <= 255) ? gradient_100.v + color_adj_step * 2 : 255;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G2_VAD:
if (record->event.pressed) {
gradient_100.v = (gradient_100.v - color_adj_step * 2 >= 0) ? gradient_100.v - color_adj_step * 2 : 0;
dprintf("Gradient 100 HSV: %d, %d, %d\n", gradient_100.h, gradient_100.s, gradient_100.v);
}
return false;
case G_PRE:
if (record->event.pressed) {
gp_i = (gp_i + gp_length ) % gp_length;
gradient_0 = gradient_presets[gp_i].gradient_0;
gradient_100 = gradient_presets[gp_i].gradient_1;
reflected_gradient = gradient_presets[gp_i].reflected;
gp_i += 1;
}
return false;
case REF_G:
if (record->event.pressed) {
reflected_gradient = !reflected_gradient;
}
return false;
case G_FLIP:
if (record->event.pressed) {
HSV temp_color = gradient_0;
gradient_0 = gradient_100;
gradient_100 = temp_color;
}
return false;
case RGB_C_E:
if (record->event.pressed) {
switch (rgb_matrix_get_mode()) {
case RGB_MATRIX_CUSTOM_CUSTOM_GRADIENT:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_COOL_DIAGONAL);
return false;
case RGB_MATRIX_CUSTOM_COOL_DIAGONAL:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_FLOWER_BLOOMING);
return false;
case RGB_MATRIX_CUSTOM_FLOWER_BLOOMING:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_RAINBOW_REACTIVE_SIMPLE);
return false;
case RGB_MATRIX_CUSTOM_RAINBOW_REACTIVE_SIMPLE:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_KITT);
return false;
case RGB_MATRIX_CUSTOM_KITT:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_RANDOM_BREATH_RAINBOW);
return false;
default:
rgb_matrix_mode(RGB_MATRIX_CUSTOM_CUSTOM_GRADIENT);
return false;
}
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_KEYLIGHT;
}
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_UNDERGLOW;
}
break;
case (LED_FLAG_UNDERGLOW): {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_NONE;
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
user_config.rgb_mode = RGB_MODE_ALL;
}
break;
}
eeconfig_update_user(user_config.raw);
}
return false;
}
return true;
}
void rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
RGB rgb = hsv_to_rgb(hsv);
if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
}
} else {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(25, 0, 0, 0);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(73, 0, 0, 0);
}
}
}

@ -0,0 +1,22 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
static HSV COOL_DIAGONAL_math(HSV hsv, uint8_t i, uint8_t time) {
hsv.h = (g_led_config.point[i].x / 4) - g_led_config.point[i].y - time;
return hsv;
}
bool COOL_DIAGONAL(effect_params_t* params) { return effect_runner_i(params, &COOL_DIAGONAL_math); }

@ -0,0 +1,74 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
extern HSV gradient_0;
extern HSV gradient_100;
extern bool reflected_gradient;
static HSV INTERPOLATE_HSV(float step, HSV gradient_0, HSV gradient_100) {
uint8_t cw, ccw;
HSV color;
cw = (gradient_0.h >= gradient_100.h) ? 255 + gradient_100.h - gradient_0.h : gradient_100.h - gradient_0.h; // Hue range is 0 to 255.
ccw = (gradient_0.h >= gradient_100.h) ? gradient_0.h - gradient_100.h : 255 + gradient_0.h - gradient_100.h;
if( cw < ccw ) { // going clockwise
color.h = gradient_0.h + (uint8_t)(step * cw);
} else { // Going counter clockwise
color.h = gradient_0.h - (uint8_t)(step * ccw);
}
color.s = gradient_0.s + step * (gradient_100.s - gradient_0.s);
// Scale V with global RGB Matrix's V, so users can still control overall brightness with RGB_VAI & RGB_VAD0
color.v = round((gradient_0.v + step * (gradient_100.v - gradient_0.v)) * ((float)rgb_matrix_config.hsv.v / 255));
return color;
}
static HSV CUSTOM_GRADIENT_math(uint8_t led_x, uint8_t min_x, uint8_t max_x) {
float step = (float)led_x / (max_x - min_x);
float mid_gradient_pos = 0.5;
if( reflected_gradient ) {
if( step <= mid_gradient_pos ) {
return INTERPOLATE_HSV(step * (1/mid_gradient_pos), gradient_0, gradient_100);
} else {
return INTERPOLATE_HSV((step - mid_gradient_pos) * (1/(1-mid_gradient_pos)), gradient_100, gradient_0);
}
} else {
return INTERPOLATE_HSV(step, gradient_0, gradient_100);
}
}
static bool CUSTOM_GRADIENT(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
uint8_t min_x = 0; // X coordinate of the left-most LED
uint8_t max_x = 224; // X coordinate of the right-most LED
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
HSV hsv_orig = CUSTOM_GRADIENT_math(g_led_config.point[i].x, min_x, max_x);
RGB rgb = hsv_to_rgb(hsv_orig);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;
}

@ -0,0 +1,27 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "led/flower_blooming/flower_blooming.h"
static HSV FLOWER_BLOOMING_math(HSV hsv, uint8_t i, uint8_t time) {
if (g_led_config.point[i].y > k_rgb_matrix_center.y)
hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 + time;
else
hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 - time;
return hsv;
}
bool FLOWER_BLOOMING(effect_params_t* params) { return effect_runner_bloom(params, &FLOWER_BLOOMING_math); }

@ -0,0 +1,20 @@
#pragma once
typedef HSV (*flower_blooming_f)(HSV hsv, uint8_t i, uint8_t time);
bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 10, 1));
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
if (g_led_config.point[i].y > k_rgb_matrix_center.y) {
RGB bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
rgb_matrix_set_color(i, bgr.b, bgr.g, bgr.r);
} else {
RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
return rgb_matrix_check_finished_leds(led_max);
}

@ -0,0 +1,68 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
// variable for startup animation
bool BASE_EFFECT_NOT_STARTED_YET = true;
uint8_t base_effect_startup_counter = 255;
uint8_t led_count = 11;
uint8_t led_first = 41;
static uint8_t time_to_led(uint8_t time, uint8_t led_behind) {
uint16_t led_time = led_count * time;
uint16_t step = ((2 * led_count + (led_time / 128)) - led_behind) % (2 * led_count);
uint8_t led;
if (step < led_count) {
led = step;
} else {
led = led_count - 1 - (step - led_count);
}
return led;
}
static HSV KITT_math(HSV hsv, uint8_t i, uint8_t time) {
// reset base effect startup
if (i == 0) {
BASE_EFFECT_NOT_STARTED_YET = true;
}
hsv.h = 0;
hsv.s = 255;
if (i >= led_first && i < led_first + led_count) {
uint8_t j = i - led_first;
if (j == time_to_led(time, 0)) {
hsv.v = hsv.v;
} else if (j == time_to_led(time, 1)) {
hsv.v = hsv.v/2;
} else if (j == time_to_led(time, 2)) {
hsv.v = hsv.v/4;
} else if (j == time_to_led(time, 3)) {
hsv.v = hsv.v/8;
} else {
hsv.v = 0;
}
} else {
hsv.v = 0;
}
return hsv;
}
bool KITT(effect_params_t* params) { return effect_runner_i(params, &KITT_math); }

@ -0,0 +1,25 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "led/rainbow_reactive_simple/rainbow_reactive_simple.h"
static HSV RAINBOW_REACTIVE_SIMPLE_math(HSV hsv, uint8_t i, uint8_t time, uint16_t offset) {
hsv.h = g_led_config.point[i].x - time;
hsv.v = scale8(255 - offset, hsv.v);
return hsv;
}
bool RAINBOW_REACTIVE_SIMPLE(effect_params_t* params) { return effect_rainbow_reactive(params, &RAINBOW_REACTIVE_SIMPLE_math); }

@ -0,0 +1,45 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
typedef HSV (*rainbow_reactive_f)(HSV hsv, uint8_t i, uint8_t time, uint16_t offset);
bool effect_rainbow_reactive(effect_params_t* params, rainbow_reactive_f effect_func) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4);
uint16_t max_tick = 65535 / rgb_matrix_config.speed;
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t tick = max_tick;
// Reverse search to find most recent key hit
for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
tick = g_last_hit_tracker.tick[j];
break;
}
}
uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time, offset));
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;
}

@ -0,0 +1,55 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
static uint8_t offset[DRIVER_LED_TOTAL];
static void doRandom_breath_rainbow(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 6);
if (rand() * 50 == 1) {
if (rand() * 2 == 1) {
offset[i]++;
}
else {
offset[i]--;
}
}
//float val = (((float)sin8(time + offset[i]) / 256)/2.1) + .05;
HSV hsv = {0, 255, 255};
hsv.h = scale16by8(g_rgb_timer + offset[i], rgb_matrix_config.speed / 4) + (offset[i]*2);
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
bool RANDOM_BREATH_RAINBOW(effect_params_t* params) {
if (!params->init) {
// Change one LED every tick, make sure speed is not 0
doRandom_breath_rainbow(rand() % DRIVER_LED_TOTAL, params);
return false;
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
doRandom_breath_rainbow(i, params);
}
return led_max < DRIVER_LED_TOTAL;
}

@ -0,0 +1,68 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
*
* 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/>.
*/
// OLED animation
#include "lib/wave.h"
#ifdef OLED_ENABLE
static void render_layer_info(void) {
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR(" QWERTY "), false);
break;
case 1:
oled_write_P(PSTR(" Function "), false);
break;
default:
oled_write_P(PSTR(" Undefined "), false);
}
}
static void render_layer_number(void) {
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("X"), false);
}
}
bool oled_task_user(void) {
render_layer_info();
// sleep if it has been long enough since we last got a char
if (timer_elapsed32(wave_sleep) > OLED_TIMEOUT) {
oled_off();
} else {
oled_on();
}
// time for the next frame?
if (timer_elapsed(wave_timer) > FRAME_TIMEOUT) {
wave_timer = timer_read();
render_frame();
}
oled_set_cursor(0, 3);
oled_write_P(PSTR(" Layer: "), false);
render_layer_number();
return true;
}
#endif

@ -0,0 +1,12 @@
# My personal keymap with VIA and custom LED / OLED
Keymap is default 87 qwerty, with TKL 7u-spacebar layout
It have new LED effect:
- Custom gradient (ported from SirTimmyTimbit code [https://github.com/SirTimmyTimbit/customizable-gradient-effect-for-drop-alt])
- Cool diagonal (ported from pleasuretek code [https://github.com/pleasuretek/qmk_firmware])
- Flower Blooming
- Rainbow reactive simple
- Knight Rider (ported from jumper149 code [https://github.com/jumper149/qmk_firmware/blob/jumper149/keyboards/dztech/dz65rgb/keymaps/jumper149/])
- Random breath rainbow (based from daed code [https://github.com/daed/qmk_firmware/blob/master/keyboards/massdrop/alt/keymaps/daed] and modify by me)

@ -0,0 +1,17 @@
RGB_MATRIX_EFFECT(CUSTOM_GRADIENT)
RGB_MATRIX_EFFECT(COOL_DIAGONAL)
RGB_MATRIX_EFFECT(FLOWER_BLOOMING)
RGB_MATRIX_EFFECT(RAINBOW_REACTIVE_SIMPLE)
RGB_MATRIX_EFFECT(KITT)
RGB_MATRIX_EFFECT(RANDOM_BREATH_RAINBOW)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#include "led/custom_gradient.c"
#include "led/cool_diagonal.c"
#include "led/flower_blooming/flower_blooming.c"
#include "led/rainbow_reactive_simple/rainbow_reactive_simple.c"
#include "led/kitt.c"
#include "led/random_breath_rainbow.c"
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS

@ -0,0 +1,3 @@
VIA_ENABLE = yes
RGB_MATRIX_CUSTOM_USER = yes

@ -0,0 +1,325 @@
/* Copyright 2021 Gopolar
*
* 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
// OLED animation
#include "lib/wave.h"
#include <string.h>
#include <math.h>
#include <lib/lib8tion/lib8tion.h>
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
// enum layer_names { };
enum user_rgb_mode {
RGB_MODE_ALL,
RGB_MODE_KEYLIGHT,
RGB_MODE_UNDERGLOW,
RGB_MODE_NONE,
};
typedef union {
uint32_t raw;
struct {
uint8_t rgb_mode :8;
};
} user_config_t;
user_config_t user_config;
// enum layer_keycodes { };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12 PScScrPse
` 1 2 3 4 5 6 7 8 9 0 - = Bckspc HomScrPse
Tab q w e r t y u i o p [ ] \ EndScrPse
Caps a s d f g h j k l ; ' Enter
LSft \ z x c v b n m , . / RSft RSt
LCrl GUI LAlt Space RAlt Fn RCrl
~ ! @ # $ % ^ & * ( ) _ +
Q W E R T Y U I O P { } |
Caps A S D F G H J K L : " │ │
LSft | Z X C V B N M < > ? RSft RSt
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[0] = LAYOUT_all(
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_PSCR, KC_SLCK, KC_PAUSE,
KC_GRV, 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_BSPC, KC_INS, KC_HOME, KC_PGUP,
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_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
Slp M_TF13F14F15 F16RfhStp Est VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[1] = LAYOUT_all(
KC_SLEP, RGB_M_T, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, EEP_RST, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
/*
Slp F13F14F15F16 RfhStp VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[2] = LAYOUT_all(
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
/*
Slp F13F14F15F16 RfhStp VoDVoU
HuiSaiSpi
HudSadSpd
RGB_Tog
Cal Vai
RodVadMod
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[3] = LAYOUT_all(
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_WREF, KC_WSTP, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_SPD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD
),
};
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
switch (user_config.rgb_mode) {
case RGB_MODE_ALL:
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
break;
case RGB_MODE_KEYLIGHT:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
break;
case RGB_MODE_NONE:
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
break;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_KEYLIGHT;
}
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_UNDERGLOW;
}
break;
case (LED_FLAG_UNDERGLOW): {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
user_config.rgb_mode = RGB_MODE_NONE;
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
user_config.rgb_mode = RGB_MODE_ALL;
}
break;
}
eeconfig_update_user(user_config.raw);
}
return false;
}
return true;
}
void rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
RGB rgb = hsv_to_rgb(hsv);
if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
}
} else {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(25, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(25, 0, 0, 0);
}
if (host_keyboard_led_state().scroll_lock) {
rgb_matrix_set_color(73, rgb.r, rgb.g, rgb.b);
} else {
rgb_matrix_set_color(73, 0, 0, 0);
}
}
}
#ifdef OLED_ENABLE
static void render_layer_info(void) {
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("QWERTY "), false);
break;
case 1:
oled_write_P(PSTR("Function "), false);
break;
case 2:
oled_write_P(PSTR("Function "), false);
break;
case 3:
oled_write_P(PSTR("Function "), false);
break;
default:
oled_write_P(PSTR("Undefined "), false);
}
}
static void render_layer_number(void) {
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("0"), false);
break;
case 1:
oled_write_P(PSTR("1"), false);
break;
case 2:
oled_write_P(PSTR("2"), false);
break;
case 3:
oled_write_P(PSTR("3"), false);
break;
default:
oled_write_P(PSTR("X"), false);
}
}
bool oled_task_user(void) {
led_t led_usb_state = host_keyboard_led_state();
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLK ") : PSTR("----- "), false);
oled_write_P(PSTR(" GOPOLAR "), false);
oled_write_P(led_usb_state.scroll_lock ? PSTR(" SCRLK") : PSTR(" -----"), false);
// sleep if it has been long enough since we last got a char
if (timer_elapsed32(wave_sleep) > OLED_TIMEOUT) {
oled_off();
} else {
oled_on();
}
// time for the next frame?
if (timer_elapsed(wave_timer) > FRAME_TIMEOUT) {
wave_timer = timer_read();
render_frame();
}
oled_set_cursor(0, 3);
render_layer_info();
oled_write_P(PSTR("Layer: "), false);
render_layer_number();
return true;
}
#endif

@ -0,0 +1,249 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
* Copyright 2021 Gopolar
*
* 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/>.
*/
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
#include "progmem.h"
// Standard ASCII 5x7 font
const unsigned char font[] PROGMEM = {
0x07, 0x08, 0x7F, 0x08, 0x07, 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,
0x2A, 0x1C, 0x77, 0x1C, 0x2A, 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, 0x3E, 0x04, 0x08, 0x00,
0x08, 0x10, 0x3E, 0x10, 0x08, 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,
0x41, 0x22, 0x14, 0x08, 0x00, 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, 0x38, 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,
0x10, 0x38, 0x10, 0x10, 0x1C, 0x00,
0x0C, 0x7A, 0x41, 0x7A, 0x0C, 0x00,
0x18, 0x2F, 0x41, 0x2F, 0x18, 0x00,
0x22, 0x72, 0x22, 0x27, 0x22, 0x00,
0x08, 0x1C, 0x08, 0x08, 0x08, 0x00,
0x08, 0x08, 0x38, 0x20, 0x28, 0x28,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x2A, 0x2A, 0x2A, 0x00, 0x00,
0x4E, 0x46, 0x4A, 0x50, 0x2F, 0x00,
0x3E, 0x45, 0x55, 0x51, 0x3E, 0x00,
0x48, 0x50, 0x7E, 0x50, 0x48, 0x00,
0x3E, 0x49, 0x71, 0x49, 0x3E, 0x00,
0x10, 0x22, 0x4F, 0x20, 0x10, 0x00,
0x0E, 0x06, 0x0A, 0x10, 0x20, 0x00,
0x20, 0x10, 0x0A, 0x06, 0x0E, 0x00,
0x08, 0x08, 0x08, 0x1C, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

@ -0,0 +1,60 @@
/* Copyright 2021 Gopolar
*
* 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 "quantum.h"
#define ANIM_SIZE 525 // number of bytes in array, minimize for adequate firmware size, max is 1024
void render_logo(void) {
static const char PROGMEM gopolar[][ANIM_SIZE] = {
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0xf8, 0x78, 0x78,
0x38, 0x3c, 0x3c, 0x3c, 0x3c, 0x38, 0xf8, 0xf8, 0xf8, 0xf0, 0x78, 0x3c, 0x1e, 0x0f, 0x07, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0,
0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 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, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0xff, 0xff, 0x0f, 0x07, 0x01, 0x00, 0xe0, 0xf0, 0xf8,
0xf8, 0xfc, 0xfc, 0x3c, 0x1e, 0x8f, 0xc7, 0xe3, 0xe1, 0x00, 0x00, 0x07, 0x1f, 0xff, 0xff, 0xfc,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x0f, 0x03, 0x01, 0x01, 0x00, 0xe0, 0xe0,
0xe0, 0xe0, 0xe1, 0xe1, 0xe3, 0xe7, 0xe7, 0xe6, 0x00, 0x80, 0xe0, 0xf0, 0x70, 0x38, 0x38, 0x38,
0x38, 0x70, 0xf0, 0xe0, 0x80, 0x00, 0xc0, 0xe0, 0xf0, 0x70, 0x38, 0x38, 0x38, 0x38, 0x38, 0x70,
0xf0, 0xe0, 0xc0, 0x00, 0x80, 0xe0, 0xf0, 0x70, 0x38, 0x38, 0x38, 0x38, 0x70, 0xf0, 0xe0, 0x80,
0x00, 0xff, 0xff, 0xff, 0x00, 0xc0, 0xe0, 0xf0, 0x70, 0x38, 0x38, 0x38, 0x38, 0x38, 0x70, 0xf0,
0xe0, 0xc0, 0x00, 0xf8, 0xf8, 0xf8, 0xf0, 0x70, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3f, 0x7f, 0xff, 0xf8, 0x60, 0x00, 0x00, 0x07, 0x0f, 0x1f,
0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x0f, 0x07, 0x80, 0xc0, 0xe0, 0xf8, 0xff, 0x7f, 0x3f,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x3c, 0x38, 0x38, 0x70, 0x70, 0x70,
0x70, 0x70, 0x38, 0x38, 0x3c, 0x1f, 0x0f, 0x07, 0x00, 0x07, 0x1f, 0x3f, 0x38, 0x70, 0x70, 0x70,
0x70, 0x38, 0x3f, 0x1f, 0x07, 0x00, 0xff, 0xff, 0xff, 0x00, 0x60, 0x60, 0x60, 0x60, 0x70, 0x78,
0x3f, 0x1f, 0x0f, 0x00, 0x07, 0x1f, 0x3f, 0x38, 0x70, 0x70, 0x70, 0x70, 0x38, 0x3f, 0x1f, 0x07,
0x00, 0x7f, 0x7f, 0x7f, 0x00, 0x0f, 0x3f, 0x7f, 0x78, 0x70, 0x60, 0x60, 0x60, 0x60, 0x00, 0x7f,
0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0x0f, 0x0f, 0x1e, 0x1e,
0x1e, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x1e, 0x1e, 0x0f, 0x0f, 0x07, 0x07, 0x03, 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, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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(gopolar[0], ANIM_SIZE);
}

@ -0,0 +1,17 @@
/* Copyright 2021 Gopolar
*
* 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/>.
*/
void render_logo(void);

@ -0,0 +1,130 @@
/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll>
* Copyright 2021 Gopolar
*
* 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/>.
*/
extern const unsigned char font[] PROGMEM;
#define ROW_1 OLED_DISPLAY_WIDTH
#define ROW_2 (OLED_DISPLAY_WIDTH * 2)
static uint32_t wave_sleep = 0;
#define FRAME_TIMEOUT (1000/28)
static uint16_t wave_timer = 0;
static uint8_t next_bar_val = 0;
static uint8_t next_log_byte[OLED_FONT_WIDTH] = {0};
static uint8_t line1[OLED_DISPLAY_WIDTH] = {0};
static uint8_t line2[OLED_DISPLAY_WIDTH] = {0};
static const uint8_t PROGMEM bar_lut[8] = {0, 16, 24, 56, 60, 124, 126, 255};
#define BAR_KEY_WEIGHT 128
#define BAR_KEY_DECAY_MAX 18
static uint8_t bar_key_decay = BAR_KEY_DECAY_MAX;
// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 128, 136, 132, 131, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 130, 7, 7, 7, 7, 7, 7, // 3x
7, 7, 7, 7, 7, 7, 137, 138, 139, 140, 141, 30, 143, 142, 31, 26, // 4x
27, 25, 24, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
' ', ' ', ' ', ' ','\\', 135, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
15, 129, 133, 4, 15, 129, 133, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
// clang-format on
void add_keylog(uint16_t keycode) {
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) ||
(keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
keycode = keycode & 0xFF;
} else if (keycode > 0xFF) {
keycode = 0;
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
char log_char = pgm_read_byte(&code_to_name[keycode]);
for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) {
const uint8_t glyph_line = pgm_read_byte(&font[log_char * OLED_FONT_WIDTH + j]);
next_log_byte[j] = glyph_line;
}
}
}
bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
wave_sleep = timer_read32();
add_keylog(keycode);
uint8_t t = next_bar_val + BAR_KEY_WEIGHT;
if (t < next_bar_val) {
next_bar_val = 255;
} else {
next_bar_val = t;
}
bar_key_decay = BAR_KEY_DECAY_MAX;
}
return true;
}
void render_frame(void) {
// rotate line 1, and stick in the next byte of the next char,
// then rotate the next char buffer
memmove(line1+1, line1, OLED_DISPLAY_WIDTH - 1);
line1[0] = next_log_byte[OLED_FONT_WIDTH - 1];
memmove(next_log_byte+1, next_log_byte, OLED_FONT_WIDTH - 1);
next_log_byte[0] = 0;
// rotate line 2, sticking in the next display value
uint8_t disp_val = pgm_read_byte(&bar_lut[next_bar_val / 32]);
memmove(line2+1, line2, OLED_DISPLAY_WIDTH - 1);
line2[0] = disp_val;
// draw both bars
for (uint8_t i = 0; i < OLED_DISPLAY_WIDTH; i++) {
oled_write_raw_byte(line1[i], ROW_1 + i);
oled_write_raw_byte(line2[i], ROW_2 + i);
}
// decay the next bar value
if (next_bar_val > bar_key_decay) {
next_bar_val -= bar_key_decay;
} else {
next_bar_val = 0;
}
if (bar_key_decay > 1) {
bar_key_decay -= 1;
}
}

@ -0,0 +1,24 @@
# Gopolar GG86 Tai-Chi
![GG86 Tai-Chi](https://i.imgur.com/SgXOZjt.png?2)
A tenkeyless 86-key keyboard made by Gopolar, which controlled by an Atmega32u4 chipset. The keyboard features per-key RGB as well as underglow RGB, and an OLED screen for displaying useful information.
* Keyboard Maintainer: Gopolar
* Hardware Supported: Atmega32u4
* Hardware Availability: [mecha.store](https://mecha.store/collections/gopolar/products/gopolar-gg86-tenkeyless-hotswappable-barebones-keyboard) / [AliExpress](https://www.aliexpress.com/item/1005003605711613.html)
Make example for this keyboard (after setting up your build environment):
make gopolar/gg86:default
Flashing example for this keyboard:
make gopolar/gg86:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (Esc key) and plug in the keyboard
* **Physical reset button**: Short press the button under Spacebar keycap to enter the Bootloader and flash the firmware
* **Keycode in layout**: Press the key mapped to RESET if it is available

@ -0,0 +1,32 @@
SRC += lib/logo.c
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
# Additional thing to reduce compiled size
LTO_ENABLE = yes
NO_USB_STARTUP_CHECK = yes
# RGB Matrix enabled
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
# OLED enabled
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # OLED display

@ -0,0 +1,58 @@
/*
Copyright (c) 2022 David Kuehling <dvdkhlng TA posteo TOD de>
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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x4451
#define DEVICE_VER 0x0001
#define PRODUCT DQz11N1G Controller Replacement
/* Matrix size */
#define MATRIX_ROWS 7
#define MATRIX_COLS 19
/* Pin-out */
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4 }
/* The pin connecting to the SN74HC165 SH/~LD in */
#define ROW_SHIFT_PIN B6
/* Column read via SPI (shift register) */
/* #define MATRIX_COL_PINS { } */
#define UNUSED_PINS
#define LED_CAPS_LOCK_PIN F7 /* A0 */
#define LED_NUM_LOCK_PIN F5 /*A2 */
#define LED_SCROLL_LOCK_PIN F4 /*A3 */
#define LED_FUN_LOCK_PIN F6 /* A1 (handled in layer_state_set_user()) */
/* audio config */
#define AUDIO_PIN B5
#define AUDIO_CLICKY
#define AUDIO_INIT_DELAY
#define AUDIO_CLICKY_FREQ_RANDOMNESS 0.0f
#define NO_MUSIC_MODE
/* diodes go row->col, though this is hard-coded in matrix.c and we drive the
* matrix differently: we have pull-down on the columns and drive the selected
* row high */
/* #define DIODE_DIRECTION ROW2COL */

@ -0,0 +1,51 @@
/*
* Copyright (c) 2022 David Kuehling <dvdkhlng TA posteo TOD de>
*
* 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
#include "quantum.h"
#define XXX KC_NO
/* Fill actually existing keys into the 7x19 keyboard matrix */
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0J, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1J, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2J, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3J, \
k40, k41, k42, k43, k44, k45, k4D, k4E, k4F, k4G, k4H, k4J, \
k51, k52, k53, k54, k5E, k5F, k5G, k5H, \
k46, k47, k48, k4A, k4B, k4C, \
k56, k57, k58, k5A, k5B, k5C, \
k68, k6A \
) { \
/* left hand */ /* middle/thumb block */ /* right hand */ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0J }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1J }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2J }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3J }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4J }, \
{ XXX, k51, k52, k53, k54, XXX, k56, k57, k58, XXX, k5A, k5B, k5C, XXX, k5E, k5F, k5G, k5H, XXX }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k68, XXX, k6A, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \
}
/*
* Local Variables:
* c-basic-offset:4
* fill-column: 76
* End:
*/

@ -0,0 +1,141 @@
{
"keyboard_name": "DQz11N1G",
"url": "https://github.com/dvdkhlng/qmk_firmware_dqz11n1g",
"maintainer": "dvdkhlng",
"layouts": {
"LAYOUT": {
"layout": [
{"x": 0, "y": 0, "matrix": [0, 0] },
{"x": 1, "y": 0, "matrix": [0, 1] },
{"x": 2, "y": 0, "matrix": [0, 2] },
{"x": 3, "y": 0, "matrix": [0, 3] },
{"x": 4, "y": 0, "matrix": [0, 4] },
{"x": 5, "y": 0, "matrix": [0, 5] },
{"x": 7, "y": 0, "matrix": [0, 6] },
{"x": 8, "y": 0, "matrix": [0, 7] },
{"x": 9, "y": 0, "matrix": [0, 8] },
{"x": 10, "y": 0, "matrix": [0, 9] },
{"x": 11, "y": 0, "matrix": [0, 10] },
{"x": 12, "y": 0, "matrix": [0, 11] },
{"x": 13, "y": 0, "matrix": [0, 12] },
{"x": 15, "y": 0, "matrix": [0, 13] },
{"x": 16, "y": 0, "matrix": [0, 14] },
{"x": 17, "y": 0, "matrix": [0, 15] },
{"x": 18, "y": 0, "matrix": [0, 16] },
{"x": 19, "y": 0, "matrix": [0, 17] },
{"x": 20, "y": 0, "matrix": [0, 18] },
{"x": 0, "y": 1, "matrix": [1, 0] },
{"x": 1, "y": 1, "matrix": [1, 1] },
{"x": 2, "y": 1, "matrix": [1, 2] },
{"x": 3, "y": 1, "matrix": [1, 3] },
{"x": 4, "y": 1, "matrix": [1, 4] },
{"x": 5, "y": 1, "matrix": [1, 5] },
{"x": 7, "y": 1, "matrix": [1, 6] },
{"x": 8, "y": 1, "matrix": [1, 7] },
{"x": 9, "y": 1, "matrix": [1, 8] },
{"x": 10, "y": 1, "matrix": [1, 9] },
{"x": 11, "y": 1, "matrix": [1, 10] },
{"x": 12, "y": 1, "matrix": [1, 11] },
{"x": 13, "y": 1, "matrix": [1, 12] },
{"x": 15, "y": 1, "matrix": [1, 13] },
{"x": 16, "y": 1, "matrix": [1, 14] },
{"x": 17, "y": 1, "matrix": [1, 15] },
{"x": 18, "y": 1, "matrix": [1, 16] },
{"x": 19, "y": 1, "matrix": [1, 17] },
{"x": 20, "y": 1, "matrix": [1, 18] },
{"x": 0, "y": 2, "matrix": [2, 0] },
{"x": 1, "y": 2, "matrix": [2, 1] },
{"x": 2, "y": 2, "matrix": [2, 2] },
{"x": 3, "y": 2, "matrix": [2, 3] },
{"x": 4, "y": 2, "matrix": [2, 4] },
{"x": 5, "y": 2, "matrix": [2, 5] },
{"x": 7, "y": 2, "matrix": [2, 6] },
{"x": 8, "y": 2, "matrix": [2, 7] },
{"x": 9, "y": 2, "matrix": [2, 8] },
{"x": 10, "y": 2, "matrix": [2, 9] },
{"x": 11, "y": 2, "matrix": [2, 10] },
{"x": 12, "y": 2, "matrix": [2, 11] },
{"x": 13, "y": 2, "matrix": [2, 12] },
{"x": 15, "y": 2, "matrix": [2, 13] },
{"x": 16, "y": 2, "matrix": [2, 14] },
{"x": 17, "y": 2, "matrix": [2, 15] },
{"x": 18, "y": 2, "matrix": [2, 16] },
{"x": 19, "y": 2, "matrix": [2, 17] },
{"x": 20, "y": 2, "matrix": [2, 18] },
{"x": 0, "y": 3, "matrix": [3, 0] },
{"x": 1, "y": 3, "matrix": [3, 1] },
{"x": 2, "y": 3, "matrix": [3, 2] },
{"x": 3, "y": 3, "matrix": [3, 3] },
{"x": 4, "y": 3, "matrix": [3, 4] },
{"x": 5, "y": 3, "matrix": [3, 5] },
{"x": 7, "y": 3, "matrix": [3, 6] },
{"x": 8, "y": 3, "matrix": [3, 7] },
{"x": 9, "y": 3, "matrix": [3, 8] },
{"x": 10, "y": 3, "matrix": [3, 9] },
{"x": 11, "y": 3, "matrix": [3, 10] },
{"x": 12, "y": 3, "matrix": [3, 11] },
{"x": 13, "y": 3, "matrix": [3, 12] },
{"x": 15, "y": 3, "matrix": [3, 13] },
{"x": 16, "y": 3, "matrix": [3, 14] },
{"x": 17, "y": 3, "matrix": [3, 15] },
{"x": 18, "y": 3, "matrix": [3, 16] },
{"x": 19, "y": 3, "matrix": [3, 17] },
{"x": 20, "y": 3, "matrix": [3, 18] },
{"x": 0, "y": 4, "h": 2, "matrix": [4, 0] },
{"x": 1, "y": 4, "matrix": [4, 1] },
{"x": 2, "y": 4, "matrix": [4, 2] },
{"x": 3, "y": 4, "matrix": [4, 3] },
{"x": 4, "y": 4, "matrix": [4, 4] },
{"x": 5, "y": 4, "matrix": [4, 5] },
{"x": 15, "y": 4, "matrix": [4, 13] },
{"x": 16, "y": 4, "matrix": [4, 14] },
{"x": 17, "y": 4, "matrix": [4, 15] },
{"x": 18, "y": 4, "matrix": [4, 16] },
{"x": 19, "y": 4, "matrix": [4, 17] },
{"x": 20, "y": 4, "h": 2, "matrix": [4, 18] },
{"x": 1, "y": 5, "matrix": [5, 1] },
{"x": 2, "y": 5, "matrix": [5, 2] },
{"x": 3, "y": 5, "matrix": [5, 3] },
{"x": 4, "y": 5, "matrix": [5, 4] },
{"x": 16, "y": 5, "matrix": [5, 14] },
{"x": 17, "y": 5, "matrix": [5, 15] },
{"x": 18, "y": 5, "matrix": [5, 16] },
{"x": 19, "y": 5, "matrix": [5, 17] },
{"x": 5, "y": 7, "matrix": [4, 6] },
{"x": 6, "y": 7, "matrix": [4, 7] },
{"x": 7, "y": 7, "matrix": [4, 8] },
{"x": 13, "y": 7, "matrix": [4, 10] },
{"x": 14, "y": 7, "matrix": [4, 11] },
{"x": 15, "y": 7, "matrix": [4, 12] },
{"x": 5, "y": 8, "h": 2, "matrix": [5, 6] },
{"x": 6, "y": 8, "h": 2, "matrix": [5, 7] },
{"x": 7, "y": 8, "matrix": [5, 8] },
{"x": 13, "y": 8, "matrix": [5, 10] },
{"x": 14, "y": 8, "h": 2, "matrix": [5, 11] },
{"x": 15, "y": 8, "h": 2, "matrix": [5, 12] },
{"x": 7, "y": 9, "matrix": [6, 8] },
{"x": 13, "y": 9, "matrix": [6, 10] }
]
}
}
}

@ -0,0 +1,72 @@
/* Copyright (c) 2022 David Kuehling < dvdkhlng TA posteo TOD de >
*
* 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 layer_names { _DEFAULT, _FUNCTION };
#define KC_FUN TG(_FUNCTION)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_FUN, KC_NUM, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_VOLU, KC_ESC, KC_P4, KC_P5, KC_P6, KC_PAST, KC_SCRL, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL,
KC_NUBS,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_VOLD, KC_GRV, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_BRK, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_MUTE, KC_WSCH,KC_P0,KC_PDOT,KC_PENT,KC_PPLS,KC_INS, 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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,
/* */ KC_LCTL, KC_LGUI,KC_LALT,KC_RBRC, KC_NUHS,KC_RALT,KC_APP, KC_RCTL, /* */
/* thumb keys: */ KC_BSPC, KC_HOME, KC_END, KC_LEFT, KC_RGHT, KC_DEL,
/* thumb keys: */ KC_SPC, KC_TAB, KC_PGUP, KC_UP, KC_ENT, KC_SPC,
/* thumb keys: */ KC_PGDN, KC_DOWN
),
/* This is the "function key locked" layer. It is not documented by
* Maltron, so just putting some "Quantum" keycodes here for testing that
* the layer exists and Fun Lock LED works. */
[_FUNCTION] = LAYOUT(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,KC_TRNS,KC_BTN3,KC_MS_U,KC_WH_U,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, CK_UP, AU_ON, KC_MS_L,KC_BTN1,KC_MS_R,KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, CK_DOWN,AU_OFF, KC_BTN2,KC_MS_D,KC_WH_D,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, CK_TOGG,KC_NO, KC_ACL0,KC_ACL1,KC_ACL2,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, /* */
/* thumb keys: */ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
/* thumb keys: */ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
/* thumb keys: */ KC_NO, KC_NO
)
};
/* Show "Fun Lock" layer state via the "Fun Lock" LED */
layer_state_t layer_state_set_user(layer_state_t state) {
setPinOutput(LED_FUN_LOCK_PIN);
if (layer_state_cmp(state, _FUNCTION))
writePinHigh(LED_FUN_LOCK_PIN);
else
writePinLow(LED_FUN_LOCK_PIN);
return state;
}
/*
* Local Variables:
* c-basic-offset:4
* fill-column: 76
* End:
*/

@ -0,0 +1,17 @@
![DQz11N1G-DE Layout Image](https://u.cubeupload.com/ddklg/OPBN5q.jpg)
# Default Layout for DQz11N1G-DE
This is the layout corresponding to what the Maltron keyboard DQz11N1G-DE I
own came with (using the original pre-installed controller). Note that this
differs from German Maltron layout as published on [Maltron's
website](https://www.maltron.com/germany.html). Use the photo above as a
reference for the layout implemented here.
I did not find any official documentation about the the Function Lock key on
the original Maltron keyboards. It seems that it implements some of the
features that are documented for the one-handed Maltron keyboards. Most
keys don't send any keycodes at all when function lock is enabed.
We instead map some of the Quantum keycodes (mouse keys and audio control)
in the middle (keypad) section of the keypad, when Function Lock is enabled.

@ -0,0 +1,131 @@
/*
Copyright (c) 2022 David Kuehling <dvdkhlng TA posteo TOD de>
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 <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <avr/io.h>
#include "spi_master.h"
#include "quantum.h"
#include "matrix.h"
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static void unselect_rows(void);
void matrix_init_custom(void) {
/* initialize row pins */
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
setPinOutput(row_pins[row]);
}
unselect_rows();
/* columns read via shift-register on SPI lines */
/* Enable SPI, Master, set clock rate fck/2. First bit already at Qh
* output before clock edge (CPHA=0). SN74HC165 shift register shifts
* on low-to-high transition (CPOL=1). Receive the LSB first (DORD=1).
*/
bool lsbFirst = true;
uint8_t mode = 2; /* CPOL=1, CPHA=0 */
uint16_t divisor = 16;
/* According to Atmega32U4 datasheet, PB0 *must* be set to output,
* otherwise it will interfere with SPI master operation. On pro-micro
* it's connected to a yellew LED. */
pin_t slavePin = PB0;
spi_init();
spi_start(slavePin, lsbFirst, mode, divisor);
/* Initialize pin controlling the shift register's SH/~LD pin */
setPinOutput(ROW_SHIFT_PIN);
}
static void select_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
writePinHigh(pin);
}
}
static void unselect_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
writePinLow(pin);
}
}
static void unselect_rows(void) {
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
unselect_row(row);
}
}
bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
/* Start with a clear matrix row */
matrix_row_t current_row_value = 0;
/* Set shift register SH/~LD pin to "load" mode */
writePinLow(ROW_SHIFT_PIN);
select_row(current_row);
matrix_output_select_delay();
/* Set shift register SH/~LD pin to "shift" mode */
writePinHigh(ROW_SHIFT_PIN);
/* For each octet of columns... */
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index += 8) {
spi_status_t read_result = spi_read();
if (read_result >= 0) {
/* only if SPI read successful: populate the matrix row with the
state of the 8 consecutive column bits */
current_row_value |= ((matrix_row_t)read_result << col_index);
}
}
/* Unselect row & wait for all columns signals to go high. */
unselect_row(current_row);
matrix_output_unselect_delay(current_row, current_row_value != 0);
/* Update row in matrix. */
if (current_row_value != current_matrix[current_row]) {
current_matrix[current_row] = current_row_value;
return true;
}
return false;
}
bool matrix_scan_custom(matrix_row_t curr_matrix[]) {
bool changed = false;
/* set row, read cols */
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
changed |= matrix_read_cols_on_row(curr_matrix, current_row);
}
return changed;
}
/*
* Local Variables:
* c-basic-offset:4
* fill-column: 76
* End:
*/

@ -0,0 +1,80 @@
# DQz11N1G
![DQz11N1G](https://u.cubeupload.com/ddklg/OPBN5q.jpg)
Firmware for a DIY controller replacement for one of the ortholinear contoured
keyboards manufactured by [PCD Maltron Ltd](https://www.maltron.com)
This work here in no way officially associated with PCD Maltron Ltd and comes
with NO WARRANTY. Modifying your Maltron keyboard as described below will
certainly void your warranty and may cause damage to your keyboard. Proceed
at your own risk!
* maintainer: [David Kuehling](https://github.com/dvdkhlng/qmk_firmware_dqz11n1g)
* Hardware Supported: Maltron DQz11N1G with a replacement controller board
assembled as described below. The work here is based on a german version
of the keyboard: DQz11N1G-DE. I assume, but don't know for sure, that
minor or no changes at all are required to make this work on different
language versions of the keyboard.
* Hardware Availability:
* [PCD Maltron Ltd](https://www.maltron.com), for the original keyboard
* 1x [Arduino Pro Micro](https://www.sparkfun.com/products/12640)
* 3x [SN74HC165](https://www.ti.com/product/SN74HC165)
* 1x DIL connector 2 rows a 17 pins.
* 19x pull-down resistors (10k Ohm),
* 4 LED current limiting resistors (not sure about the correct resistance,
using 470 Ohm here)
Make example for this keyboard (after setting up your build environment):
make handwired/dqz11n1g:default
## In Detail
[PCD Maltron Ltd](https://www.maltron.com) manufacturs ergonomic keyboards
that appear to be hand-wired internally. For the Maltron DQz11N1G-DE
keyboard that I happen to own, the keyboard matrix is wired to a 34-pin DIL
connector. This makes it rather easy to replace the proprietary
controller-board with a self-made board based on the QMK firmware.
I don't really like the default layout of my Maltron DQz11N1G-DE keyboard,
and modding it to work with QMK allows me to adapt it to my needs. It
especially allows for the two space keys to assume different roles, thereby
creating an additional easily reachable thumb-key.
### Internal Details of Keyboard Matrix and DIL Connector
![DQz11N1G-DE keyboard matrix](https://u.cubeupload.com/ddklg/OJFue6.jpg)
![DQz11N1G-DE keyboard matrix connector](https://u.cubeupload.com/ddklg/fjFXeL.png)
### Replacement Keyboard Controller Board
Due to supply chain problems, I decided to base this on an
Arduino-compatible [Pro Micro](https://www.sparkfun.com/products/12640)
board which is still easy to source.
Unfortunately pin-count of the DQz11N1G-DE's keyboard matrix is way beyond
the Pro Micro's available I/O pin count. I'm using three 8-bit
shift-registers ([SN74HC165](https://www.ti.com/product/SN74HC165) ) to
connect the 19 colums of the keyboard matrix for readout. Due to diode
direction in DQz11N1G-DE we also need 19 pull-down resistors one for each of
the utilized shift-register inputs.
This is a design sketch of the replacement board this is based on. Note how
we need a custom matrix.c source file to deal with the shift register based
keyboard readout.
![Sketch of Keyboard Controller Board](https://u.cubeupload.com/ddklg/GBZgSf.png)
This is how the assembled controller board looks like, on the right side you
see the original PIC-based controller the keyboard ships with.
![The assembled controller next to the original controller the keyboard ships with](https://u.cubeupload.com/ddklg/KLYF2V.jpg)
Inside of the keyboard after installing the new controller board:
![Installed controller](https://u.cubeupload.com/ddklg/Br0aiF.jpg)
(Not visible in the photo: I drilled hole into the keyboard above the USB
connector for a reset switch to simplify flashing controller firmware)

@ -0,0 +1,24 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = caterina
# Keyboard matrix uses shift-registers read via SPI
CUSTOM_MATRIX = lite
SRC += matrix.c
QUANTUM_LIB_SRC += spi_master.c
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output

@ -67,9 +67,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING //#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
/* bootmagic salt key */
#define BOOTMAGIC_KEY_SALT KC_ESC
/* skip bootmagic and eeconfig */
#define BOOTMAGIC_KEY_SKIP KC_SPACE

@ -2,12 +2,6 @@
#define PRIYADI_PROMETHIUM #define PRIYADI_PROMETHIUM
/* bootmagic salt key */
#define BOOTMAGIC_KEY_SALT KC_ESC
/* skip bootmagic and eeconfig */
#define BOOTMAGIC_KEY_SKIP KC_SPACE
#define RGBSPS_ENABLE #define RGBSPS_ENABLE
#define RGBSPS_DEMO_ENABLE #define RGBSPS_DEMO_ENABLE

@ -0,0 +1,68 @@
/* Copyright 2022 Your Mom Loves My Keyboard
*
* 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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER KeebMonkey
#define PRODUCT kbmg68
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { B1, B2, B3, B4, B5 }
#define MATRIX_COL_PINS { B6, B7, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F7, F6, F5, F4 }
#define DIODE_DIRECTION COL2ROW
#define RGB_DI_PIN B0
#ifdef RGB_DI_PIN
#define RGBLED_NUM 68
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#endif
// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/

@ -0,0 +1,80 @@
{
"keyboard_name": "kbmg68",
"url": "",
"maintainer": "qmk",
"layouts": {
"LAYOUT_65_ansi": {
"layout": [
{ "label": "K00 (B1,B6)", "x": 0, "y": 0 },
{ "label": "K01 (B1,B7)", "x": 1, "y": 0 },
{ "label": "K02 (B1,D0)", "x": 2, "y": 0 },
{ "label": "K03 (B1,D1)", "x": 3, "y": 0 },
{ "label": "K04 (B1,D2)", "x": 4, "y": 0 },
{ "label": "K05 (B1,D3)", "x": 5, "y": 0 },
{ "label": "K06 (B1,D4)", "x": 6, "y": 0 },
{ "label": "K07 (B1,D5)", "x": 7, "y": 0 },
{ "label": "K08 (B1,D6)", "x": 8, "y": 0 },
{ "label": "K09 (B1,D7)", "x": 9, "y": 0 },
{ "label": "K0A (B1,C6)", "x": 10, "y": 0 },
{ "label": "K0B (B1,C7)", "x": 11, "y": 0 },
{ "label": "K0C (B1,F7)", "x": 12, "y": 0 },
{ "label": "K0E (B1,F5)", "x": 13, "y": 0, "w": 2 },
{ "label": "K0F (B1,F4)", "x": 15, "y": 0 },
{ "label": "K10 (B2,B6)", "x": 0, "y": 1, "w": 1.5 },
{ "label": "K12 (B2,D0)", "x": 1.5, "y": 1 },
{ "label": "K13 (B2,D1)", "x": 2.5, "y": 1 },
{ "label": "K14 (B2,D2)", "x": 3.5, "y": 1 },
{ "label": "K15 (B2,D3)", "x": 4.5, "y": 1 },
{ "label": "K16 (B2,D4)", "x": 5.5, "y": 1 },
{ "label": "K17 (B2,D5)", "x": 6.5, "y": 1 },
{ "label": "K18 (B2,D6)", "x": 7.5, "y": 1 },
{ "label": "K19 (B2,D7)", "x": 8.5, "y": 1 },
{ "label": "K1A (B2,C6)", "x": 9.5, "y": 1 },
{ "label": "K1B (B2,C7)", "x": 10.5, "y": 1 },
{ "label": "K1C (B2,F7)", "x": 11.5, "y": 1 },
{ "label": "K1D (B2,F6)", "x": 12.5, "y": 1 },
{ "label": "K1E (B2,F5)", "x": 13.5, "y": 1, "w": 1.5 },
{ "label": "K1F (B2,F4)", "x": 15, "y": 1 },
{ "label": "K20 (B3,B6)", "x": 0, "y": 2, "w": 1.75 },
{ "label": "K22 (B3,D0)", "x": 1.75, "y": 2 },
{ "label": "K23 (B3,D1)", "x": 2.75, "y": 2 },
{ "label": "K24 (B3,D2)", "x": 3.75, "y": 2 },
{ "label": "K25 (B3,D3)", "x": 4.75, "y": 2 },
{ "label": "K26 (B3,D4)", "x": 5.75, "y": 2 },
{ "label": "K27 (B3,D5)", "x": 6.75, "y": 2 },
{ "label": "K28 (B3,D6)", "x": 7.75, "y": 2 },
{ "label": "K29 (B3,D7)", "x": 8.75, "y": 2 },
{ "label": "K2A (B3,C6)", "x": 9.75, "y": 2 },
{ "label": "K2B (B3,C7)", "x": 10.75, "y": 2 },
{ "label": "K2C (B3,F7)", "x": 11.75, "y": 2 },
{ "label": "K2D (B3,F6)", "x": 12.75, "y": 2, "w": 2.25 },
{ "label": "K2F (B3,F4)", "x": 15, "y": 2 },
{ "label": "K31 (B4,B7)", "x": 0, "y": 3, "w": 2.25 },
{ "label": "K32 (B4,D0)", "x": 2.25, "y": 3 },
{ "label": "K33 (B4,D1)", "x": 3.25, "y": 3 },
{ "label": "K34 (B4,D2)", "x": 4.25, "y": 3 },
{ "label": "K35 (B4,D3)", "x": 5.25, "y": 3 },
{ "label": "K36 (B4,D4)", "x": 6.25, "y": 3 },
{ "label": "K37 (B4,D5)", "x": 7.25, "y": 3 },
{ "label": "K38 (B4,D6)", "x": 8.25, "y": 3 },
{ "label": "K39 (B4,D7)", "x": 9.25, "y": 3 },
{ "label": "K3A (B4,C6)", "x": 10.25, "y": 3 },
{ "label": "K3B (B4,C7)", "x": 11.25, "y": 3 },
{ "label": "K3D (B4,F6)", "x": 12.25, "y": 3, "w": 1.75 },
{ "label": "K3E (B4,F5)", "x": 14, "y": 3 },
{ "label": "K3F (B4,F4)", "x": 15, "y": 3 },
{ "label": "K40 (B5,B6)", "x": 0, "y": 4, "w": 1.25 },
{ "label": "K41 (B5,B7)", "x": 1.25, "y": 4, "w": 1.25 },
{ "label": "K43 (B5,D1)", "x": 2.5, "y": 4, "w": 1.25 },
{ "label": "K46 (B5,D4)", "x": 3.75, "y": 4, "w": 6.25 },
{ "label": "K4A (B5,C6)", "x": 10, "y": 4 },
{ "label": "K4B (B5,C7)", "x": 11, "y": 4 },
{ "label": "K4C (B5,F7)", "x": 12, "y": 4 },
{ "label": "K4D (B5,F6)", "x": 13, "y": 4 },
{ "label": "K4E (B5,F5)", "x": 14, "y": 4 },
{ "label": "K4F (B5,F4)", "x": 15, "y": 4 }
]
}
}
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
}

@ -0,0 +1,20 @@
/* Copyright 2022 Your Mom Loves My Keyboard
*
* 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 "kbmg68.h"
// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/

@ -0,0 +1,38 @@
/* Copyright 2022 Your Mom Loves My Keyboard
*
* 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
#include "quantum.h"
#define XXX KC_NO
#define LAYOUT_65_ansi( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F }, \
{ K10, XXX, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, XXX, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, XXX, K2F }, \
{ XXX, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \
{ K40, K41, XXX, K43, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F }, \
}
// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/

@ -0,0 +1,45 @@
/* Copyright 2022 Your Mom Loves My Keyboard
*
* 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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi(
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_BSPC, 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_BSLS, KC_DEL,
KC_CAPS, 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_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_65_ansi(
RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
MO(2), _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______
),
[2] = LAYOUT_65_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
),
};

@ -0,0 +1,27 @@
# KBMG68
![KBMG68](https://cdn.shopify.com/s/files/1/0463/5980/6101/products/IMG_2062_600x.jpg?v=1636042030)
The Keebmonkey KBMG68 should be the cheapest gasket keyboard you can ever have. Both the plate and the PCB are gasket mounted, resulting in a deep thocky sound. The shell of the kit is made of 6-layers of acrylic boards, leaving huge space for modding and continuous improvements (even though this kit already sounds perfect when it's out of the box).
* Keyboard Maintainer: Unknown
* Hardware Supported: Unknown
* Hardware Availability: [Keebmonkey KBMG68 Double Mounted Gasket Keyboard Kit](https://www.keebmonkey.com/products/kbmg68)
## Instructions
### Build
Make example for this keyboard (after setting up your build environment):
make keebmonkey/kbmg68:default
Flashing example for this keyboard:
make keebmonkey/kbmg68:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
### Reset to Bootloader
Hold the Escape key while plugging the board in.

@ -0,0 +1,20 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = no # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LAYOUTS = 65_ansi

@ -0,0 +1,32 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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
#undef TAPPING_TERM
#define TAPPING_TERM 200
/* RGB Matrix Configuration */
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define MAC_LAYER_DEFAULT_COLOR RGB_CYAN
# define WIN_LAYER_DEFAULT_COLOR RGB_GREEN
# define CAPS_LOCK_INDICATOR_COLOR RGB_RED
# define CAPS_LOCK_INDICATOR_LIGHT_60
# define FN_LAYER_TRANSPARENT_KEYS_OFF
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#endif

@ -0,0 +1,95 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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 "keymap_user.h"
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix_user.h"
#endif
// clang-format off
enum custom_keycodes {
KC_MISSION_CONTROL = USER00,
KC_LAUNCHPAD,
};
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define TG_NKRO MAGIC_TOGGLE_NKRO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_82(
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_DEL, KC_HOME,
KC_GRV, 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_BSPC, KC_END,
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_BSLS, KC_PGUP,
KC_LGMAC, 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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_MACFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[MAC_FN] = LAYOUT_ansi_82(
_______, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MACPS, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
KC_CAPS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, KC_LMAC, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[WIN_BASE] = LAYOUT_ansi_82(
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_DEL, KC_HOME,
KC_GRV, 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_BSPC, KC_END,
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_BSLS, KC_PGUP,
KC_LGWIN, 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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WINFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[WIN_FN] = LAYOUT_ansi_82(
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
KC_CAPS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
};
// clang-format on
void matrix_init_user(void) {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_init_user();
#endif
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
default:
return true; // Process all other keycodes normally
}
}

@ -0,0 +1,48 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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
// clang-format off
enum layers {
MAC_BASE,
MAC_FN,
WIN_BASE,
WIN_FN
};
// clang-format on
// Tap dance enums
enum {
MAC_CAPS_LANGUAGE_CHANGE,
WIN_CAPS_LANGUAGE_CHANGE,
};
#ifdef TAP_DANCE_ENABLE
# define KC_LGMAC TD(MAC_CAPS_LANGUAGE_CHANGE)
# define KC_LGWIN TD(WIN_CAPS_LANGUAGE_CHANGE)
#else
# define KC_LGMAC KC_CAPS
# define KC_LGWIN KC_CAPS
#endif
#define KC_MACFN MO(MAC_FN)
#define KC_WINFN MO(WIN_FN)
#define KC_LMAC C(G(KC_Q))
#define KC_MACPS G(S(KC_5))
#define KC_TASK G(KC_TAB)
#define KC_FLXP G(KC_E)

@ -0,0 +1,13 @@
# teimor's Keychron Q1 keymap
- Via Enabled.
- Tap dance enabled.
- On macOS, F3 opens Mission Control and F4 opens Launchpad without needing to configure shortcuts in System Preferences.
- RGB lighting turns off when the computer sleeps.
- The RGB lighting for keys that are not assigned turns off when the Fn layer is active
- 60% layout turns red to indicate when Caps Lock is on.
- Windows and macOS: A single tap will quickly change the language, and holding will trigger Caps Lock. (Using Tap Dance)
- RGB Matrix based on layout - macOS base layout will turn on cyan color, Windows base layout will turn on green color.
- `fn + N` will toggle NKRO, useful when using the keyboard on freebsd.
- `fn + L` on macOS will lock the system.
- `fn + del` will trigger screenshot on macOS and Windows.

@ -0,0 +1,91 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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 "rgb_matrix_user.h"
#include "keymap_user.h"
keypos_t led_index_key_position[DRIVER_LED_TOTAL];
void rgb_matrix_init_user(void) {
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
uint8_t led_index = g_led_config.matrix_co[row][col];
if (led_index != NO_LED) {
led_index_key_position[led_index] = (keypos_t){.row = row, .col = col};
}
}
}
}
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t current_layer = get_highest_layer(layer_state | default_layer_state);
switch (current_layer) {
case MAC_BASE:
case WIN_BASE:
#if defined CAPS_LOCK_INDICATOR_COLOR && defined MAC_LAYER_DEFAULT_COLOR && defined WIN_LAYER_DEFAULT_COLOR
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_caps_lock_indicator, CAPS_LOCK_INDICATOR_COLOR);
} else if (current_layer == MAC_BASE)
rgb_matrix_set_color_all(MAC_LAYER_DEFAULT_COLOR);
else if (current_layer == WIN_BASE)
rgb_matrix_set_color_all(WIN_LAYER_DEFAULT_COLOR);
#endif
break;
case MAC_FN:
case WIN_FN:
#if defined MAC_LAYER_DEFAULT_COLOR && defined WIN_LAYER_DEFAULT_COLOR
if (current_layer == MAC_FN) {
rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_not_transparent, MAC_LAYER_DEFAULT_COLOR);
} else if (current_layer == WIN_FN) {
rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_not_transparent, WIN_LAYER_DEFAULT_COLOR);
}
#endif
#ifdef FN_LAYER_TRANSPARENT_KEYS_OFF
rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_transparent, RGB_OFF);
#endif
break;
}
}
void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) {
for (uint8_t i = led_min; i < led_max; i++) {
uint16_t keycode = keymap_key_to_keycode(layer, led_index_key_position[i]);
if ((*is_keycode)(keycode)) {
rgb_matrix_set_color(i, red, green, blue);
}
#if defined MAC_LAYER_DEFAULT_COLOR && defined WIN_LAYER_DEFAULT_COLOR
else {
if (layer == MAC_BASE)
rgb_matrix_set_color(i, MAC_LAYER_DEFAULT_COLOR);
else if (layer == WIN_BASE)
rgb_matrix_set_color(i, WIN_LAYER_DEFAULT_COLOR);
}
#endif
}
}
bool is_caps_lock_indicator(uint16_t keycode) {
bool indicator = keycode == KC_CAPS || keycode == KC_LGMAC || keycode == KC_LGWIN;
#ifdef CAPS_LOCK_INDICATOR_LIGHT_60
return (KC_A <= keycode && keycode <= KC_CAPS) || (KC_LEFT_CTRL <= keycode && keycode <= KC_RIGHT_GUI) || keycode == KC_MACFN || keycode == KC_WINFN || indicator;
#else
return indicator;
#endif
}
bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; }
bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; }

@ -0,0 +1,25 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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
void rgb_matrix_init_user(void);
void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue);
bool is_caps_lock_indicator(uint16_t keycode);
bool is_transparent(uint16_t keycode);
bool is_not_transparent(uint16_t keycode);

@ -0,0 +1,14 @@
VIA_ENABLE = yes
MOUSEKEY_ENABLE = no
TAP_DANCE_ENABLE = yes
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
SRC += rgb_matrix_user.c
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dance_user.c
SRC += tap_dance_setup.c
SRC += tap_dance_mac_caps.c
SRC += tap_dance_win_caps.c
endif

@ -0,0 +1,50 @@
/* Copyright 2021 @ Teimor Epstein
*
* 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/>.
*/
/* macOS CapsLock language change */
#include "tap_dance_mac_caps.h"
static td_tap_t mac_caps_language_tap_state = {.is_press_action = true, .state = TD_NONE};
void mac_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) {
mac_caps_language_tap_state.state = current_dance(state);
switch (mac_caps_language_tap_state.state) {
case TD_SINGLE_TAP:
register_code(KC_LCTL);
register_code(KC_SPACE);
break;
case TD_SINGLE_HOLD:
register_code(KC_CAPS_LOCK);
break;
default:
break;
}
}
void mac_caps_language_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (mac_caps_language_tap_state.state) {
case TD_SINGLE_TAP:
unregister_code(KC_SPACE);
unregister_code(KC_LCTL);
break;
case TD_SINGLE_HOLD:
unregister_code(KC_CAPS_LOCK);
break;
default:
break;
}
mac_caps_language_tap_state.state = TD_NONE;
}

@ -0,0 +1,23 @@
/* Copyright 2021 @ Teimor Epstein
*
* 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/>.
*/
/* macOS CapsLock language change */
#pragma once
#include "tap_dance_setup.h"
void mac_caps_language_finished(qk_tap_dance_state_t *state, void *user_data);
void mac_caps_language_reset(qk_tap_dance_state_t *state, void *user_data);

@ -0,0 +1,49 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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 "tap_dance_setup.h"
td_state_t current_dance(qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
/* Key has not been interrupted, but the key is still held. Means you w ant to send a 'HOLD'. */
else
return TD_SINGLE_HOLD;
} else if (state->count == 2) {
/* TD_DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
action when hitting 'pp'. Suggested use case for this return value is when you want to send two
keystrokes of the key, and not the 'double tap' action/macro. */
if (state->interrupted)
return TD_DOUBLE_SINGLE_TAP;
else if (state->pressed)
return TD_DOUBLE_HOLD;
else
return TD_DOUBLE_TAP;
}
/* Assumes no one is trying to type the same letter three times (at least not quickly).
If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
an exception here to return a 'TD_TRIPLE_SINGLE_TAP', and define that enum just like 'TD_DOUBLE_SINGLE_TAP' */
if (state->count == 3) {
if (state->interrupted)
return TD_TRIPLE_SINGLE_TAP;
else if (state->pressed)
return TD_TRIPLE_HOLD;
else
return TD_TRIPLE_TAP;
} else
return TD_UNKNOWN;
}

@ -0,0 +1,38 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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
#include QMK_KEYBOARD_H
typedef enum {
TD_NONE,
TD_UNKNOWN,
TD_SINGLE_TAP,
TD_SINGLE_HOLD,
TD_DOUBLE_TAP,
TD_DOUBLE_HOLD,
TD_DOUBLE_SINGLE_TAP, // Send two single taps
TD_TRIPLE_TAP,
TD_TRIPLE_HOLD,
TD_TRIPLE_SINGLE_TAP // Send three single tap
} td_state_t;
typedef struct {
bool is_press_action;
td_state_t state;
} td_tap_t;
td_state_t current_dance(qk_tap_dance_state_t *state);

@ -0,0 +1,28 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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 "keymap_user.h"
#include "tap_dance_mac_caps.h"
#include "tap_dance_win_caps.h"
// clang-format off
qk_tap_dance_action_t tap_dance_actions[] = {
[MAC_CAPS_LANGUAGE_CHANGE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, mac_caps_language_finished, mac_caps_language_reset),
[WIN_CAPS_LANGUAGE_CHANGE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, win_caps_language_finished, win_caps_language_reset)
};
// clang-format on

@ -0,0 +1,50 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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/>.
*/
/* Windows CapsLock language change */
#include "tap_dance_win_caps.h"
static td_tap_t win_caps_language_tap_state = {.is_press_action = true, .state = TD_NONE};
void win_caps_language_finished(qk_tap_dance_state_t *state, void *user_data) {
win_caps_language_tap_state.state = current_dance(state);
switch (win_caps_language_tap_state.state) {
case TD_SINGLE_TAP:
register_code(KC_LGUI);
register_code(KC_SPACE);
break;
case TD_SINGLE_HOLD:
register_code(KC_CAPS_LOCK);
break;
default:
break;
}
}
void win_caps_language_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (win_caps_language_tap_state.state) {
case TD_SINGLE_TAP:
unregister_code(KC_SPACE);
unregister_code(KC_LGUI);
break;
case TD_SINGLE_HOLD:
unregister_code(KC_CAPS_LOCK);
break;
default:
break;
}
win_caps_language_tap_state.state = TD_NONE;
}

@ -0,0 +1,23 @@
/* Copyright 2022 @ Teimor Epstein
*
* 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/>.
*/
/* Windows CapsLock language change */
#pragma once
#include "tap_dance_setup.h"
void win_caps_language_finished(qk_tap_dance_state_t *state, void *user_data);
void win_caps_language_reset(qk_tap_dance_state_t *state, void *user_data);

@ -0,0 +1,86 @@
/*
Copyright 2022 Mechlovin'
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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x4D4C
#define PRODUCT_ID 0x0601
#define DEVICE_VER 0x0001
#define MANUFACTURER Mechlovin Studio
#define PRODUCT Zed60
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { B10, B2, B1, B0, A2 }
#define MATRIX_COL_PINS { A10, A3, A9, A8, B15, B14, B13, B12, B5, B4, B3, A15, B7, B6 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN A4
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN A7
#define RGBLED_NUM 22
#define RGBLIGHT_LIMIT_VAL 255
#define WS2812_SPI SPID1 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
//#define RGB_DI_PIN E2
//#ifdef RGB_DI_PIN
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
# define RGBLIGHT_EFFECT_SNAKE
# define RGBLIGHT_EFFECT_KNIGHT
# define RGBLIGHT_EFFECT_CHRISTMAS
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
# define RGBLIGHT_EFFECT_RGB_TEST
# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

@ -0,0 +1,22 @@
/* Copyright 2022 QMK
*
* 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 HAL_USE_SPI TRUE
#include_next <halconf.h>

@ -0,0 +1,150 @@
{
"keyboard_name": "Zed60",
"url": "",
"maintainer": "Mechlovin' Studio",
"layout_aliases": {
"LAYOUT_all": "LAYOUT_60_ansi_split_bs_rshift"
},
"layouts": {
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 12, "y": 0},
{"x": 13, "y": 0},
{"x": 14, "y": 0},
{"x": 0, "y": 1, "w": 1.5},
{"x": 1.5, "y": 1},
{"x": 2.5, "y": 1},
{"x": 3.5, "y": 1},
{"x": 4.5, "y": 1},
{"x": 5.5, "y": 1},
{"x": 6.5, "y": 1},
{"x": 7.5, "y": 1},
{"x": 8.5, "y": 1},
{"x": 9.5, "y": 1},
{"x": 10.5, "y": 1},
{"x": 11.5, "y": 1},
{"x": 12.5, "y": 1},
{"x": 13.5, "y": 1, "w": 1.5},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 5.75, "y": 2},
{"x": 6.75, "y": 2},
{"x": 7.75, "y": 2},
{"x": 8.75, "y": 2},
{"x": 9.75, "y": 2},
{"x": 10.75, "y": 2},
{"x": 11.75, "y": 2},
{"x": 12.75, "y": 2, "w": 2.25},
{"x": 0, "y": 3, "w": 2.25},
{"x": 2.25, "y": 3},
{"x": 3.25, "y": 3},
{"x": 4.25, "y": 3},
{"x": 5.25, "y": 3},
{"x": 6.25, "y": 3},
{"x": 7.25, "y": 3},
{"x": 8.25, "y": 3},
{"x": 9.25, "y": 3},
{"x": 10.25, "y": 3},
{"x": 11.25, "y": 3},
{"x": 12.25, "y": 3, "w": 1.75},
{"x": 14, "y": 3},
{"x": 0, "y": 4, "w": 1.25},
{"x": 1.25, "y": 4, "w": 1.25},
{"x": 2.5, "y": 4, "w": 1.25},
{"x": 3.75, "y": 4, "w": 6.25},
{"x": 10, "y": 4, "w": 1.25},
{"x": 11.25, "y": 4, "w": 1.25},
{"x": 12.5, "y": 4, "w": 1.25},
{"x": 13.75, "y": 4, "w": 1.25}
]
},
"LAYOUT_60_ansi": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 12, "y": 0},
{"x": 13, "y": 0, "w": 2},
{"x": 0, "y": 1, "w": 1.5},
{"x": 1.5, "y": 1},
{"x": 2.5, "y": 1},
{"x": 3.5, "y": 1},
{"x": 4.5, "y": 1},
{"x": 5.5, "y": 1},
{"x": 6.5, "y": 1},
{"x": 7.5, "y": 1},
{"x": 8.5, "y": 1},
{"x": 9.5, "y": 1},
{"x": 10.5, "y": 1},
{"x": 11.5, "y": 1},
{"x": 12.5, "y": 1},
{"x": 13.5, "y": 1, "w": 1.5},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 5.75, "y": 2},
{"x": 6.75, "y": 2},
{"x": 7.75, "y": 2},
{"x": 8.75, "y": 2},
{"x": 9.75, "y": 2},
{"x": 10.75, "y": 2},
{"x": 11.75, "y": 2},
{"x": 12.75, "y": 2, "w": 2.25},
{"x": 0, "y": 3, "w": 2.25},
{"x": 2.25, "y": 3},
{"x": 3.25, "y": 3},
{"x": 4.25, "y": 3},
{"x": 5.25, "y": 3},
{"x": 6.25, "y": 3},
{"x": 7.25, "y": 3},
{"x": 8.25, "y": 3},
{"x": 9.25, "y": 3},
{"x": 10.25, "y": 3},
{"x": 11.25, "y": 3},
{"x": 12.25, "y": 3, "w": 2.75},
{"x": 0, "y": 4, "w": 1.25},
{"x": 1.25, "y": 4, "w": 1.25},
{"x": 2.5, "y": 4, "w": 1.25},
{"x": 3.75, "y": 4, "w": 6.25},
{"x": 10, "y": 4, "w": 1.25},
{"x": 11.25, "y": 4, "w": 1.25},
{"x": 12.5, "y": 4, "w": 1.25},
{"x": 13.75, "y": 4, "w": 1.25}
]
}
}
}

@ -0,0 +1,36 @@
/* Copyright 2022 Mechlovin'
*
* 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
#define LT1_CAP LT(1, KC_CAPS)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi_split_bs_rshift(
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_BSPC, KC_DEL,
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_BSLS,
LT1_CAP, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL
),
[1] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};

@ -0,0 +1 @@
# The default keymap for Zed60

@ -0,0 +1,50 @@
/* Copyright 2022 Mechlovin'
*
* 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
#define LT1_CAP LT(1, KC_CAPS)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi_split_bs_rshift(
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_BSPC, KC_DEL,
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_BSLS,
LT1_CAP, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL
),
[1] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_60_ansi_split_bs_rshift(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};

@ -0,0 +1,23 @@
/* Copyright 2022 QMK
*
* 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
#include_next <mcuconf.h>
#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE

@ -0,0 +1,27 @@
# zed60
![zed60](https://i.imgur.com/KyTpfmMl.png)
Zed60 PCB, 60% keyboard PCB.
* Keyboard Maintainer: [Mechlovin'](https://mechlovin.studio)
* Hardware Supported: Kay60, APM32F103
* Hardware Availability: [Mechlovin'](https://mechlovin.studio)
Make example for this keyboard (after setting up your build environment):
make mechlovin/zed60:default
Flashing example for this keyboard:
make mechlovin/zed60:default:flash
## Bootloader
Enter the bootloader in 4 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
* **Bootloader**: Hold down the key at (0,13) in the matrix (Backspace) and plug in the keyboard
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

@ -0,0 +1,20 @@
# MCU name
MCU = STM32F103
# Bootloader selection
BOOTLOADER = stm32duino
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
WS2812_DRIVER = spi

@ -0,0 +1,17 @@
/* Copyright 2022 Mechlovin' Studio
*
* 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 "zed60.h"

@ -0,0 +1,66 @@
/* Copyright 2022 Mechlovin'
*
* 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
#include "quantum.h"
#define XXX KC_NO
/*
*
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 2C 0D 2u Backspace
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2D
30 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3C 2.75u RShift
*
* 40 41 42 46 4A 4B 4C 4D Standard
*
*
* 40 41 42 46 4B 4C 4D Tsangan/WKL
*
*/
#define LAYOUT_60_ansi_split_bs_rshift( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
{ K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D }, \
}
#define LAYOUT_60_ansi( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \
{ K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D }, \
}

@ -0,0 +1,96 @@
// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x6D77 // mw = "MechWild"
#define PRODUCT_ID 0x170C
#define DEVICE_VER 0x0103
#define MANUFACTURER MechWild
#define PRODUCT Mokulua
/* Key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 6
/* Key matrix pins */
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 }
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
#define UNUSED_PINS
/* Encoder pins */
#define ENCODERS_PAD_A { D2 }
#define ENCODERS_PAD_B { B2 }
/* Encoder resolution */
#define ENCODER_RESOLUTION 4
#define TAP_CODE_DELAY 10
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define OLED_FONT_H "keyboards/mechwild/mokulua/glcdfont.c"
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D3
#define MASTER_LEFT
//#define MASTER_RIGHT
#define RGBLIGHT_SPLIT
#define RGBLED_SPLIT { 8, 8 }
#define SPLIT_LAYER_STATE_ENABLE
#define SPLIT_LED_STATE_ENABLE
#define SPLIT_MODS_ENABLE
#define SPLIT_OLED_ENABLE
/* RGB options */
#define RGB_DI_PIN B6
#ifdef RGB_DI_PIN
# define RGBLED_NUM 16
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== choose RGB animations ==*/
//# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//# define RGBLIGHT_EFFECT_SNAKE
//# define RGBLIGHT_EFFECT_KNIGHT
//# define RGBLIGHT_EFFECT_CHRISTMAS
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
//# define RGBLIGHT_EFFECT_RGB_TEST
//# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
//#define GRAVE_ESC_CTRL_OVERRIDE
/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0

@ -0,0 +1,10 @@
{
"keyboard_name": "Mokulua Mirrored",
"url": "https://mechwild.com",
"maintainer": "kylemccreery",
"layouts": {
"LAYOUT_mirrored": {
"layout": [{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0.47, "y":1, "w":1.5}, {"x":1.97, "y":1}, {"x":15.78, "y":1}, {"x":16.78, "y":1, "w":1.5}, {"x":0.37, "y":2, "w":1.75}, {"x":2.12, "y":2}, {"x":15.63, "y":2}, {"x":16.63, "y":2, "w":1.75}, {"x":0.22, "y":3, "w":1.25}, {"x":1.47, "y":3}, {"x":2.47, "y":3}, {"x":9.43, "y":3}, {"x":15.28, "y":3}, {"x":16.28, "y":3}, {"x":17.28, "y":3, "w":1.25}, {"x":0.47, "y":4}, {"x":1.47, "y":4}, {"x":2.47, "y":4}, {"x":9.68, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}, {"x":17.25, "y":4}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":0.5, "y":2.25}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":0.75, "y":3.25}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.57, "y":4.25}, {"x":1, "y":5.25, "w":1.25}, {"x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25, "w":1.5}, {"x":5.32, "y":5.25}, {"x":-1.0, "y":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":-1.5, "y":3}, {"x":-0.5, "y":3}, {"x":0.5, "y":3}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":-1.75, "y":4}, {"x":-0.75, "y":4}, {"x":0.25, "y":4}, {"x":1.25, "y":4}, {"x":2.25, "y":4}, {"x":-1.25, "y":5}, {"x":-0.25, "y":5}, {"x":0.75, "y":5}, {"x":1.75, "y":5}, {"x":-1.25, "y":6, "w":1.5}, {"x":0.25, "y":6, "w":1.5}, {"x":1.75, "y":6, "w":1.25}]
}
}
}

@ -0,0 +1,46 @@
// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#define FN1_SPC LT(1, KC_SPC)
#define FN2_SPC LT(2, KC_SPC)
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN1,
_FN2,
_FN3
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = 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_BSPC, _______,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_SCLN, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MUTE, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, MO(2), FN1_SPC, FN2_SPC, RGB_RMOD, RGB_MOD, FN2_SPC, FN1_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT
),
[_FN1] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, KC_DEL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[_FN2] = LAYOUT(
_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

@ -0,0 +1 @@
# The default keymap for Mokulua using a mirrored right-half

@ -0,0 +1,46 @@
// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#define FN1_SPC LT(1, KC_SPC)
#define FN2_SPC LT(2, KC_SPC)
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN1,
_FN2,
_FN3
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = 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_BSPC, _______,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_SCLN, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MUTE, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, MO(2), FN1_SPC, FN2_SPC, RGB_RMOD, RGB_MOD, FN2_SPC, FN1_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT
),
[_FN1] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, KC_DEL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[_FN2] = LAYOUT(
_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

@ -0,0 +1 @@
# The VIA keymap for Mokulua using a mirrored right-half

@ -0,0 +1,82 @@
// Copyright 2022 Kyle McCreery (@Kyle McCreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "mirrored.h"
#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
switch (index) {
case 0:
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
case 1:
if (clockwise) {
tap_code(KC_PGUP);
} else {
tap_code(KC_PGDN);
}
break;
}
return true;
}
#endif
#ifdef OLED_ENABLE
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_270; // flips the display 270 degrees
}
static void render_logo(void) { // Render MechWild "MW" Logo
static const char PROGMEM logo_1[] = {0x8A, 0x8B, 0x8C, 0x8D, 0x00};
static const char PROGMEM logo_2[] = {0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0x00};
static const char PROGMEM logo_3[] = {0xCA, 0xCB, 0xCC, 0xCD, 0x00};
static const char PROGMEM logo_4[] = {0x20, 0x8E, 0x8F, 0x90, 0x00};
oled_set_cursor(0,0);
oled_write_P(logo_1, false);
oled_set_cursor(0,1);
oled_write_P(logo_2, false);
oled_set_cursor(0,2);
oled_write_P(logo_3, false);
oled_set_cursor(0,3);
oled_write_P(logo_4, false);
}
bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
render_logo();
oled_set_cursor(0,6);
oled_write_ln_P(PSTR("Layer"), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_ln_P(PSTR("Base"), false);
break;
case 1:
oled_write_ln_P(PSTR("FN 1"), false);
break;
case 2:
oled_write_ln_P(PSTR("FN 2"), false);
break;
case 3:
oled_write_ln_P(PSTR("FN 3"), false);
break;
default:
oled_write_ln_P(PSTR("Undef"), false);
}
oled_write_ln_P(PSTR(""), false);
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
return false;
}
#endif

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save