From 8b059088ba9c310d3790d2839027e966f1082393 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 26 Jun 2021 00:00:21 -0500 Subject: =?UTF-8?q?Keyboards/RGBKB/M=C3=BCn=20(#13239)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/rgbkb/common/common_oled.c | 101 +++++++ keyboards/rgbkb/common/common_oled.h | 21 ++ keyboards/rgbkb/common/glcdfont.c | 240 ++++++++++++++++ keyboards/rgbkb/common/touch_encoder.c | 310 +++++++++++++++++++++ keyboards/rgbkb/common/touch_encoder.h | 54 ++++ keyboards/rgbkb/mun/.noci | 0 keyboards/rgbkb/mun/config.h | 106 +++++++ keyboards/rgbkb/mun/halconf.h | 24 ++ keyboards/rgbkb/mun/keymaps/default/config.h | 32 +++ keyboards/rgbkb/mun/keymaps/default/keymap.c | 252 +++++++++++++++++ keyboards/rgbkb/mun/keymaps/default/rules.mk | 1 + keyboards/rgbkb/mun/keymaps/xulkal2/config.h | 42 +++ keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c | 246 ++++++++++++++++ keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk | 4 + keyboards/rgbkb/mun/matrix.c | 156 +++++++++++ keyboards/rgbkb/mun/mcuconf.h | 42 +++ keyboards/rgbkb/mun/mun.c | 35 +++ keyboards/rgbkb/mun/mun.h | 16 ++ keyboards/rgbkb/mun/readme.md | 15 + keyboards/rgbkb/mun/rev1/config.h | 12 + keyboards/rgbkb/mun/rev1/info.json | 101 +++++++ keyboards/rgbkb/mun/rev1/readme.md | 15 + keyboards/rgbkb/mun/rev1/rev1.c | 122 ++++++++ keyboards/rgbkb/mun/rev1/rev1.h | 43 +++ .../rgbkb/mun/rev1/rgbkb_mun_rev1_default.json | 13 + keyboards/rgbkb/mun/rev1/rules.mk | 0 keyboards/rgbkb/mun/rules.mk | 46 +++ 27 files changed, 2049 insertions(+) create mode 100644 keyboards/rgbkb/common/common_oled.c create mode 100644 keyboards/rgbkb/common/common_oled.h create mode 100644 keyboards/rgbkb/common/glcdfont.c create mode 100644 keyboards/rgbkb/common/touch_encoder.c create mode 100644 keyboards/rgbkb/common/touch_encoder.h create mode 100644 keyboards/rgbkb/mun/.noci create mode 100644 keyboards/rgbkb/mun/config.h create mode 100644 keyboards/rgbkb/mun/halconf.h create mode 100644 keyboards/rgbkb/mun/keymaps/default/config.h create mode 100644 keyboards/rgbkb/mun/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/mun/keymaps/default/rules.mk create mode 100644 keyboards/rgbkb/mun/keymaps/xulkal2/config.h create mode 100644 keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c create mode 100644 keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk create mode 100644 keyboards/rgbkb/mun/matrix.c create mode 100644 keyboards/rgbkb/mun/mcuconf.h create mode 100644 keyboards/rgbkb/mun/mun.c create mode 100644 keyboards/rgbkb/mun/mun.h create mode 100644 keyboards/rgbkb/mun/readme.md create mode 100644 keyboards/rgbkb/mun/rev1/config.h create mode 100644 keyboards/rgbkb/mun/rev1/info.json create mode 100644 keyboards/rgbkb/mun/rev1/readme.md create mode 100644 keyboards/rgbkb/mun/rev1/rev1.c create mode 100644 keyboards/rgbkb/mun/rev1/rev1.h create mode 100644 keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json create mode 100644 keyboards/rgbkb/mun/rev1/rules.mk create mode 100644 keyboards/rgbkb/mun/rules.mk (limited to 'keyboards') diff --git a/keyboards/rgbkb/common/common_oled.c b/keyboards/rgbkb/common/common_oled.c new file mode 100644 index 0000000000..b6ea6b20af --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.c @@ -0,0 +1,101 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "common_oled.h" +#include "oled_driver.h" +#include "rgb_matrix.h" + +// for memcpy +#include +#include + +typedef struct { + bool selecting; + uint8_t selection; +} kb_menu_status_t; + +static kb_menu_status_t rgb_menu = { false, 4 }; +static bool rgb_menu_changed = false; + +void render_logo(void) { + static const char PROGMEM font_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + oled_write_P(font_logo, false); +} + +void render_icon(void) { + static const char PROGMEM font_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(font_icon, false); +} + +#define RGB_FUNCTION_COUNT 6 +typedef void (*rgb_matrix_f)(void); +const rgb_matrix_f rgb_matrix_functions[RGB_FUNCTION_COUNT][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_toggle, rgb_matrix_toggle } +}; + +void render_rgb_menu(void) { + static char buffer[63] = {0}; + snprintf(buffer, sizeof(buffer), "Hue %3dSatrn %3dValue %3dSpeed %3dMode %3dEnbld %3d", + rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_config.enable); + + if (rgb_menu.selecting) { + buffer[5 + rgb_menu.selection * 10] = '*'; + } + else { + buffer[5 + rgb_menu.selection * 10] = '>'; + } + oled_write(buffer, false); +} + +void rgb_menu_selection(void) { + if (!is_keyboard_master()) return; + rgb_menu.selecting = !rgb_menu.selecting; + rgb_menu_changed = true; +} + +void rgb_menu_action(bool clockwise) { + if (!is_keyboard_master()) return; + if (rgb_menu.selecting) { + if (!clockwise) { + rgb_menu.selection = (rgb_menu.selection - 1); + if (rgb_menu.selection >= RGB_FUNCTION_COUNT) + rgb_menu.selection = RGB_FUNCTION_COUNT - 1; + } + else { + rgb_menu.selection = (rgb_menu.selection + 1) % RGB_FUNCTION_COUNT; + } + } + else { + (*rgb_matrix_functions[rgb_menu.selection][clockwise])(); + } + rgb_menu_changed = true; +} + +void rgb_menu_update(int8_t transaction_id) { + if (!is_keyboard_master()) return; + if (!rgb_menu_changed) return; + rgb_menu_changed = false; + transaction_rpc_send(transaction_id, sizeof(kb_menu_status_t), &rgb_menu); +} + +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + memcpy(&rgb_menu, initiator2target_buffer, sizeof(kb_menu_status_t)); +} \ No newline at end of file diff --git a/keyboards/rgbkb/common/common_oled.h b/keyboards/rgbkb/common/common_oled.h new file mode 100644 index 0000000000..a99988b2a8 --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.h @@ -0,0 +1,21 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include +#include + +void render_logo(void); +void render_icon(void); +void render_rgb_menu(void); +void rgb_menu_selection(void); +void rgb_menu_action(bool clockwise); +void rgb_menu_update(int8_t transaction_id); +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); \ No newline at end of file diff --git a/keyboards/rgbkb/common/glcdfont.c b/keyboards/rgbkb/common/glcdfont.c new file mode 100644 index 0000000000..320925a8f7 --- /dev/null +++ b/keyboards/rgbkb/common/glcdfont.c @@ -0,0 +1,240 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "progmem.h" + +// Helidox 8x6 font with RGBKB SOL Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90, + 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE, + 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC, + 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4, + 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85, + 0x85, 0x87, 0x85, 0x89, 0x89, 0x92, + 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0, + 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0, + 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, + 0xF8, 0xF0, 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, + 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE, + 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, + 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE, + 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, + 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B, + 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01, + 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80, + 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80, + 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E, + 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF, + 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1, + 0x08, 0x08, 0x14, 0x77, 0x94, 0x94, + 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C, + 0xFF, 0xFF, 0x1E, 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, + 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF, + 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x02, 0x06, + 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37, + 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F, + 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F, + 0x31, 0x20, 0x21, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0, + 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48, + 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x03, 0x02, 0x04, 0x03, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, + 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, + 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F, + 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/rgbkb/common/touch_encoder.c b/keyboards/rgbkb/common/touch_encoder.c new file mode 100644 index 0000000000..6293739ec9 --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.c @@ -0,0 +1,310 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#include "i2c_master.h" +#include "keyboard.h" +#include "touch_encoder.h" +#include "print.h" +#include "wait.h" +#include "timer.h" + +// for memcpy +#include +#include + +#define I2C_ADDRESS 0x1C +#define CALIBRATION_BIT 0x80 +#define OVERFLOW_BIT 0x40 +#define SLIDER_BIT 0x02 + +#ifndef TOUCH_UPDATE_INTERVAL +# define TOUCH_UPDATE_INTERVAL 33 +#endif + +enum { // QT2120 registers + QT_CHIP_ID = 0, + QT_FIRMWARE_VERSION, + QT_DETECTION_STATUS, + QT_KEY_STATUS, + QT_SLIDER_POSITION = 5, + QT_CALIBRATE, + QT_RESET, + QT_LP, + QT_TTD, + QT_ATD, + QT_DI, + QT_TRD, + QT_DHT, + QT_SLIDER_OPTION, + QT_CHARDE_TIME, + QT_KEY0_DTHR, + QT_KEY1_DTHR, + QT_KEY2_DTHR, + QT_KEY3_DTHR, + QT_KEY4_DTHR, + QT_KEY5_DTHR, + QT_KEY6_DTHR, + QT_KEY7_DTHR, + QT_KEY8_DTHR, + QT_KEY9_DTHR, + QT_KEY10_DTHR, + QT_KEY11_DTHR, + QT_KEY0_CTRL, + QT_KEY1_CTRL, + QT_KEY2_CTRL, + QT_KEY3_CTRL, + QT_KEY4_CTRL, + QT_KEY5_CTRL, + QT_KEY6_CTRL, + QT_KEY7_CTRL, + QT_KEY8_CTRL, + QT_KEY9_CTRL, + QT_KEY10_CTRL, + QT_KEY11_CTRL, + QT_KEY0_PULSE_SCALE, + QT_KEY1_PULSE_SCALE, + QT_KEY2_PULSE_SCALE, + QT_KEY3_PULSE_SCALE, + QT_KEY4_PULSE_SCALE, + QT_KEY5_PULSE_SCALE, + QT_KEY6_PULSE_SCALE, + QT_KEY7_PULSE_SCALE, + QT_KEY8_PULSE_SCALE, + QT_KEY9_PULSE_SCALE, + QT_KEY10_PULSE_SCALE, + QT_KEY11_PULSE_SCALE, + QT_KEY0_SIGNAL, + QT_KEY1_SIGNAL = 54, + QT_KEY2_SIGNAL = 56, + QT_KEY3_SIGNAL = 58, + QT_KEY4_SIGNAL = 60, + QT_KEY5_SIGNAL = 62, + QT_KEY6_SIGNAL = 64, + QT_KEY7_SIGNAL = 66, + QT_KEY8_SIGNAL = 68, + QT_KEY9_SIGNAL = 70, + QT_KEY10_SIGNAL = 72, + QT_KEY11_SIGNAL = 74, + QT_KEY0_REFERENCE = 76, + QT_KEY1_REFERENCE = 78, + QT_KEY2_REFERENCE = 80, + QT_KEY3_REFERENCE = 82, + QT_KEY4_REFERENCE = 84, + QT_KEY5_REFERENCE = 86, + QT_KEY6_REFERENCE = 88, + QT_KEY7_REFERENCE = 90, + QT_KEY8_REFERENCE = 92, + QT_KEY9_REFERENCE = 94, + QT_KEY10_REFERENCE = 96, + QT_KEY11_REFERENCE = 98, +}; + +bool touch_initialized = false; +bool touch_disabled = false; +uint8_t touch_handness = 0; +// touch_raw & touch_processed store the Detection Status, Key Status (x2), and Slider Position values +uint8_t touch_raw[4] = { 0 }; +uint8_t touch_processed[4] = { 0 }; + +uint16_t touch_timer = 0; +uint16_t touch_update_timer = 0; + +// For split transport only +typedef struct { + uint8_t position; + uint8_t taps; +} slave_touch_status_t; + +bool touch_slave_init = false; +slave_touch_status_t touch_slave_state = { 0, 0 }; + +static bool write_register8(uint8_t address, uint8_t data) { + i2c_status_t status = i2c_writeReg((I2C_ADDRESS << 1), address, &data, sizeof(data), I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("write_register8 %d failed %d\n", address, status); + } + return status == I2C_STATUS_SUCCESS; +} + +static bool read_register(uint8_t address, uint8_t* data, uint16_t length) { + i2c_status_t status = i2c_readReg((I2C_ADDRESS << 1), address, data, length, I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("read_register %d failed %d\n", address, status); + return false; + } + return true; +} + +void touch_encoder_init(void) { + i2c_init(); + + touch_handness = is_keyboard_left() ? 0 : 1; + + // Set QT to slider mode + touch_initialized = write_register8(QT_SLIDER_OPTION, 0x80); + touch_initialized &= write_register8(QT_TTD, 4); // Toward Drift - 20 @ 3.2s + touch_initialized &= write_register8(QT_ATD, 1); // Away Drift - 5 @ 0.8s + touch_initialized &= write_register8(QT_DI, 4); // Detection Integrator - 4 + touch_initialized &= write_register8(QT_TRD, 0); // Touch Recall - 48 + touch_encoder_calibrate(); +} + +__attribute__((weak)) bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return touch_encoder_tapped_user(index, section); } +__attribute__((weak)) bool touch_encoder_update_kb(uint8_t index, bool clockwise) { return touch_encoder_update_user(index, clockwise); } + +__attribute__((weak)) bool touch_encoder_tapped_user(uint8_t index, uint8_t section) { return true; } +__attribute__((weak)) bool touch_encoder_update_user(uint8_t index, bool clockwise) { return true; } + +static void touch_encoder_update_tapped(void) { + // Started touching, being counter for TOUCH_TERM + if (touch_processed[0] & SLIDER_BIT) { + touch_timer = timer_read() + TOUCH_TERM; + return; + } + + // Touch held too long, bail + if (timer_expired(timer_read(), touch_timer)) return; + + uint8_t section = touch_processed[3] / (UINT8_MAX / TOUCH_SEGMENTS + 1); + xprintf("tap %d %d\n", touch_handness, section); + if (is_keyboard_master()) { + if (!touch_disabled) { + touch_encoder_tapped_kb(touch_handness, section); + } + } + else { + touch_slave_state.taps ^= (1 << section); + } +} + +static void touch_encoder_update_position_common(uint8_t* position, uint8_t raw, uint8_t index) { + int8_t delta = (*position - raw) / TOUCH_RESOLUTION; + bool clockwise = raw > *position; + if (delta == 0) return; + + // Don't store raw directly, as we want to ensure any remainder is kept and used next time this is called + *position -= delta * TOUCH_RESOLUTION; + xprintf("pos %d %d\n", index, raw); + //uint8_t u_delta = delta < 0 ? -delta : delta; + if (!touch_disabled) { + //for (uint8_t i = 0; i < u_delta; i++) + touch_encoder_update_kb(index, clockwise); + } +} + +static void touch_encoder_update_position(void) { + // If the user touchs and moves enough, expire touch_timer faster and do encoder position logic instead + if (!timer_expired(timer_read(), touch_timer)) { + if ((uint8_t)(touch_raw[3] - touch_processed[3]) <= TOUCH_DEADZONE) return; + touch_timer = timer_read(); + } + + if (is_keyboard_master()) { + touch_encoder_update_position_common(&touch_processed[3], touch_raw[3], touch_handness); + } + else { + touch_slave_state.position = touch_raw[3]; + } +} + +void touch_encoder_update_slave(slave_touch_status_t slave_state) { + if (!touch_slave_init) { + touch_slave_state = slave_state; + touch_slave_init = true; + return; + } + + if (touch_slave_state.position != slave_state.position) { + // Did a new slide event start? + uint8_t mask = (1 << 7); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + touch_slave_state.position = slave_state.position; + } + touch_encoder_update_position_common(&touch_slave_state.position, slave_state.position, !touch_handness); + } + + if (touch_slave_state.taps != slave_state.taps) { + if (!touch_disabled) { + for (uint8_t section = 0; section < TOUCH_SEGMENTS; section++) { + uint8_t mask = (1 << section); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + xprintf("tap %d %d\n", !touch_handness, section); + touch_encoder_tapped_kb(!touch_handness, section); + } + } + } + touch_slave_state.taps = slave_state.taps; + } +} + +void touch_encoder_update(int8_t transaction_id) { + if (!touch_initialized) return; +#if TOUCH_UPDATE_INTERVAL > 0 + if (!timer_expired(timer_read(), touch_update_timer)) return; + touch_update_timer = timer_read() + TOUCH_UPDATE_INTERVAL; +#endif + + read_register(QT_DETECTION_STATUS, &touch_raw[0], sizeof(touch_raw)); + touch_processed[1] = touch_raw[1]; + touch_processed[2] = touch_raw[2]; + + if (touch_raw[0] != touch_processed[0]) { + uint8_t delta = touch_raw[0] ^ touch_processed[0]; + touch_processed[0] = touch_raw[0]; + // When calibrating, normal sensor behavior is supended + if (delta & CALIBRATION_BIT) { + xprintf("calibration %d\n", touch_processed[0] >> 7 & 1); + } + if (delta & OVERFLOW_BIT) { + xprintf("overflow %d\n", touch_processed[0] >> 6 & 1); + } + if (delta & SLIDER_BIT) { + touch_processed[3] = touch_raw[3]; + if (!is_keyboard_master()) { + touch_slave_state.position = touch_raw[3]; + touch_slave_state.taps ^= (1 << 7); + } + touch_encoder_update_tapped(); + } + } + + if ((touch_raw[0] & SLIDER_BIT) && touch_processed[3] != touch_raw[3]) { + touch_encoder_update_position(); + } + + if (is_keyboard_master()) { + slave_touch_status_t slave_state; + if (transaction_rpc_exec(transaction_id, sizeof(bool), &touch_disabled, sizeof(slave_touch_status_t), &slave_state)) { + if (memcmp(&touch_slave_state, &slave_state, sizeof(slave_touch_status_t))) + touch_encoder_update_slave(slave_state); + } + } +} + +void touch_encoder_calibrate(void) { + if (!touch_initialized) return; + write_register8(QT_CALIBRATE, 0x01); +} + +bool touch_encoder_calibrating(void) { + return touch_raw[0] & CALIBRATION_BIT; +} + +void touch_encoder_toggle(void) { + touch_disabled = !touch_disabled; +} + +bool touch_encoder_toggled(void) { + return touch_disabled; +} + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + touch_disabled = *(bool*)initiator2target_buffer; + memcpy(target2initiator_buffer, &touch_slave_state, sizeof(slave_touch_status_t)); +} diff --git a/keyboards/rgbkb/common/touch_encoder.h b/keyboards/rgbkb/common/touch_encoder.h new file mode 100644 index 0000000000..022f619063 --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.h @@ -0,0 +1,54 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include +#include + +#ifndef TOUCH_TERM +# define TOUCH_TERM 350 +#endif + +#ifndef TOUCH_SEGMENTS +# define TOUCH_SEGMENTS 3 +#elif TOUCH_SEGMENTS < 1 || TOUCH_SEGMENTS > 5 +# error TOUCH_SEGMENTS must be between 1 and 5. +#endif + +#ifndef TOUCH_DEADZONE +# define TOUCH_DEADZONE 50 +#endif + +#ifndef TOUCH_RESOLUTION +# define TOUCH_RESOLUTION 25 +#endif + +void touch_encoder_init(void); +void touch_encoder_update(int8_t transaction_id); + +void touch_encoder_calibrate(void); +bool touch_encoder_calibrating(void); + +void touch_encoder_toggle(void); +bool touch_encoder_toggled(void); + +// Called when touch encoder is tapped, weak function overridable by the kb +bool touch_encoder_tapped_kb(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the kb +bool touch_encoder_update_kb(uint8_t index, bool clockwise); + +// Called when touch encoder is tapped, weak function overridable by the user +bool touch_encoder_tapped_user(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the user +bool touch_encoder_update_user(uint8_t index, bool clockwise); + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); diff --git a/keyboards/rgbkb/mun/.noci b/keyboards/rgbkb/mun/.noci new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h new file mode 100644 index 0000000000..802672e14d --- /dev/null +++ b/keyboards/rgbkb/mun/config.h @@ -0,0 +1,106 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3535 +#define PRODUCT_ID 0x3505 +#define MANUFACTURER RGBKB +#define PRODUCT Mün + +#define USB_POLLING_INTERVAL_MS 1 + +/* Matrix Configuration - Rows are doubled up */ +#define MATRIX_ROWS 14 +// B1, A2 reserved for encoder / touch encoder support +#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, B1, A2 } +#define MATRIX_COLS 7 +#define MATRIX_COL_PINS { A0, B11, B0, B10, B12, B2, A8 } +#define MATRIX_IO_DELAY 5 + +#define BUSY_WAIT +#define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time. +#define GPIO_INPUT_PIN_DELAY 10 + +/* Touchbar adjustments */ +#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe +#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe +#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster + +/* Encoder Configuration */ +#define ENCODERS_PAD_A { B8, B9 } +#define ENCODERS_PAD_B { A14, A15 } +#define TOUCH_SEGMENTS 3 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* CRC Configuration */ +#define CRC8_OPTIMIZE_SPEED +#define CRC8_USE_TABLE + +/* Split Keyboard Configuration */ +#define EE_HANDS +#define SPLIT_USB_DETECT +// also handles the SERIAL_USART_TX_PIN define +#define SOFT_SERIAL_PIN A9 +#define SERIAL_USART_TX_PAL_MODE 7 +#define SERIAL_USART_TIMEOUT 5 +#define SERIAL_USART_DRIVER SD1 +//#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr +#if SERIAL_USART_FULL_DUPLEX + #define SERIAL_USART_RX_PIN A10 + #define SERIAL_USART_RX_PAL_MODE 7 + // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex + #define SERIAL_USART_PIN_SWAP + #define SERIAL_USART_SPEED (2 * 1024 * 1024) +#else + #define SERIAL_USART_SPEED (1 * 1024 * 1024) +#endif + +/* Split Transport Features */ +#define SPLIT_TRANSPORT_MIRROR +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC + +/* RGB LED Configuration */ +#define RGB_DI_PIN B5 +#define RGBLED_NUM 98 +#define RGBLED_SPLIT { 49, 49 } +#define RGBLIGHT_ANIMATIONS + +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_SPLIT RGBLED_SPLIT +#define RGB_MATRIX_CENTER { 128, 34 } +#define RGB_MATRIX_LED_FLUSH_LIMIT 33 +#define RGB_MATRIX_LED_PROCESS_LIMIT 10 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + +#if RGB_UNLIMITED_POWER + #define RGBLIGHT_LIMIT_VAL 255 +#else + #define RGBLIGHT_LIMIT_VAL 127 +#endif +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_DMA_CHANNEL 3 + +#define TOUCH_UPDATE_INTERVAL 33 +#define OLED_UPDATE_INTERVAL 33 +#define TAP_CODE_DELAY 5 diff --git a/keyboards/rgbkb/mun/halconf.h b/keyboards/rgbkb/mun/halconf.h new file mode 100644 index 0000000000..c8d832a81d --- /dev/null +++ b/keyboards/rgbkb/mun/halconf.h @@ -0,0 +1,24 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +//#define HAL_USE_DAC TRUE + +//#define HAL_USE_GPT TRUE + +#define HAL_USE_I2C TRUE + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SERIAL TRUE + +#define HAL_USE_SERIAL_USB TRUE + +#include_next diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h new file mode 100644 index 0000000000..3d9aff94a6 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + + +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 +// 224B per layer right now +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 + +#define VIA_QMK_RGBLIGHT_ENABLE + +#define STM32_ONBOARD_EEPROM_SIZE 2048 + diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c new file mode 100644 index 0000000000..b120c3a37a --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c @@ -0,0 +1,252 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _COLEMAK, + _GAME, + _FN, + _ADJUST, + _VIA1, + _VIA2, + _VIA3 +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN +}; + +// Default Layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define GAME DF(_GAME) + +// Momentary Layers +#define FN MO(_FN) +#define ADJUST MO(_ADJUST) + +#define FN_CAPS LT(_FN, KC_CAPS) +#define FN_ESC LT(_FN, KC_ESC) + +/* This keyboard is enabled with an RGB Menu Control system. +This functionality is enabled, but still requires a little configuration based on your exact setup. +The RGB Menu will appear on the Right Half's OLED and can be controlled by the MENU keycodes: +MENU_BTN - Triggers a button action for the menu +MENU_UP - Triggers an increase action for the menu +MENU_DN - Triggers a decrease action for the menu + +To finish configuration for your board, you will want to change the default keycodes for an encoder on the right half. +Encoder press keycode should be set to MENU_BTN, Clockwise should be MENU_UP, and Counter Clockwise should be MENU_DN. +Depending on where you add an encoder to the right half will determin in the default keymap where you should put those keycodes. +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | FN/Caps| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shft/Ent| + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl | Win | Alt | RGBTOG | Adjust | Space | Bksp | | Enter | Space | Left | Down | Up | Right | Ctrl | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJUST, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RCTL, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + [_COLEMAK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F1, KC_F5, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F2, KC_F6, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F7, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F4, KC_F8, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_PGUP, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TCH_TOG, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, GAME, + _______, RGB_RMOD,_______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemk"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("Game "), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjst"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_icon(); + oled_write_P(PSTR(" "), false); + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + } + else { + render_icon(); + oled_write_P(PSTR(" "), false); + render_rgb_menu(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} diff --git a/keyboards/rgbkb/mun/keymaps/default/rules.mk b/keyboards/rgbkb/mun/keymaps/default/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h new file mode 100644 index 0000000000..f78d0103c1 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h @@ -0,0 +1,42 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// Xulkal custom stuff +#undef TAPPING_FORCE_HOLD + +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#define SPACE_CADET_MODIFIER_CARRYOVER +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define OLED_SCROLL_TIMEOUT 20000 +#define ONESHOT_TAP_TOGGLE 2 + +#define RGB_MATRIX_HUE_STEP 8 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 8 +#define RGB_MATRIX_SPD_STEP 8 + +#define ENCODER_RESOLUTION 2 \ No newline at end of file diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c new file mode 100644 index 0000000000..2de5888f17 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c @@ -0,0 +1,246 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _FUNCTION, + _ADJUST +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN, + RGB_RST +}; + +// Default Layers +#define QWERTY DF(_QWERTY) + +// Momentary Layers +#define FN OSL(_FUNCTION) +#define ADJ OSL(_ADJUST) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Caps | A | S | D | F | G | Play | | MN BTN | H | J | K | L | : | Enter | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shft[ | Z | X | C | V | B | { | | } | N | M | , | . | / | Shft] | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl- | Win | Alt | Del | Space | | ADJ | | FN | | Space | '" | Alt | App | Ctrl= | + * '--------+--------+--------+--------|--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, MENU_BTN,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCPO, KC_LGUI, KC_LALT, KC_DEL, KC_SPC, KC_NO, ADJ, FN, KC_NO, KC_SPC, KC_QUOTE,KC_RALT, KC_APP, KC_RCPC, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, MENU_DN, MENU_UP, MENU_DN, MENU_UP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + /* Function + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDI | SAI | VAI | HUI | RGBMD | | | | | | PrtScr | ScrLck | PseBrk | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDD | SAD | VAD | HUD | RGBRMD | | | | | | Ins | Home | PgUp | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | RGBRST | | | | RGBTOG | | | | | | Del | End | PgDn | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | Play | Prev | Next | VolUp | VolDn | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_FUNCTION] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RGB_MOD, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGB_RMOD,_______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_RST, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | | | | | | | | | | | NumLck | / | * | - | Del | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Home | Up | End | Reset | T_TOG | | | | | 7 | 8 | 9 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Left | Down | Right | | | | | | | 4 | 5 | 6 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | EepRst | | | | | 1 | 2 | 3 | Enter | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | 0 | . | Enter | | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_ADJUST] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, RESET, TCH_TOG, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, ______