From 740fc1f21b805c9bf66035fb9597928321caf6f5 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Tue, 20 May 2025 00:07:21 +0200 Subject: [PATCH 01/22] rgbmatrix enabled for kimiko rev1 --- .vscode/settings.json | 6 +- .../keycapsss/kimiko/keymaps/default/keymap.c | 30 ++- .../keycapsss/kimiko/keymaps/default/rules.mk | 13 +- .../kimiko/keymaps/graphite/config.h | 43 +++ .../kimiko/keymaps/graphite/glcdfont.c | 237 +++++++++++++++++ .../kimiko/keymaps/graphite/keymap.c | 182 +++++++++++++ .../kimiko/keymaps/graphite/rules.mk | 20 ++ .../keycapsss/kimiko/keymaps/rzr/config.h | 57 ++++ .../keycapsss/kimiko/keymaps/rzr/glcdfont.c | 237 +++++++++++++++++ .../keycapsss/kimiko/keymaps/rzr/keymap.c | 203 ++++++++++++++ .../keycapsss/kimiko/keymaps/rzr/rules.mk | 20 ++ keyboards/keycapsss/kimiko/readme.md | 44 ++-- keyboards/keycapsss/kimiko/rev1/keyboard.json | 6 + keyboards/keycapsss/kimiko/rev1/rev1.c | 248 ++++++++++++++++++ 14 files changed, 1314 insertions(+), 32 deletions(-) create mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/config.h create mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c create mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c create mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk create mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/config.h create mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c create mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c create mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk create mode 100644 keyboards/keycapsss/kimiko/rev1/rev1.c diff --git a/.vscode/settings.json b/.vscode/settings.json index f369ecb1748..ea7ca608bc7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,7 +18,8 @@ "xstddef": "c", "type_traits": "c", "utility": "c", - "ranges": "c" + "ranges": "c", + "cstdint": "c" }, "[markdown]": { "editor.trimAutoWhitespace": false, @@ -30,5 +31,6 @@ }, "clangd.arguments": [ "--header-insertion=never" - ] + ], + "workbench.tree.indent": 16 } diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c index c61fdfc03a5..a38f1c83bc0 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c @@ -28,6 +28,25 @@ enum layers { #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) +const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; + + +////////////////////////////////////////////////// +// Tap Dance declarations +enum { + TD_MINS_PLUS, +}; + +// Tap Dance definitions +// tap_dance_action_t tap_dance_actions[] = { +// // Tap once for MINUS, twice for PLUS +// [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), +// }; + +///////////////////////////////////////////////// + + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -46,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, //TD(TD_MINS_PLUS), KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI, KC_RALT @@ -130,3 +149,12 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, }; #endif // ENCODER_MAP_ENABLE + + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; + } diff --git a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk index ef4f0c0b43a..acc30dc4924 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk +++ b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk @@ -1,9 +1,16 @@ OLED_ENABLE = yes -ENCODER_ENABLE = yes # ENables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = no # ENables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow # LTO: Link Time Optimizations. # Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. # This does not affect QMK Macros and Layers LTO_ENABLE = yes -ENCODER_MAP_ENABLE = yes +ENCODER_MAP_ENABLE = no +BOOTLOADER = caterina + +TAP_DANCE_ENABLE = no + +CONSOLE_ENABLE = yes +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/config.h b/keyboards/keycapsss/kimiko/keymaps/graphite/config.h new file mode 100644 index 00000000000..8be15d964a7 --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/graphite/config.h @@ -0,0 +1,43 @@ +/* Copyright 2019 MechMerlin + * Copyright 2020 @ben_roe (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SLEEP /* 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 + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c b/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c new file mode 100644 index 00000000000..c3c79d76ee3 --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c @@ -0,0 +1,237 @@ +// Copyright 2019 MechMerlin +// Copyright 2020 @ben_roe (keycapsss.com) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "progmem.h" + +// Corne 8x6 font +// Online editor: https://helixfonteditor.netlify.com +// or https://joric.github.io/qle/ +// See also: https://github.com/soundmonster/glcdfont_converter + +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, 0x13, 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, 0x24, 0x24, 0x1C, 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, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, + 0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, + 0x22, 0x22, 0x42, 0x82, 0x02, 0x02, + 0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, + 0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, + 0x42, 0x22, 0x42, 0x82, 0x02, 0x02, + 0x02, 0x82, 0x42, 0x22, 0x12, 0x22, + 0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, + 0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, + 0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, + 0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, + 0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, + 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, + 0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, + 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, + 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, + 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, + 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, + 0x1F, 0x1F, 0x0E, 0x1B, 0x11, 0xC0, + 0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x06, + 0x0C, 0xC6, 0x1F, 0x1F, 0x80, 0x5F, + 0x1F, 0x00, 0x1F, 0x1F, 0x8E, 0x9B, + 0x91, 0x80, 0x9F, 0x9F, 0x91, 0x1F, + 0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, + 0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, + 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, + 0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, + 0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, + 0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, + 0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, + 0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, + 0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, + 0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, + 0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, + 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, + 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, + 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, + 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, + 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, + 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, + 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, + 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, + 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, + 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, + 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, + 0x00, 0x84, 0x87, 0x7D, 0x55, 0x57, + 0x55, 0x7D, 0x87, 0x84, 0x00, 0x91, + 0x95, 0x55, 0x55, 0x3F, 0x55, 0x55, + 0x95, 0x91, 0x00, 0x08, 0x08, 0x08, + 0x88, 0xFC, 0x0A, 0x09, 0x08, 0x08, + 0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, + 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, + 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, + 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, + 0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, + 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, + 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, + 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, + 0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, + 0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, + 0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, + 0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, + 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, + 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, + 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, + 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, +}; diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c b/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c new file mode 100644 index 00000000000..3efc6e41362 --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c @@ -0,0 +1,182 @@ +/* Copyright 2019 Leo Batyuk + * Copyright 2020 Drashna Jaelre <@drashna> + * Copyright 2020 @ben_roe (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum layers { + _GRAPHITE, + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; + + +////////////////////////////////////////////////// +// Tap Dance declarations +// enum { +// TD_MINS_PLUS, +// }; + +// // Tap Dance definitions +// tap_dance_action_t tap_dance_actions[] = { +// // Tap once for MINUS, twice for PLUS +// [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), +// }; + +///////////////////////////////////////////////// + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Graphite + * ,--------------------------------------------. ,---------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | + * |---------+------+------+------+------+------| |------+------+------+------+------+----------| + * | Tab | B | L | D | W | Z | | '" | F | O | U | J | -_/+ | + * |---------+------+------+------+------+------| |------+------+------+------+------+----------| + * | LShift | N | R | T | S | G |-------. ,-------| Y | H | A | E | I | /? | + * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+----------| + * | LCTRL | Q | X | M | C | V |-------| |-------| K | P | ,< | .> | ;: | =+ | + * `--------------------------------------------| / \ |---------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | + * `----------------------------------' '------------------------------------' + */ + + [_GRAPHITE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, KC_MINS, //TD(TD_MINS_PLUS), + KC_LSFT, KC_N,LALT_T(KC_R), LCTL_T(KC_T),LSFT_T(KC_S),KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, + KC_LCTL, KC_Q, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_P, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT +), + +/* QWERTY + * ,--------------------------------------------. ,----------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | -_ TD + | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | LShift | A | S | D | F | G |-------. ,-------| H | J | K | L | ;: | '" | + * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| + * | LCTRL | Z | X | C | V | B |-------| |-------| N | M | ,< | .> | /? |RShift/Enter| + * `-------------------------------------------| / \ \-----------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE| Space / \Enter |LOWER |BackSP| RGUI | RALT | + * `----------------------------------' '------------------------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, //TD(TD_MINS_PLUS), + KC_LSFT, KC_A, LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_RGUI, KC_RALT +), +/* LOWER + * ,-------------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | [ | ] | | | | = | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| |------+------+------+------+------+------| + * | | # | $ | ( | ) | ` |-------. ,-------| _ | 4 | 5 | 6 | + | _ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | % | ^ | { | } | ~ |-------| |-------| & | 1 | 2 | 3 | / | \ | + * `-------------------------------------------| / \ \-----------------------------------------------' + * | LCTRL| LGUI | LALT |LOWER| Space / \Enter |RAISE |BackSP| 0 | . | + * `----------------------------------' '------------------------------------' + */ + +[_LOWER] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, + _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, KC_AMPR, KC_1, KC_2, KC_3, KC_SLASH,KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | PgUp | Home | Up | End | Ins | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F2 | F3 | F4 | F5 | F6 |-------. ,-------| PgDn | Left | Down |Right | Del | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LCTRL| LGUI | LALT |LOWER| Space / \Enter |RAISE |BackSP| RGUI | RALT | + * `----------------------------------' '------------------------------------' + */ + +[_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, _______, + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, + _______, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* ADJUST (Press LOWER and RAISE together) + * ,-----------------------------------------. ,-----------------------------------------. + * |QK_BOOT| | | | | | | | | | | | def. layer to QWERTY | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |RGB ON| HUE+ | SAT+ | VAL+ | | | | PREV | PLAY | NEXT | | | def. layer to GRAPHITE | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | MODE | HUE- | SAT- | VAL- | | |-------. ,-------| VOL+ | MUTE | VOL- | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LCTRL| LGUI | LALT |LOWER| Space / \Enter \ |RAISE |BackSP| RGUI | RALT | + * `----------------------------------' '------------------------------------' + */ + +[_ADJUST] = LAYOUT( + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_QWERTY), + UG_TOGG, UG_HUEU, UG_SATU, UG_VALU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, DF(_GRAPHITE), + UG_NEXT, UG_HUED, UG_SATD, UG_VALD, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; + } + + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, + [_GRAPHITE] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, + [_LOWER] = { ENCODER_CCW_CW(UG_HUEU, KC_TAB), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_RAISE] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, + [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk b/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk new file mode 100644 index 00000000000..02214a851bc --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk @@ -0,0 +1,20 @@ +OLED_ENABLE = yes +ENCODER_ENABLE = yes # ENables the use of one or more encoders + +RGBLIGHT_ENABLE = no # Enable keyboard 'old' RGB lightning +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB Matrix lightning +RGB_MATRIX_DRIVER = ws2812 + +# LTO: Link Time Optimizations. +# Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. +# This does not affect QMK Macros and Layers +LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes +BOOTLOADER = caterina + +TAP_DANCE_ENABLE = yes + +CONSOLE_ENABLE = no + +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/config.h b/keyboards/keycapsss/kimiko/keymaps/rzr/config.h new file mode 100644 index 00000000000..c065f568f6f --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/rzr/config.h @@ -0,0 +1,57 @@ +/* Copyright 2019 MechMerlin + * Copyright 2020 @ben_roe (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SLEEP /* 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 + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard + +// These modes also require the RGB_MATRIX_FRAMEBUFFER_EFFECTS define to be available. +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! + +#define RGB_MATRIX_VAL_STEP 4 +#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set +#define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set +#define RGB_MATRIX_DEFAULT_VAL 60 // RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set +#define RGB_MATRIX_DEFAULT_SPD 60 // Sets the default animation speed, if none has been set diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c b/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c new file mode 100644 index 00000000000..c3c79d76ee3 --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c @@ -0,0 +1,237 @@ +// Copyright 2019 MechMerlin +// Copyright 2020 @ben_roe (keycapsss.com) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "progmem.h" + +// Corne 8x6 font +// Online editor: https://helixfonteditor.netlify.com +// or https://joric.github.io/qle/ +// See also: https://github.com/soundmonster/glcdfont_converter + +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, 0x13, 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, 0x24, 0x24, 0x1C, 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, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, + 0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, + 0x22, 0x22, 0x42, 0x82, 0x02, 0x02, + 0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, + 0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, + 0x42, 0x22, 0x42, 0x82, 0x02, 0x02, + 0x02, 0x82, 0x42, 0x22, 0x12, 0x22, + 0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, + 0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, + 0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, + 0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, + 0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, + 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, + 0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, + 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, + 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, + 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, + 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, + 0x1F, 0x1F, 0x0E, 0x1B, 0x11, 0xC0, + 0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x06, + 0x0C, 0xC6, 0x1F, 0x1F, 0x80, 0x5F, + 0x1F, 0x00, 0x1F, 0x1F, 0x8E, 0x9B, + 0x91, 0x80, 0x9F, 0x9F, 0x91, 0x1F, + 0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, + 0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, + 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, + 0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, + 0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, + 0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, + 0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, + 0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, + 0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, + 0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, + 0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, + 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, + 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, + 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, + 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, + 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, + 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, + 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, + 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, + 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, + 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, + 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, + 0x00, 0x84, 0x87, 0x7D, 0x55, 0x57, + 0x55, 0x7D, 0x87, 0x84, 0x00, 0x91, + 0x95, 0x55, 0x55, 0x3F, 0x55, 0x55, + 0x95, 0x91, 0x00, 0x08, 0x08, 0x08, + 0x88, 0xFC, 0x0A, 0x09, 0x08, 0x08, + 0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, + 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, + 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, + 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, + 0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, + 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, + 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, + 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, + 0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, + 0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, + 0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, + 0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, + 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, + 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, + 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, + 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, +}; diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c b/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c new file mode 100644 index 00000000000..ade1d0f025d --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c @@ -0,0 +1,203 @@ +/* Copyright 2019 Leo Batyuk + * Copyright 2020 Drashna Jaelre <@drashna> + * Copyright 2020 @ben_roe (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum layers { + _GRAPHITE, + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; + +////////////////////////////////////////////////// +// Tap Dance declarations +enum { + TD_MINS_PLUS, +}; + +// Tap Dance definitions +tap_dance_action_t tap_dance_actions[] = { + // Tap once for MINUS, twice for PLUS + [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), +}; + +///////////////////////////////////////////////// + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* focal + * ,--------------------------------------------. ,----------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | Tab | V | L | H | G | K | | Q | F | O | U | J | -_/+ | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | LShift | S | R | N | T | B |-------. ,-------| Y | C | A | E | I | /? | + * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| + * | LCTRL | Z | X | M | D | P |-------| |-------| '" | W | ,< | .> | ;: | =+ | + * `--------------------------------------------| / \ |-----------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | + * `----------------------------------' '------------------------------------' + */ + +// [_FOCAL] = LAYOUT( +// KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, +// KC_TAB, KC_V, KC_L, KC_H, KC_G, KC_K, KC_Q, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), +// KC_LSFT, KC_S,LALT_T(KC_R), LCTL_T(KC_N),LSFT_T(KC_T),KC_B, KC_Y, RSFT_T(KC_C), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, +// KC_LCTL, KC_Z, KC_X, KC_M, KC_D, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, KC_W, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, +// KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT +// ), + + /* Graphite + * ,--------------------------------------------. ,---------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | + * |---------+------+------+------+------+------| |------+------+------+------+------+----------| + * | Tab | B | L | D | W | Z | | '" | F | O | U | J | -_/+ | + * |---------+------+------+------+------+------| |------+------+------+------+------+----------| + * | LShift | N | R | T | S | G |-------. ,-------| Y | H | A | E | I | /? | + * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+----------| + * | LCTRL | Q | X | M | C | V |-------| |-------| K | P | ,< | .> | ;: | =+ | + * `--------------------------------------------| / \ |---------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | + * `----------------------------------' '------------------------------------' + */ + + [_GRAPHITE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), + KC_LSFT, KC_N,LALT_T(KC_R), LCTL_T(KC_T),LSFT_T(KC_S),KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, + KC_LCTL, KC_Q, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_P, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT +), + +/* QWERTY + * ,--------------------------------------------. ,----------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | -_ TD + | + * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| + * | LShift | A | S | D | F | G |-------. ,-------| H | J | K | L | ;: | '" | + * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| + * | LCTRL | Z | X | C | V | B |-------| |-------| N | M | ,< | .> | /? |RShift/Enter| + * `-------------------------------------------| / \ \-----------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter |LOWER |BackSP| RGUI | RALT | + * `----------------------------------' '------------------------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD(TD_MINS_PLUS), + KC_LSFT, KC_A, LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_RGUI, KC_RALT +), +/* LOWER + * ,-------------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | [ | ] | | | | = | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| |------+------+------+------+------+------| + * | | # | $ | ( | ) | ` |-------. ,-------| _ | 4 | 5 | 6 | + | _ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | % | ^ | { | } | ~ |-------| |-------| & | 1 | 2 | 3 | / | \ | + * `-------------------------------------------| / \ \-----------------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP| 0 | . | + * `----------------------------------' '------------------------------------' + */ + +[_LOWER] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, + _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, KC_AMPR, KC_1, KC_2, KC_3, KC_SLASH,KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | PgUp | Home | Up | End | Ins | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F2 | F3 | F4 | F5 | F6 |-------. ,-------| PgDn | Left | Down |Right | Del | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP| RGUI | RALT | + * `---------------------------------' '------------------------------------' + */ + +[_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, _______, + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, + _______, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* ADJUST (Press LOWER and RAISE together) + * ,-----------------------------------------. ,-----------------------------------------. + * |QK_BOOT| | | | | | | | | | | | def. layer to QWERTY | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |RGB ON| HUE+ | SAT+ | VAL+ | | | | PREV | PLAY | NEXT | | | def. layer to FOCAL | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | MODE | HUE- | SAT- | VAL- | | |-------. ,-------| VOL+ | MUTE | VOL- | | | def. layer to GRAPHITE | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LCTRL| LGUI | LALT |RAISE|Space / \Enter|LOWER |BackSP| RGUI | RALT | + * `----------------------------------' '------------------------------------' + */ + +[_ADJUST] = LAYOUT( + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_GRAPHITE), DF(_QWERTY), + RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, + RM_NEXT, RM_HUED, RM_SATD, RM_VALD, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + +// void keyboard_post_init_user(void) { +// // // Customise these values to desired behaviour +// debug_enable=true; +// debug_keyboard=true; +// // debug_matrix=true; +// // //debug_mouse=true; +// } + + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, + [_GRAPHITE] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, + [_LOWER] = { ENCODER_CCW_CW(UG_HUEU, KC_TAB), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_RAISE] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, + [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk b/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk new file mode 100644 index 00000000000..02214a851bc --- /dev/null +++ b/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk @@ -0,0 +1,20 @@ +OLED_ENABLE = yes +ENCODER_ENABLE = yes # ENables the use of one or more encoders + +RGBLIGHT_ENABLE = no # Enable keyboard 'old' RGB lightning +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB Matrix lightning +RGB_MATRIX_DRIVER = ws2812 + +# LTO: Link Time Optimizations. +# Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. +# This does not affect QMK Macros and Layers +LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes +BOOTLOADER = caterina + +TAP_DANCE_ENABLE = yes + +CONSOLE_ENABLE = no + +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/kimiko/readme.md b/keyboards/keycapsss/kimiko/readme.md index 32c64010126..39215182090 100644 --- a/keyboards/keycapsss/kimiko/readme.md +++ b/keyboards/keycapsss/kimiko/readme.md @@ -1,36 +1,28 @@ -# Kimiko - -## Rev2 - -A split keyboard with 4x6 vertically staggered keys and a Kyria style thumb thumb cluster. - -![Kimiko Rev2](https://i.imgur.com/TBP8Bcrh.jpg) - -- Keyboard Maintainer: [BenRoe](https://github.com/BenRoe/) [@keycapsss](https://twitter.com/keycapsss) -- Hardware Supported: Pro Micro 5V/16Mhz and compatible -- Hardware Availability: [Keycapsss.com](https://keycapsss.com) +# Kimiko rev1 board by Keycapsss.com +### What's added by me -### Features (Rev2) - -- 62 Per key RGB led's (SK6812 Mini-E) - - RGB Matrix is enabled as default in rules.mk - - The effects can be configured in config.h -- Support for 1 rotary encoder per side (two possible positions) -- Support for 1 OLED display per side - - 128x32 (SSD1306) or Nice!View are supported - - With 1 OLED on each side, they have to be the same - - Default configuration for 128x32 OLED +1. OLED display enabled + - layout name displayed +2. RGB key lights + - RGB Matrix enabled for Graphite layout, keys heatmap works + - RGB lights enabled for default layout + +3. Multiple layouts + - Graphite layout has 2 switchable layouts, **Graphite** and **Qwerty** -Make firmware .hex for this keyboard (after setting up your build environment): -```bash -qmk compile -kb keycapsss/kimiko/rev2 -km default +Put content of this repo in *qmk_firmware/keyboards/keycapsss/kimiko/* directory +Build and flash with: ``` +make keycapsss/kimiko/rev1:graphite:flash +``` +# +# -Use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) to flash the firmware hex file to the keyboard controller. -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). +Original documentation: +# Kimiko ## Rev1 diff --git a/keyboards/keycapsss/kimiko/rev1/keyboard.json b/keyboards/keycapsss/kimiko/rev1/keyboard.json index ae09eb83c87..6a7d6b6f514 100644 --- a/keyboards/keycapsss/kimiko/rev1/keyboard.json +++ b/keyboards/keycapsss/kimiko/rev1/keyboard.json @@ -40,6 +40,12 @@ "led_count": 60, "split_count": [30, 30] }, + "rgb_matrix": { + "driver": "ws2812", + "led_count": 60, + "max_brightness": 60, + "split_count": [30, 30] + }, "ws2812": { "pin": "D3" }, diff --git a/keyboards/keycapsss/kimiko/rev1/rev1.c b/keyboards/keycapsss/kimiko/rev1/rev1.c new file mode 100644 index 00000000000..78da3767ef3 --- /dev/null +++ b/keyboards/keycapsss/kimiko/rev1/rev1.c @@ -0,0 +1,248 @@ +/* Copyright 2023 @BenRoe (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + + +# ifdef OLED_ENABLE + +enum layers { _GRAPHITE, _QWERTY, _LOWER, _RAISE, _ADJUST }; +//enum layers {, _QWERTY, _LOWER, _RAISE, _ADJUST }; + +extern const char* const PROGMEM LAYER_NAMES[]; + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +// NOTE: Most of the OLED code was originally written by Soundmonster for the Corne, +// and has been copied directly from `crkbd/soundmonster/keymap.c` + +void render_mod_status_gui_alt(uint8_t modifiers) { + static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0}; + static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0}; + static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0}; + static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0}; + + static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0}; + static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0}; + static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0}; + static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if (modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_1, false); + } else { + oled_write_P(gui_off_1, false); + } + + if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { + oled_write_P(on_on_1, false); + } else if (modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_1, false); + } else if (modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if (modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_1, false); + } else { + oled_write_P(alt_off_1, false); + } + + if (modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_2, false); + } else { + oled_write_P(gui_off_2, false); + } + + if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { + oled_write_P(on_on_2, false); + } else if (modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_2, false); + } else if (modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if (modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_2, false); + } else { + oled_write_P(alt_off_2, false); + } +} + +void render_mod_status_ctrl_shift(uint8_t modifiers) { + static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0}; + static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0}; + static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0}; + static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0}; + + static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0}; + static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0}; + static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0}; + static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if (modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_1, false); + } else { + oled_write_P(ctrl_off_1, false); + } + + if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { + oled_write_P(on_on_1, false); + } else if (modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_1, false); + } else if (modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if (modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_1, false); + } else { + oled_write_P(shift_off_1, false); + } + + if (modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_2, false); + } else { + oled_write_P(ctrl_off_2, false); + } + + if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { + oled_write_P(on_on_2, false); + } else if (modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_2, false); + } else if (modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if (modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_2, false); + } else { + oled_write_P(shift_off_2, false); + } +} + +void render_logo(void) { + //static const char PROGMEM kimiko_logo[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0}; + oled_advance_page(false); + oled_advance_page(false); + + uint8_t default_layer = get_highest_layer(default_layer_state); + switch (default_layer) { + // case 2: + // oled_write(LAYER_NAMES[2], false); + // break; + case 1: + oled_write(LAYER_NAMES[1], false); + break; + case 0: + oled_write(LAYER_NAMES[0], false); + break; + } + + //oled_write_P(kimiko_logo, false); + // oled_write_P(PSTR("Kimik"), false); + //uint8_t current_layer = get_highest_layer(layer_state); +// char ch[4]; + // sprintf(ch, "%u", layer_state); + // oled_write(ch, false); + // sprintf(ch, "%u", default_layer) ; + // oled_write(ch, false); + +// oled_write(LAYER_NAMES[default_layer], false); + + + + // char ch[4]; + // sprintf(ch, "%u", default_layer); + // oled_write(ch, false); + // //char ch[4]; + // sprintf(ch, "L%u", _QWERTY); + // oled_write(ch, false); + + + // uprintf("u %u\n", default_layer_state); + +} + +void render_layer_state(void) { + static const char PROGMEM default_layer[] = {0x20, 0x94, 0x95, 0x96, 0x20, 0x20, 0xb4, 0xb5, 0xb6, 0x20, 0x20, 0xd4, 0xd5, 0xd6, 0x20, 0}; + static const char PROGMEM raise_layer[] = {0x20, 0x97, 0x98, 0x99, 0x20, 0x20, 0xb7, 0xb8, 0xb9, 0x20, 0x20, 0xd7, 0xd8, 0xd9, 0x20, 0}; + static const char PROGMEM lower_layer[] = {0x20, 0x9a, 0x9b, 0x9c, 0x20, 0x20, 0xba, 0xbb, 0xbc, 0x20, 0x20, 0xda, 0xdb, 0xdc, 0x20, 0}; + static const char PROGMEM adjust_layer[] = {0x20, 0x9d, 0x9e, 0x9f, 0x20, 0x20, 0xbd, 0xbe, 0xbf, 0x20, 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; + + if (layer_state_is(_ADJUST)) { + oled_write_P(adjust_layer, false); + } else if (layer_state_is(_LOWER)) { + oled_write_P(lower_layer, false); + } else if (layer_state_is(_RAISE)) { + oled_write_P(raise_layer, false); + } else { + oled_write_P(default_layer, false); + } +} + +void render_status_main(void) { + render_logo(); + oled_advance_page(false); + render_layer_state(); + oled_advance_page(false); + render_mod_status_gui_alt(get_mods() | get_oneshot_mods()); + render_mod_status_ctrl_shift(get_mods() | get_oneshot_mods()); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + + if (is_keyboard_master()) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_logo(); + } + + return true; +} +# endif // OLED_ENABLE From 4f5f6d730600fead3274f0de8e97c692f543c4f0 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Tue, 20 May 2025 00:33:42 +0200 Subject: [PATCH 02/22] original keyball61 code by @Yowkees (no other keyboards as I'm not able to test them) --- keyboards/keyball/drivers/pmw3360/pmw3360.c | 176 ++++ keyboards/keyball/drivers/pmw3360/pmw3360.h | 171 ++++ .../pmw3360/pmw3360_pointing_device_driver.c | 51 ++ keyboards/keyball/drivers/pmw3360/srom_0x04.c | 263 ++++++ keyboards/keyball/drivers/pmw3360/srom_0x81.c | 263 ++++++ keyboards/keyball/keyball61/config.h | 78 ++ keyboards/keyball/keyball61/info.json | 88 ++ keyboards/keyball/keyball61/keyball61.c | 48 ++ keyboards/keyball/keyball61/keyball61.h | 109 +++ .../keyball61/keymaps/default/config.h | 39 + .../keyball61/keymaps/default/keymap.c | 74 ++ .../keyball61/keymaps/default/rules.mk | 3 + .../keyball61/keymaps/develop/config.h | 33 + .../keyball61/keymaps/develop/keymap.c | 59 ++ .../keyball61/keymaps/develop/rules.mk | 6 + .../keyball61/keymaps/graphite/config.h | 23 + .../keyball61/keymaps/graphite/keymap.c | 58 ++ .../keyball61/keymaps/graphite/rules.mk | 5 + .../keyball/keyball61/keymaps/test/config.h | 25 + .../keyball/keyball61/keymaps/test/keymap.c | 52 ++ .../keyball/keyball61/keymaps/test/rules.mk | 3 + keyboards/keyball/keyball61/readme.md | 21 + keyboards/keyball/keyball61/rules.mk | 53 ++ .../keyball/lib/duplexmatrix/duplexmatrix.c | 177 ++++ .../keyball/lib/duplexmatrix/duplexmatrix.h | 20 + keyboards/keyball/lib/glcdfont.c | 234 ++++++ keyboards/keyball/lib/keyball/README.md | 128 +++ keyboards/keyball/lib/keyball/keyball.c | 781 ++++++++++++++++++ keyboards/keyball/lib/keyball/keyball.h | 272 ++++++ keyboards/keyball/lib/keyball/keycodes.md | 52 ++ keyboards/keyball/lib/logofont/font.md | 212 +++++ keyboards/keyball/lib/logofont/logofont.c | 199 +++++ keyboards/keyball/lib/oledkit/oledkit.c | 61 ++ keyboards/keyball/lib/oledkit/oledkit.h | 34 + keyboards/keyball/readme.md | 84 ++ 35 files changed, 3955 insertions(+) create mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360.c create mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360.h create mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c create mode 100644 keyboards/keyball/drivers/pmw3360/srom_0x04.c create mode 100644 keyboards/keyball/drivers/pmw3360/srom_0x81.c create mode 100644 keyboards/keyball/keyball61/config.h create mode 100644 keyboards/keyball/keyball61/info.json create mode 100644 keyboards/keyball/keyball61/keyball61.c create mode 100644 keyboards/keyball/keyball61/keyball61.h create mode 100644 keyboards/keyball/keyball61/keymaps/default/config.h create mode 100644 keyboards/keyball/keyball61/keymaps/default/keymap.c create mode 100644 keyboards/keyball/keyball61/keymaps/default/rules.mk create mode 100644 keyboards/keyball/keyball61/keymaps/develop/config.h create mode 100644 keyboards/keyball/keyball61/keymaps/develop/keymap.c create mode 100644 keyboards/keyball/keyball61/keymaps/develop/rules.mk create mode 100644 keyboards/keyball/keyball61/keymaps/graphite/config.h create mode 100644 keyboards/keyball/keyball61/keymaps/graphite/keymap.c create mode 100644 keyboards/keyball/keyball61/keymaps/graphite/rules.mk create mode 100644 keyboards/keyball/keyball61/keymaps/test/config.h create mode 100644 keyboards/keyball/keyball61/keymaps/test/keymap.c create mode 100644 keyboards/keyball/keyball61/keymaps/test/rules.mk create mode 100644 keyboards/keyball/keyball61/readme.md create mode 100644 keyboards/keyball/keyball61/rules.mk create mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.c create mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.h create mode 100644 keyboards/keyball/lib/glcdfont.c create mode 100644 keyboards/keyball/lib/keyball/README.md create mode 100644 keyboards/keyball/lib/keyball/keyball.c create mode 100644 keyboards/keyball/lib/keyball/keyball.h create mode 100644 keyboards/keyball/lib/keyball/keycodes.md create mode 100644 keyboards/keyball/lib/logofont/font.md create mode 100644 keyboards/keyball/lib/logofont/logofont.c create mode 100644 keyboards/keyball/lib/oledkit/oledkit.c create mode 100644 keyboards/keyball/lib/oledkit/oledkit.h create mode 100644 keyboards/keyball/readme.md diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.c b/keyboards/keyball/drivers/pmw3360/pmw3360.c new file mode 100644 index 00000000000..02a9097614f --- /dev/null +++ b/keyboards/keyball/drivers/pmw3360/pmw3360.c @@ -0,0 +1,176 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "quantum.h" +#include "pmw3360.h" + +// Include SROM definitions. +#include "srom_0x04.c" +#include "srom_0x81.c" + +#define PMW3360_SPI_MODE 3 +#define PMW3360_SPI_DIVISOR (F_CPU / PMW3360_CLOCKS) +#define PMW3360_CLOCKS 2000000 + +static bool motion_bursting = false; + +bool pmw3360_spi_start(void) { + return spi_start(PMW3360_NCS_PIN, false, PMW3360_SPI_MODE, PMW3360_SPI_DIVISOR); +} + +uint8_t pmw3360_reg_read(uint8_t addr) { + pmw3360_spi_start(); + spi_write(addr & 0x7f); + wait_us(160); + uint8_t data = spi_read(); + wait_us(1); + spi_stop(); + wait_us(19); + // Reset motion_bursting mode if read from a register other than motion + // burst register. + if (addr != pmw3360_Motion_Burst) { + motion_bursting = false; + } + return data; +} + +void pmw3360_reg_write(uint8_t addr, uint8_t data) { + pmw3360_spi_start(); + spi_write(addr | 0x80); + spi_write(data); + wait_us(35); + spi_stop(); + wait_us(145); +} + +uint8_t pmw3360_cpi_get(void) { + return pmw3360_reg_read(pmw3360_Config1); +} + +void pmw3360_cpi_set(uint8_t cpi) { + if (cpi > pmw3360_MAXCPI) { + cpi = pmw3360_MAXCPI; + } + pmw3360_reg_write(pmw3360_Config1, cpi); +} + +static uint32_t pmw3360_timer = 0; +static uint32_t pmw3360_scan_count = 0; +static uint32_t pmw3360_last_count = 0; + +void pmw3360_scan_perf_task(void) { + pmw3360_scan_count++; + uint32_t now = timer_read32(); + if (TIMER_DIFF_32(now, pmw3360_timer) > 1000) { +#if defined(CONSOLE_ENABLE) + dprintf("pmw3360 scan frequency: %lu\n", pmw3360_scan_count); +#endif + pmw3360_last_count = pmw3360_scan_count; + pmw3360_scan_count = 0; + pmw3360_timer = now; + } +} + +uint32_t pmw3360_scan_rate_get(void) { + return pmw3360_last_count; +} + +bool pmw3360_motion_read(pmw3360_motion_t *d) { +#ifdef DEBUG_PMW3360_SCAN_RATE + pmw3360_scan_perf_task(); +#endif + uint8_t mot = pmw3360_reg_read(pmw3360_Motion); + if ((mot & 0x88) != 0x80) { + return false; + } + d->x = pmw3360_reg_read(pmw3360_Delta_X_L); + d->x |= pmw3360_reg_read(pmw3360_Delta_X_H) << 8; + d->y = pmw3360_reg_read(pmw3360_Delta_Y_L); + d->y |= pmw3360_reg_read(pmw3360_Delta_Y_H) << 8; + return true; +} + +bool pmw3360_motion_burst(pmw3360_motion_t *d) { +#ifdef DEBUG_PMW3360_SCAN_RATE + pmw3360_scan_perf_task(); +#endif + // Start motion burst if motion burst mode is not started. + if (!motion_bursting) { + pmw3360_reg_write(pmw3360_Motion_Burst, 0); + motion_bursting = true; + } + + pmw3360_spi_start(); + spi_write(pmw3360_Motion_Burst); + wait_us(35); + spi_read(); // skip MOT + spi_read(); // skip Observation + d->x = spi_read(); + d->x |= spi_read() << 8; + d->y = spi_read(); + d->y |= spi_read() << 8; + spi_stop(); + // Required NCS in 500ns after motion burst. + wait_us(1); + return true; +} + +bool pmw3360_init(void) { + spi_init(); + setPinOutput(PMW3360_NCS_PIN); + // reboot + pmw3360_spi_start(); + pmw3360_reg_write(pmw3360_Power_Up_Reset, 0x5a); + wait_ms(50); + // read five registers of motion and discard those values + pmw3360_reg_read(pmw3360_Motion); + pmw3360_reg_read(pmw3360_Delta_X_L); + pmw3360_reg_read(pmw3360_Delta_X_H); + pmw3360_reg_read(pmw3360_Delta_Y_L); + pmw3360_reg_read(pmw3360_Delta_Y_H); + // configuration + pmw3360_reg_write(pmw3360_Config2, 0x00); + // check product ID and revision ID + uint8_t pid = pmw3360_reg_read(pmw3360_Product_ID); + uint8_t rev = pmw3360_reg_read(pmw3360_Revision_ID); + spi_stop(); + return pid == 0x42 && rev == 0x01; +} + +uint8_t pmw3360_srom_id = 0; + +void pmw3360_srom_upload(pmw3360_srom_t srom) { + pmw3360_reg_write(pmw3360_Config2, 0x00); + pmw3360_reg_write(pmw3360_SROM_Enable, 0x1d); + wait_us(10); + pmw3360_reg_write(pmw3360_SROM_Enable, 0x18); + + // SROM upload (download for PMW3360) with burst mode + pmw3360_spi_start(); + spi_write(pmw3360_SROM_Load_Burst | 0x80); + wait_us(15); + for (size_t i = 0; i < srom.len; i++) { + spi_write(pgm_read_byte(srom.data + i)); + wait_us(15); + } + spi_stop(); + wait_us(200); + + pmw3360_srom_id = pmw3360_reg_read(pmw3360_SROM_ID); + pmw3360_reg_write(pmw3360_Config2, 0x00); + wait_ms(10); +} diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.h b/keyboards/keyball/drivers/pmw3360/pmw3360.h new file mode 100644 index 00000000000..ebac2f69945 --- /dev/null +++ b/keyboards/keyball/drivers/pmw3360/pmw3360.h @@ -0,0 +1,171 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include +#include "spi_master.h" + +////////////////////////////////////////////////////////////////////////////// +// Configurations + +#ifndef PMW3360_NCS_PIN +# define PMW3360_NCS_PIN B6 +#endif + +/// DEBUG_PMW3360_SCAN_RATE enables scan performance counter. +/// It records scan count in a last second and enables pmw3360_scan_rate_get(). +/// Additionally, it will be logged automatically when defined CONSOLE_ENABLE +/// and `debug_enable = true`. +//#define DEBUG_PMW3360_SCAN_RATE + +////////////////////////////////////////////////////////////////////////////// +// Types + +typedef struct { + const uint8_t *data; + size_t len; +} pmw3360_srom_t; + +typedef struct { + int16_t x; + int16_t y; +} pmw3360_motion_t; + +typedef enum { + pmw3360_Product_ID = 0x00, + pmw3360_Revision_ID = 0x01, + pmw3360_Motion = 0x02, + pmw3360_Delta_X_L = 0x03, + pmw3360_Delta_X_H = 0x04, + pmw3360_Delta_Y_L = 0x05, + pmw3360_Delta_Y_H = 0x06, + pmw3360_SQUAL = 0x07, + pmw3360_Raw_Data_Sum = 0x08, + pmw3360_Maximum_Raw_data = 0x09, + pmw3360_Minimum_Raw_data = 0x0A, + pmw3360_Shutter_Lower = 0x0B, + pmw3360_Shutter_Upper = 0x0C, + pmw3360_Control = 0x0D, + pmw3360_Config1 = 0x0F, + pmw3360_Config2 = 0x10, + pmw3360_Angle_Tune = 0x11, + pmw3360_Frame_Capture = 0x12, + pmw3360_SROM_Enable = 0x13, + pmw3360_Run_Downshift = 0x14, + pmw3360_Rest1_Rate_Lower = 0x15, + pmw3360_Rest1_Rate_Upper = 0x16, + pmw3360_Rest1_Downshift = 0x17, + pmw3360_Rest2_Rate_Lower = 0x18, + pmw3360_Rest2_Rate_Upper = 0x19, + pmw3360_Rest2_Downshift = 0x1A, + pmw3360_Rest3_Rate_Lower = 0x1B, + pmw3360_Rest3_Rate_Upper = 0x1C, + pmw3360_Observation = 0x24, + pmw3360_Data_Out_Lower = 0x25, + pmw3360_Data_Out_Upper = 0x26, + pmw3360_Raw_Data_Dump = 0x29, + pmw3360_SROM_ID = 0x2A, + pmw3360_Min_SQ_Run = 0x2B, + pmw3360_Raw_Data_Threshold = 0x2C, + pmw3360_Config5 = 0x2F, + pmw3360_Power_Up_Reset = 0x3A, + pmw3360_Shutdown = 0x3B, + pmw3360_Inverse_Product_ID = 0x3F, + pmw3360_LiftCutoff_Tune3 = 0x41, + pmw3360_Angle_Snap = 0x42, + pmw3360_LiftCutoff_Tune1 = 0x4A, + pmw3360_Motion_Burst = 0x50, + pmw3360_LiftCutoff_Tune_Timeout = 0x58, + pmw3360_LiftCutoff_Tune_Min_Length = 0x5A, + pmw3360_SROM_Load_Burst = 0x62, + pmw3360_Lift_Config = 0x63, + pmw3360_Raw_Data_Burst = 0x64, + pmw3360_LiftCutoff_Tune2 = 0x65, +} pmw3360_reg_t; + +enum { + pmw3360_MAXCPI = 0x77, // = 119: 12000 CPI +}; + +////////////////////////////////////////////////////////////////////////////// +// Exported values (touch carefully) + +/// SROM ID, last uploaded. 0 means not uploaded yet. +extern uint8_t pmw3360_srom_id; + +/// SROM 0x04 +extern const pmw3360_srom_t pmw3360_srom_0x04; +/// SROM 0x81 +extern const pmw3360_srom_t pmw3360_srom_0x81; + +////////////////////////////////////////////////////////////////////////////// +// Top level API + +/// pmw3360_init initializes PMW3360DM-T2QU module. +/// It will return true when succeeded, otherwise false. +bool pmw3360_init(void); + +void pmw3360_srom_upload(pmw3360_srom_t srom); + +/// pmw3360_motion_read gets a motion data by Motion register. +/// This requires to write a dummy data to pmw3360_Motion register +/// just before. +bool pmw3360_motion_read(pmw3360_motion_t *d); + +/// pmw3360_motion_burst gets a motion data by Motion_Burst command. +/// This requires to write a dummy data to pmw3360_Motion_Burst register +/// just before. +bool pmw3360_motion_burst(pmw3360_motion_t *d); + +/// pmw3360_scan_rate_get gets count of scan in a last second. +/// This works only when DEBUG_PMW3360_SCAN_RATE is defined. +uint32_t pmw3360_scan_rate_get(void); + +// TODO: document +uint8_t pmw3360_cpi_get(void); + +// TODO: document +void pmw3360_cpi_set(uint8_t cpi); + +////////////////////////////////////////////////////////////////////////////// +// Register operations + +/// pmw3360_reg_write writes a value to a register. +void pmw3360_reg_write(uint8_t addr, uint8_t data); + +/// pmw3360_reg_read reads a value from a register. +uint8_t pmw3360_reg_read(uint8_t addr); + +////////////////////////////////////////////////////////////////////////////// +// SPI operations + +bool pmw3360_spi_start(void); + +void inline pmw3360_spi_stop(void) { + spi_stop(); +} + +/// \deprecated use pmw3360_reg_write() instead of this. +spi_status_t inline pmw3360_spi_write(uint8_t data) { + return spi_write(data); +} + +/// \deprecated use pmw3360_reg_read() instead of this. +spi_status_t inline pmw3360_spi_read(void) { + return spi_read(); +} diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c b/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c new file mode 100644 index 00000000000..50c187bdd1e --- /dev/null +++ b/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "pointing_device.h" +#include "pmw3360.h" + +bool pmw3360_has = false; + +void pointing_device_driver_init(void) { + pmw3360_has = pmw3360_init(); + pmw3360_reg_write(pmw3360_Motion_Burst, 0); +} + +#define constrain_hid(amt) ((amt) < -127 ? -127 : ((amt) > 127 ? 127 : (amt))) + +report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { + pmw3360_motion_t d = {0}; + if (pmw3360_has && pmw3360_motion_burst(&d)) { + mouse_report.x = constrain_hid(d.y); + mouse_report.y = constrain_hid(d.x); + } + return mouse_report; +} + +uint16_t pointing_device_driver_get_cpi(void) { + if (!pmw3360_has) { + return 0; + } + return pmw3360_cpi_get(); +} + +void pointing_device_driver_set_cpi(uint16_t cpi) { + if (!pmw3360_has) { + return; + } + pmw3360_cpi_set(cpi); +} diff --git a/keyboards/keyball/drivers/pmw3360/srom_0x04.c b/keyboards/keyball/drivers/pmw3360/srom_0x04.c new file mode 100644 index 00000000000..dd471cab90c --- /dev/null +++ b/keyboards/keyball/drivers/pmw3360/srom_0x04.c @@ -0,0 +1,263 @@ +static const uint8_t srom_data_0x04[] PROGMEM = { + 0x01, 0x04, 0x8E, 0x96, 0x6E, 0x77, 0x3E, 0xFE, 0x7E, 0x5F, 0x1D, 0xB8, 0xF2, 0x66, 0x4E, 0xFF, + 0x5D, 0x19, 0xB0, 0xC2, 0x04, 0x69, 0x54, 0x2A, 0xD6, 0x2E, 0xBF, 0xDD, 0x19, 0xB0, 0xC3, 0xE5, + 0x29, 0xB1, 0x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x35, 0xC9, 0xF1, 0x60, 0x42, 0x06, 0x8E, 0x7F, 0x7C, 0x7A, 0x76, 0x6E, 0x3F, 0xFC, 0x7A, + 0x76, 0x6E, 0x5E, 0x3E, 0xFE, 0x7E, 0x5F, 0x3C, 0xDB, 0x15, 0x89, 0x71, 0x41, 0xE1, 0x21, 0xC0, + 0xE3, 0x44, 0xEB, 0x54, 0x2A, 0xB7, 0xCD, 0xF9, 0x70, 0x62, 0x27, 0xAD, 0xD8, 0x32, 0xC7, 0x0C, + 0x7B, 0x74, 0x4B, 0x14, 0xAA, 0xB7, 0xEC, 0x3B, 0xD5, 0x28, 0xD2, 0x07, 0x6D, 0x39, 0xD1, 0x20, + 0xC2, 0xE7, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0xB2, 0xC7, 0x0C, 0x59, 0x28, 0xF3, 0x9B +}; + +const pmw3360_srom_t pmw3360_srom_0x04 = { + .data = srom_data_0x04, + .len = sizeof(srom_data_0x04), +}; diff --git a/keyboards/keyball/drivers/pmw3360/srom_0x81.c b/keyboards/keyball/drivers/pmw3360/srom_0x81.c new file mode 100644 index 00000000000..1a3016fbe83 --- /dev/null +++ b/keyboards/keyball/drivers/pmw3360/srom_0x81.c @@ -0,0 +1,263 @@ +static const uint8_t srom_data_0x81[] PROGMEM = { + 0x01, 0x81, 0x01, 0x82, 0x46, 0x27, 0x9E, 0xBE, 0xFE, 0x5F, 0x3C, 0xFA, 0x76, 0x6E, 0x5E, 0x3E, + 0xFE, 0x5F, 0x1D, 0x99, 0x91, 0xA0, 0xC2, 0x06, 0x8E, 0x9E, 0x9F, 0xBC, 0xDB, 0x34, 0xEA, 0x56, + 0x0F, 0x9C, 0x9B, 0xB4, 0xCB, 0x14, 0x8B, 0x75, 0x68, 0x33, 0xC5, 0x08, 0x73, 0x45, 0xE9, 0x50, + 0x22, 0xA7, 0xCC, 0xFB, 0x55, 0x28, 0xB3, 0xC5, 0x08, 0x92, 0xA6, 0xAF, 0xDC, 0x3A, 0xF6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 0xE8, + 0x52, 0x26, 0xAF, 0xDC, 0x3A, 0xF6, 0x6E, 0x5E, 0x1F, 0xBC, 0xFA, 0x76, 0x6E, 0x3F, 0xDD, 0x38, + 0xF2, 0x47, 0x0C, 0x7B, 0x74, 0x4B, 0x14, 0x8B, 0x94, 0xAA, 0xD6, 0x0F, 0x9C, 0x9B, 0xB4, 0xEA, + 0x56, 0x2E, 0xDE, 0x1F, 0x9D, 0x99, 0xB0, 0xE2, 0x27, 0xCC, 0x1A, 0xB6, 0xEE, 0x3F, 0xFC, 0x7A, + 0x57, 0x0D, 0x98, 0x93, 0xA4, 0xAB, 0xB5, 0xC9, 0xF1, 0x60, 0x7B, 0x17, 0xC8, 0x4A +}; + +const pmw3360_srom_t pmw3360_srom_0x81 = { + .data = srom_data_0x81, + .len = sizeof(srom_data_0x81), +}; diff --git a/keyboards/keyball/keyball61/config.h b/keyboards/keyball/keyball61/config.h new file mode 100644 index 00000000000..260cc8d6e28 --- /dev/null +++ b/keyboards/keyball/keyball61/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters (Keyball61 is duplex matrix) +#define MATRIX_ROWS (5 * 2) // split keyboard +#define MATRIX_COLS (4 * 2) // duplex matrix +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define MATRIX_MASKED +#define DEBOUNCE 5 + +// Split parameters +#define SOFT_SERIAL_PIN D2 +#define SPLIT_HAND_MATRIX_GRID F7, D7 +#define SPLIT_USB_DETECT +#ifdef OLED_ENABLE +# define SPLIT_OLED_ENABLE +#endif + +// If your PC does not recognize Keyball, try setting this macro. This macro +// increases the firmware size by 200 bytes, so it is disabled by default, but +// it has been reported to work well in such cases. +//#define SPLIT_WATCHDOG_ENABLE + +#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 74 +# define RGBLED_SPLIT { 37, 37 } +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 120 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 12 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 37, 37 } +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/keyball/keyball61/info.json b/keyboards/keyball/keyball61/info.json new file mode 100644 index 00000000000..8af37c27756 --- /dev/null +++ b/keyboards/keyball/keyball61/info.json @@ -0,0 +1,88 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0100", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball61", + "rgblight": { + "driver": "ws2812", + "led_count": 57 + // "split_count": [27, 29] + }, + "layouts": { + "LAYOUT_no_ball": { + "layout": [ + { "label": "L00", "x": 0, "y": 0 }, + { "label": "L01", "x": 1, "y": 0 }, + { "label": "L02", "x": 2, "y": 0 }, + { "label": "L03", "x": 3, "y": 0 }, + { "label": "L04", "x": 4, "y": 0 }, + { "label": "L05", "x": 5, "y": 0 }, + { "label": "R05", "x": 8, "y": 0 }, + { "label": "R04", "x": 9, "y": 0 }, + { "label": "R03", "x":10, "y": 0 }, + { "label": "R02", "x":11, "y": 0 }, + { "label": "R01", "x":12, "y": 0 }, + { "label": "R00", "x":13, "y": 0 }, + + { "label": "L10", "x": 0, "y": 1 }, + { "label": "L11", "x": 1, "y": 1 }, + { "label": "L12", "x": 2, "y": 1 }, + { "label": "L13", "x": 3, "y": 1 }, + { "label": "L14", "x": 4, "y": 1 }, + { "label": "L15", "x": 5, "y": 1 }, + { "label": "R15", "x": 8, "y": 1 }, + { "label": "R14", "x": 9, "y": 1 }, + { "label": "R13", "x":10, "y": 1 }, + { "label": "R12", "x":11, "y": 1 }, + { "label": "R11", "x":12, "y": 1 }, + { "label": "R10", "x":13, "y": 1 }, + + { "label": "L20", "x": 0, "y": 2 }, + { "label": "L21", "x": 1, "y": 2 }, + { "label": "L22", "x": 2, "y": 2 }, + { "label": "L23", "x": 3, "y": 2 }, + { "label": "L24", "x": 4, "y": 2 }, + { "label": "L25", "x": 5, "y": 2 }, + { "label": "R25", "x": 8, "y": 2 }, + { "label": "R24", "x": 9, "y": 2 }, + { "label": "R23", "x":10, "y": 2 }, + { "label": "R22", "x":11, "y": 2 }, + { "label": "R21", "x":12, "y": 2 }, + { "label": "R20", "x":13, "y": 2 }, + + { "label": "L30", "x": 0, "y": 3 }, + { "label": "L31", "x": 1, "y": 3 }, + { "label": "L32", "x": 2, "y": 3 }, + { "label": "L33", "x": 3, "y": 3 }, + { "label": "L34", "x": 4, "y": 3 }, + { "label": "L35", "x": 5, "y": 3 }, + { "label": "L36", "x": 6, "y": 3 }, + { "label": "R36", "x": 7, "y": 3 }, + { "label": "R35", "x": 8, "y": 3 }, + { "label": "R34", "x": 9, "y": 3 }, + { "label": "R33", "x":10, "y": 3 }, + { "label": "R32", "x":11, "y": 3 }, + { "label": "R31", "x":12, "y": 3 }, + { "label": "R30", "x":13, "y": 3 }, + + { "label": "L40", "x": 0, "y": 4 }, + { "label": "L41", "x": 1, "y": 4 }, + { "label": "L42", "x": 2, "y": 4 }, + { "label": "L43", "x": 3, "y": 4 }, + { "label": "L44", "x": 4, "y": 4 }, + { "label": "L45", "x": 5, "y": 4 }, + { "label": "L46", "x": 6, "y": 4 }, + { "label": "R46", "x": 7, "y": 4 }, + { "label": "R45", "x": 8, "y": 4 }, + { "label": "R44", "x": 9, "y": 4 }, + { "label": "R43", "x":10, "y": 4 }, + { "label": "R42", "x":11, "y": 4 }, + { "label": "R41", "x":12, "y": 4 }, + { "label": "R40", "x":13, "y": 4 } + ] + } + } +} diff --git a/keyboards/keyball/keyball61/keyball61.c b/keyboards/keyball/keyball61/keyball61.c new file mode 100644 index 00000000000..1c90f5945f1 --- /dev/null +++ b/keyboards/keyball/keyball61/keyball61.c @@ -0,0 +1,48 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off +matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b01110111, + 0b01110111, + 0b01110111, + 0b11110111, + 0b11110111, + 0b01110111, + 0b01110111, + 0b01110111, + 0b11110111, + 0b11110111, +}; +// clang-format on + +void keyball_on_adjust_layout(keyball_adjust_t v) { +#ifdef RGBLIGHT_ENABLE + // adjust RGBLIGHT's clipping and effect ranges + uint8_t lednum_this = keyball.this_have_ball ? 34 : 37; + uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 34 : 37; + rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); + rgblight_set_effect_range(0, lednum_this + lednum_that); +#endif +} diff --git a/keyboards/keyball/keyball61/keyball61.h b/keyboards/keyball/keyball61/keyball61.h new file mode 100644 index 00000000000..857d83fda8c --- /dev/null +++ b/keyboards/keyball/keyball61/keyball61.h @@ -0,0 +1,109 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ + } + +#define LAYOUT_left_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ + } + +#define LAYOUT_dual_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L45, L46, R46, R45, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ + } + +#define LAYOUT_no_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball +#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/keyball/keyball61/keymaps/default/config.h b/keyboards/keyball/keyball61/keymaps/default/config.h new file mode 100644 index 00000000000..71e24111855 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 2 diff --git a/keyboards/keyball/keyball61/keymaps/default/keymap.c b/keyboards/keyball/keyball61/keymaps/default/keymap.c new file mode 100644 index 00000000000..2a42e4fb57f --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + 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_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , + MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR + ), + + [1] = LAYOUT_universal( + S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), + S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), + S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , + _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), + _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ + ), + + [2] = LAYOUT_universal( + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ + ), + + [3] = LAYOUT_universal( + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , + QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/keyball/keyball61/keymaps/default/rules.mk b/keyboards/keyball/keyball61/keymaps/default/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/keyball/keyball61/keymaps/develop/config.h b/keyboards/keyball/keyball61/keymaps/develop/config.h new file mode 100644 index 00000000000..7c18d0969f7 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/develop/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 diff --git a/keyboards/keyball/keyball61/keymaps/develop/keymap.c b/keyboards/keyball/keyball61/keymaps/develop/keymap.c new file mode 100644 index 00000000000..34e1400dcdb --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/develop/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_universal( + 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SCRL_TO , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_LGUI , KC_APP , KC_HOME , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI + ), + + [1] = LAYOUT_universal( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , + QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT + ), +}; +// clang-format on + +void keyboard_post_init_user(void) { +#ifdef CONSOLE_ENABLE + debug_enable = true; +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/keyball/keyball61/keymaps/develop/rules.mk b/keyboards/keyball/keyball61/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/keyball/keyball61/keymaps/graphite/config.h b/keyboards/keyball/keyball61/keymaps/graphite/config.h new file mode 100644 index 00000000000..83a99392c18 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/graphite/config.h @@ -0,0 +1,23 @@ + + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 2 + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET diff --git a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c new file mode 100644 index 00000000000..c85dc1cd62b --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c @@ -0,0 +1,58 @@ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , QK_BOOT , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS , + KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , + MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6, KC_7, KC_8,KC_9,KC_0,KC_A, KC_B , KC_3 , KC_4 + ), +// _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR + + [1] = LAYOUT_universal( + S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), + S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), + S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , + _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), + _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ + ), + + [2] = LAYOUT_universal( + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ + ), + + [3] = LAYOUT_universal( + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , + QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk new file mode 100644 index 00000000000..16d2ff18ed0 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +BOOTLOADER = rp2040 diff --git a/keyboards/keyball/keyball61/keymaps/test/config.h b/keyboards/keyball/keyball61/keymaps/test/config.h new file mode 100644 index 00000000000..60cd183d54c --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/test/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif diff --git a/keyboards/keyball/keyball61/keymaps/test/keymap.c b/keyboards/keyball/keyball61/keymaps/test/keymap.c new file mode 100644 index 00000000000..5f1f8c673a5 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/test/keymap.c @@ -0,0 +1,52 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + KC_LGUI , KC_APP , KC_HOME , KC_END , KC_LALT , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/keyball/keyball61/keymaps/test/rules.mk b/keyboards/keyball/keyball61/keymaps/test/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/keyball/keyball61/keymaps/test/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/keyball/keyball61/readme.md b/keyboards/keyball/keyball61/readme.md new file mode 100644 index 00000000000..95fe4d42a3c --- /dev/null +++ b/keyboards/keyball/keyball61/readme.md @@ -0,0 +1,21 @@ +# Keyball61 + +![Keyball61](../../../..//keyball61/doc/rev1/images/kb61_001.jpg) + +A split keyboard with 61 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: Keyball61 PCB, ProMicro +* Hardware Availability: + * + * + +Make example for this keyboard (after setting up your build environment): + + make keyball/keyball61:default + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/keyball/keyball61/rules.mk b/keyboards/keyball/keyball61/rules.mk new file mode 100644 index 00000000000..1c6f0165df4 --- /dev/null +++ b/keyboards/keyball/keyball61/rules.mk @@ -0,0 +1,53 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Duplex matrix. +CUSTOM_MATRIX = lite +SRC += lib/duplexmatrix/duplexmatrix.c + +# Keyball61 is split keyboard. +SPLIT_KEYBOARD = yes + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += drivers/pmw3360/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c new file mode 100644 index 00000000000..97fa4217532 --- /dev/null +++ b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c @@ -0,0 +1,177 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include +#include "quantum.h" +#include "matrix.h" +#include "debounce.h" + +#ifdef SPLIT_KEYBOARD +# include "split_common/split_util.h" +# include "split_common/transactions.h" +#endif + +#ifdef SPLIT_KEYBOARD +# define PINNUM_ROW (MATRIX_ROWS / 2) +# define ROWS_PER_HAND (MATRIX_ROWS / 2) +#else +# define PINNUM_ROW (MATRIX_ROWS) +# define ROWS_PER_HAND (MATRIX_ROWS) +#endif +#define PINNUM_COL (MATRIX_COLS / 2) + +#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) + +static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; +static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; + +static inline void set_pin_input(pin_t pin) { + setPinInputHigh(pin); +} + +static void set_pins_input(pin_t* pins, uint8_t n) { + for (uint8_t i = 0; i < n; i++) { + set_pin_input(pins[i]); + } +} + +static inline void set_pin_output(pin_t pin) { + setPinOutput(pin); + writePinLow(pin); +} + +static inline bool get_pin(pin_t pin) { + return readPin(pin); +} + +__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} + +static void duplex_scan_raw(matrix_row_t out_matrix[]) { + // scan column to row + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + set_pin_output(row_pins[row]); + matrix_output_select_delay(); + for (uint8_t col = 0; col < PINNUM_COL; col++) { + if (!get_pin(col_pins[col])) { + out_matrix[row] |= 1 << col; + } + } + set_pin_input(row_pins[row]); + matrix_output_unselect_delay(row, false); + } + + // scan row to column. + for (uint8_t col = 0; col < PINNUM_COL; col++) { + set_pin_output(col_pins[col]); + matrix_output_select_delay(); + matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (!get_pin(row_pins[row])) { + out_matrix[row] |= shifter; + } + } + set_pin_input(col_pins[col]); + matrix_output_unselect_delay(col, false); + } + + duplex_scan_raw_post_kb(out_matrix); +} + +static bool duplex_scan(matrix_row_t current_matrix[]) { + bool changed = false; + matrix_row_t tmp[MATRIX_ROWS] = {0}; + + duplex_scan_raw(tmp); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (tmp[row] != current_matrix[row]) { + changed = true; + current_matrix[row] = tmp[row]; + } + } + return changed; +} + +#ifdef SPLIT_KEYBOARD +static uint8_t thisHand, thatHand; +#else +# define thisHand 0 +#endif + +void matrix_init_custom(void) { +#ifdef SPLIT_KEYBOARD + split_pre_init(); +#endif + + set_pins_input(col_pins, PINNUM_COL); + set_pins_input(row_pins, PINNUM_ROW); + +#ifdef SPLIT_KEYBOARD + thisHand = isLeftHand ? 0 : ROWS_PER_HAND; + thatHand = ROWS_PER_HAND - thisHand; + + split_post_init(); +#endif +} + +#ifdef SPLIT_KEYBOARD + +// user-defined overridable functions +__attribute__((weak)) void matrix_slave_scan_kb(void) { + matrix_slave_scan_user(); +} + +__attribute__((weak)) void matrix_slave_scan_user(void) {} + +#endif + +// declare matrix buffers which defined in quantum/matrix_common.c +extern matrix_row_t raw_matrix[MATRIX_ROWS]; +extern matrix_row_t matrix[MATRIX_ROWS]; + +uint8_t matrix_scan(void) { + bool changed = duplex_scan(raw_matrix); + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + +#ifdef SPLIT_KEYBOARD + if (!is_keyboard_master()) { + // send to primary. + transport_slave(matrix + thatHand, matrix + thisHand); + matrix_slave_scan_kb(); + return changed; + } + + // receive from secondary. + static bool last_connected = false; + matrix_row_t* that_raw = raw_matrix + ROWS_PER_HAND; + memset(that_raw, 0, MATRIXSIZE_PER_HAND); + if (transport_master_if_connected(matrix + thisHand, that_raw)) { + last_connected = true; + if (memcmp(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND) != 0) { + memcpy(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND); + changed = true; + } + } else if (last_connected) { + last_connected = false; + memset(matrix + thatHand, 0, MATRIXSIZE_PER_HAND); + changed = true; + } +#endif + + matrix_scan_kb(); + return changed; +} diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h new file mode 100644 index 00000000000..44f57c629aa --- /dev/null +++ b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h @@ -0,0 +1,20 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]); diff --git a/keyboards/keyball/lib/glcdfont.c b/keyboards/keyball/lib/glcdfont.c new file mode 100644 index 00000000000..c634898aed1 --- /dev/null +++ b/keyboards/keyball/lib/glcdfont.c @@ -0,0 +1,234 @@ +// 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 +// clang-format off +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, 0x24, 0x24, 0x1C, 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, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, + 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, + 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, + 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, + 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, 0x80, + 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, + 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, + 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, + 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, + 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, + 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, + 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, + 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, + 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, + 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 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, 0x3C, 0x7F, + 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, + 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, + 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, + 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x03, 0x03, 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, +}; +// clang-format on diff --git a/keyboards/keyball/lib/keyball/README.md b/keyboards/keyball/lib/keyball/README.md new file mode 100644 index 00000000000..ba60d0e92c0 --- /dev/null +++ b/keyboards/keyball/lib/keyball/README.md @@ -0,0 +1,128 @@ +# Keyball Core Function Library + +## Scroll snap mode + +When scrolling with the trackball, the scroll direction is restricted. +This restriction is called "scroll snap". + +The direction of restriction can be changed using [special key codes](keycodes.md#english). +You can also release this restriction. +It is called as "scroll snap mode" +The current mode is displayed on the OLED. + +There are 3 modes for scroll snap. + +1. Vertical (default): key code is `SSNP_VRT`, indicated as `VT`. +2. Horizontal: key code is `SSNP_HOR`, indicated as `HO`. +3. Free: key code is `SSNP_FRE`, indicated as `SCR`. + +The scroll snap mode at startup is vertical, +but you can change it by saving the current mode with `KBC_SAVE` + +## MEMO + +This section contains notes regarding the specifications of this library. +Since the purpose is to keep a record in whatever form it takes, +a lot of Japanese is included. +If you would like to read it in English, please request a translation via issue or discussion. +Of course you can translate it for us. If you translate it, +please make pull requests to share it us. + +### Scroll Snap Spec + +この機能は config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 0` を書き加えることで無効化できる。 + +トラックボールによるスクロールの方向を制限するのがスクロールスナップ。 +現在のスクロールスナップには3つのモードがある。 + +* 垂直方向にスナップ (デフォルト) +* 水平方向にスナップ +* スナップしない自由スクロール + +以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の[独自キーコード](keycodes.md#japanese)を用いて手動で切り替える。 + +#### up to 1.3.2 + +初期状態でトラックボールによるスクロールを垂直方向に制限(スナップ)している。 +この振る舞いは config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 1` を書き加えることで有効化できる。 + +この機能はスナップモードとフリーモードから構成される。 +初期状態はスナップモードで、このモードではスクロール方向は垂直に制限される。 +スナップモードで水平の一定方向に一定カウント(デフォルトは12)以上スクロールするとフリーモードに遷移する。 +なおこのカウントはスクロール除数適用後のカウントである。 +フリーモードでは制限が取り払われ、水平と垂直どちらにも自由にスクロールできる。 +フリーモードで一定時間(デフォルトは 100 ミリ秒)、スクロール操作を行わないとスナップモードに遷移する。 + +フリーモードに遷移するためのカウント数を変更するには `KEYBALL_SCROLLSNAP_TENSION_THRESHOLD` を、 +スナップモードに遷移するためのインターバル(ミリ秒)を変更するには `KEYBALL_SCROLLSNAP_RESET_TIMER` を、それぞれ config.h で設定できる。 + +以下はカウント数を 5 に、インターバルを 200 ミリ秒に変更する例: + +```c +#define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 5 +#define KEYBALL_SCROLLSNAP_RESET_TIMER 200 +``` + +#### History of Scroll Snap + +もともとは自由にスクロールできるようにしていた。 +しかし思ったよりもボールの感度が高く一定方向だけに動かすのが難しく、 +誤操作を誘発していた。 +そのためなんらかのスナップ機能が必要だと判断した。 + +最初のスナップ機能は垂直・水平のどちらかの軸から一定角度以内で収まってるうちはそちらへスナップするとした。 +しかし回転開始初期にはその移動量が極小かつセンサーの感度が高いので、 +垂直に動かしたい時に水平にも極小量の移動が発生しておりスナップ方向が定まらない、 +という問題が発生した。 +人間は自分が思うほどには指を正確に動かせていなかった。 + +そこで一定方向に一定以上のカウントを検出するまでは一切スクロールしないようにした。 +これは回転開始初期のスクロール量を読み捨てるに等しい。 + +しかしWebブラウザを思い浮かべてもらえればすぐにわかるように、 +一般のユースケースでは垂直方向のスクロールを頻繁に利用する。 +先の読み捨てにより、垂直方向のスクロールがワンテンポ遅れ、体験を大幅に損なうことが明らかになった。 +この解決のためモード: 初期は垂直のみ、後に自由スクロールする、を導入した。 + +### Scroll Divider / スクロール除数 + +Keyballのセンサーは感度がとても高い。 +そのため生の値をスクロール量としてしまうとスクロール操作がとても難しくなった。 +そこで生の値をある数で割ってスクロールに適用する方式を採用した。 +この時の割る数をスクロール除数と言っている。 + +スクロール除数は、体感として小さく制御する意味がなかったので、 +1, 2, 4, 8, 16, 32, 64 というように2の乗数とした。 +2の乗数であるのならば値の表現として $2 ^ n$ の $n$ で表せる。 +またEEPROMに設定値を保存できるようにするために、 +ビット数を節約する目的で $n$ が取りうる値は 1~7 の範囲とした。 +結果実際の割る数は以下の式で計算できる。 + +$$ 2 ^ {(n - 1)} $$ + +$n$ の初期値は 4 で 1/8 になることを意味する。 +この値は config.h で `KEYBALL_SCROLL_DIV_DEFAULT` マクロを定義することで変更できる。 +これを0にすることは考慮していないので設定しないこと。 + +### Scroll Inhivitor + +トラックボールの移動量をポインタに適用するかスクロールに適用するか、 +Keyballは内部にスクロールモードという名のモードで管理している。 +スクロールモードはキーコードやAPI呼び出しの任意のタイミングで切り替えられる。 +デフォルトのキーマップでは特定のレイヤーの状態を +スクロールモードのオンオフに適用している。 + +当初はスクロールモードの切り替え直後に、 +トラックボールの移動が意図しない適用先に適用されることが頻発した。 +ポインタをブラウザまで動かした後にスクロールモードに変更すると、 +意図していない方向にスクロールするといった体験になる。 + +そこでスクロールモード切替直後の一定時間は +一切のトラックボール操作を読み捨てることにした。 +この読み捨てる時間のことを Scroll Inhivitor と名付けた。 +この Scroll Inhivitor のデフォルト値は 50 ミリ秒である。 +短い時間ではあるが結構効いている。 + +Scroll Inhivitor は config.h で `KEYBALL_SCROLLBALL_INHIVITOR` マクロを定義することで変更できる。 +無効化したい場合は値として `0` を設定する。 +興味があれば無効にしてみるのも面白いかもしれない。 diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c new file mode 100644 index 00000000000..0e54a50cc72 --- /dev/null +++ b/keyboards/keyball/lib/keyball/keyball.c @@ -0,0 +1,781 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "quantum.h" +#ifdef SPLIT_KEYBOARD +# include "transactions.h" +#endif + +#include "keyball.h" +#include "drivers/pmw3360/pmw3360.h" + +#include + +const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; +const uint8_t CPI_MAX = pmw3360_MAXCPI + 1; +const uint8_t SCROLL_DIV_MAX = 7; + +const uint16_t AML_TIMEOUT_MIN = 100; +const uint16_t AML_TIMEOUT_MAX = 1000; +const uint16_t AML_TIMEOUT_QU = 50; // Quantization Unit + +#define BL 0xB0 // Blank indicator character +static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; +static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; + +keyball_t keyball = { + .this_have_ball = false, + .that_enable = false, + .that_have_ball = false, + + .this_motion = {0}, + .that_motion = {0}, + + .cpi_value = 0, + .cpi_changed = false, + + .scroll_mode = false, + .scroll_div = 0, + + .pressing_keys = { BL, BL, BL, BL, BL, BL, 0 }, +}; + +////////////////////////////////////////////////////////////////////////////// +// Hook points + +__attribute__((weak)) void keyball_on_adjust_layout(keyball_adjust_t v) {} + +////////////////////////////////////////////////////////////////////////////// +// Static utilities + +// add16 adds two int16_t with clipping. +static int16_t add16(int16_t a, int16_t b) { + int16_t r = a + b; + if (a >= 0 && b >= 0 && r < 0) { + r = 32767; + } else if (a < 0 && b < 0 && r >= 0) { + r = -32768; + } + return r; +} + +// divmod16 divides *v by div, returns the quotient, and assigns the remainder +// to *v. +static int16_t divmod16(int16_t *v, int16_t div) { + int16_t r = *v / div; + *v -= r * div; + return r; +} + +// clip2int8 clips an integer fit into int8_t. +static inline int8_t clip2int8(int16_t v) { + return (v) < -127 ? -127 : (v) > 127 ? 127 : (int8_t)v; +} + +#ifdef OLED_ENABLE +static const char *format_4d(int8_t d) { + static char buf[5] = {0}; // max width (4) + NUL (1) + char lead = ' '; + if (d < 0) { + d = -d; + lead = '-'; + } + buf[3] = (d % 10) + '0'; + d /= 10; + if (d == 0) { + buf[2] = lead; + lead = ' '; + } else { + buf[2] = (d % 10) + '0'; + d /= 10; + } + if (d == 0) { + buf[1] = lead; + lead = ' '; + } else { + buf[1] = (d % 10) + '0'; + d /= 10; + } + buf[0] = lead; + return buf; +} + +static char to_1x(uint8_t x) { + x &= 0x0f; + return x < 10 ? x + '0' : x + 'a' - 10; +} +#endif + +static void add_cpi(int8_t delta) { + int16_t v = keyball_get_cpi() + delta; + keyball_set_cpi(v < 1 ? 1 : v); +} + +static void add_scroll_div(int8_t delta) { + int8_t v = keyball_get_scroll_div() + delta; + keyball_set_scroll_div(v < 1 ? 1 : v); +} + +////////////////////////////////////////////////////////////////////////////// +// Pointing device driver + +#if KEYBALL_MODEL == 46 +void keyboard_pre_init_kb(void) { + keyball.this_have_ball = pmw3360_init(); + keyboard_pre_init_user(); +} +#endif + +void pointing_device_driver_init(void) { +#if KEYBALL_MODEL != 46 + keyball.this_have_ball = pmw3360_init(); +#endif + if (keyball.this_have_ball) { +#if defined(KEYBALL_PMW3360_UPLOAD_SROM_ID) +# if KEYBALL_PMW3360_UPLOAD_SROM_ID == 0x04 + pmw3360_srom_upload(pmw3360_srom_0x04); +# elif KEYBALL_PMW3360_UPLOAD_SROM_ID == 0x81 + pmw3360_srom_upload(pmw3360_srom_0x81); +# else +# error Invalid value for KEYBALL_PMW3360_UPLOAD_SROM_ID. Please choose 0x04 or 0x81 or disable it. +# endif +#endif + pmw3360_cpi_set(CPI_DEFAULT - 1); + } +} + +uint16_t pointing_device_driver_get_cpi(void) { + return keyball_get_cpi(); +} + +void pointing_device_driver_set_cpi(uint16_t cpi) { + keyball_set_cpi(cpi); +} + +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { +#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 + r->x = clip2int8(m->y); + r->y = clip2int8(m->x); + if (is_left) { + r->x = -r->x; + r->y = -r->y; + } +#elif KEYBALL_MODEL == 46 + r->x = clip2int8(m->x); + r->y = -clip2int8(m->y); +#else +# error("unknown Keyball model") +#endif + // clear motion + m->x = 0; + m->y = 0; +} + +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left) { + // consume motion of trackball. + int16_t div = 1 << (keyball_get_scroll_div() - 1); + int16_t x = divmod16(&m->x, div); + int16_t y = divmod16(&m->y, div); + + // apply to mouse report. +#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 + r->h = clip2int8(y); + r->v = -clip2int8(x); + if (is_left) { + r->h = -r->h; + r->v = -r->v; + } +#elif KEYBALL_MODEL == 46 + r->h = clip2int8(x); + r->v = clip2int8(y); +#else +# error("unknown Keyball model") +#endif + + // Scroll snapping +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + // Old behavior up to 1.3.2) + uint32_t now = timer_read32(); + if (r->h != 0 || r->v != 0) { + keyball.scroll_snap_last = now; + } else if (TIMER_DIFF_32(now, keyball.scroll_snap_last) >= KEYBALL_SCROLLSNAP_RESET_TIMER) { + keyball.scroll_snap_tension_h = 0; + } + if (abs(keyball.scroll_snap_tension_h) < KEYBALL_SCROLLSNAP_TENSION_THRESHOLD) { + keyball.scroll_snap_tension_h += y; + r->h = 0; + } +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + // New behavior + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + r->h = 0; + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + r->v = 0; + break; + default: + // pass by without doing anything + break; + } +#endif +} + +static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { + if (as_scroll) { + keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); + } else { + keyball_on_apply_motion_to_mouse_move(m, r, is_left); + } +} + +static inline bool should_report(void) { + uint32_t now = timer_read32(); +#if defined(KEYBALL_REPORTMOUSE_INTERVAL) && KEYBALL_REPORTMOUSE_INTERVAL > 0 + // throttling mouse report rate. + static uint32_t last = 0; + if (TIMER_DIFF_32(now, last) < KEYBALL_REPORTMOUSE_INTERVAL) { + return false; + } + last = now; +#endif +#if defined(KEYBALL_SCROLLBALL_INHIVITOR) && KEYBALL_SCROLLBALL_INHIVITOR > 0 + if (TIMER_DIFF_32(now, keyball.scroll_mode_changed) < KEYBALL_SCROLLBALL_INHIVITOR) { + keyball.this_motion.x = 0; + keyball.this_motion.y = 0; + keyball.that_motion.x = 0; + keyball.that_motion.y = 0; + } +#endif + return true; +} + +report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { + // fetch from optical sensor. + if (keyball.this_have_ball) { + pmw3360_motion_t d = {0}; + if (pmw3360_motion_burst(&d)) { + ATOMIC_BLOCK_FORCEON { + keyball.this_motion.x = add16(keyball.this_motion.x, d.x); + keyball.this_motion.y = add16(keyball.this_motion.y, d.y); + } + } + } + // report mouse event, if keyboard is primary. + if (is_keyboard_master() && should_report()) { + // modify mouse report by PMW3360 motion. + motion_to_mouse(&keyball.this_motion, &rep, is_keyboard_left(), keyball.scroll_mode); + motion_to_mouse(&keyball.that_motion, &rep, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); + // store mouse report for OLED. + keyball.last_mouse = rep; + } + return rep; +} + +////////////////////////////////////////////////////////////////////////////// +// Split RPC + +#ifdef SPLIT_KEYBOARD + +static void rpc_get_info_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + keyball_info_t info = { + .ballcnt = keyball.this_have_ball ? 1 : 0, + }; + *(keyball_info_t *)out_data = info; + keyball_on_adjust_layout(KEYBALL_ADJUST_SECONDARY); +} + +static void rpc_get_info_invoke(void) { + static bool negotiated = false; + static uint32_t last_sync = 0; + static int round = 0; + uint32_t now = timer_read32(); + if (negotiated || TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETINFO_INTERVAL) { + return; + } + last_sync = now; + round++; + keyball_info_t recv = {0}; + if (!transaction_rpc_exec(KEYBALL_GET_INFO, 0, NULL, sizeof(recv), &recv)) { + if (round < KEYBALL_TX_GETINFO_MAXTRY) { + dprintf("keyball:rpc_get_info_invoke: missed #%d\n", round); + return; + } + } + negotiated = true; + keyball.that_enable = true; + keyball.that_have_ball = recv.ballcnt > 0; + dprintf("keyball:rpc_get_info_invoke: negotiated #%d %d\n", round, keyball.that_have_ball); + + // split keyboard negotiation completed. + +# ifdef VIA_ENABLE + // adjust VIA layout options according to current combination. + uint8_t layouts = (keyball.this_have_ball ? (is_keyboard_left() ? 0x02 : 0x01) : 0x00) | (keyball.that_have_ball ? (is_keyboard_left() ? 0x01 : 0x02) : 0x00); + uint32_t curr = via_get_layout_options(); + uint32_t next = (curr & ~0x3) | layouts; + if (next != curr) { + via_set_layout_options(next); + } +# endif + + keyball_on_adjust_layout(KEYBALL_ADJUST_PRIMARY); +} + +static void rpc_get_motion_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + *(keyball_motion_t *)out_data = keyball.this_motion; + // clear motion + keyball.this_motion.x = 0; + keyball.this_motion.y = 0; +} + +static void rpc_get_motion_invoke(void) { + static uint32_t last_sync = 0; + uint32_t now = timer_read32(); + if (TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETMOTION_INTERVAL) { + return; + } + keyball_motion_t recv = {0}; + if (transaction_rpc_exec(KEYBALL_GET_MOTION, 0, NULL, sizeof(recv), &recv)) { + keyball.that_motion.x = add16(keyball.that_motion.x, recv.x); + keyball.that_motion.y = add16(keyball.that_motion.y, recv.y); + } + last_sync = now; + return; +} + +static void rpc_set_cpi_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + keyball_set_cpi(*(keyball_cpi_t *)in_data); +} + +static void rpc_set_cpi_invoke(void) { + if (!keyball.cpi_changed) { + return; + } + keyball_cpi_t req = keyball.cpi_value; + if (!transaction_rpc_send(KEYBALL_SET_CPI, sizeof(req), &req)) { + return; + } + keyball.cpi_changed = false; +} + +#endif + +////////////////////////////////////////////////////////////////////////////// +// OLED utility + +#ifdef OLED_ENABLE +// clang-format off +const char PROGMEM code_to_name[] = { + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', + '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', + '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', + ',', '.', '/', +}; +// clang-format on +#endif + +void keyball_oled_render_ballinfo(void) { +#ifdef OLED_ENABLE + // Format: `Ball:{mouse x}{mouse y}{mouse h}{mouse v}` + // + // Output example: + // + // Ball: -12 34 0 0 + + // 1st line, "Ball" label, mouse x, y, h, and v. + oled_write_P(PSTR("Ball\xB1"), false); + oled_write(format_4d(keyball.last_mouse.x), false); + oled_write(format_4d(keyball.last_mouse.y), false); + oled_write(format_4d(keyball.last_mouse.h), false); + oled_write(format_4d(keyball.last_mouse.v), false); + + // 2nd line, empty label and CPI + oled_write_P(PSTR(" \xB1\xBC\xBD"), false); + oled_write(format_4d(keyball_get_cpi()) + 1, false); + oled_write_P(PSTR("00 "), false); + + // indicate scroll snap mode: "VT" (vertical), "HO" (horizontal), and "SCR" (free) +#if 1 && KEYBALL_SCROLLSNAP_ENABLE == 2 + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + oled_write_P(PSTR("VT"), false); + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + oled_write_P(PSTR("HO"), false); + break; + default: + oled_write_P(PSTR("\xBE\xBF"), false); + break; + } +#else + oled_write_P(PSTR("\xBE\xBF"), false); +#endif + // indicate scroll mode: on/off + if (keyball.scroll_mode) { + oled_write_P(LFSTR_ON, false); + } else { + oled_write_P(LFSTR_OFF, false); + } + + // indicate scroll divider: + oled_write_P(PSTR(" \xC0\xC1"), false); + oled_write_char('0' + keyball_get_scroll_div(), false); +#endif +} + +void keyball_oled_render_ballsubinfo(void) { +#ifdef OLED_ENABLE +#endif +} + +void keyball_oled_render_keyinfo(void) { +#ifdef OLED_ENABLE + // Format: `Key : R{row} C{col} K{kc} {name}{name}{name}` + // + // Where `kc` is lower 8 bit of keycode. + // Where `name`s are readable labels for pressing keys, valid between 4 and 56. + // + // `row`, `col`, and `kc` indicates the last processed key, + // but `name`s indicate unreleased keys in best effort. + // + // It is aligned to fit with output of keyball_oled_render_ballinfo(). + // For example: + // + // Key : R2 C3 K06 abc + // Ball: 0 0 0 0 + + // "Key" Label + oled_write_P(PSTR("Key \xB1"), false); + + // Row and column + oled_write_char('\xB8', false); + oled_write_char(to_1x(keyball.last_pos.row), false); + oled_write_char('\xB9', false); + oled_write_char(to_1x(keyball.last_pos.col), false); + + // Keycode + oled_write_P(PSTR("\xBA\xBB"), false); + oled_write_char(to_1x(keyball.last_kc >> 4), false); + oled_write_char(to_1x(keyball.last_kc), false); + + // Pressing keys + oled_write_P(PSTR(" "), false); + oled_write(keyball.pressing_keys, false); +#endif +} + +void keyball_oled_render_layerinfo(void) { +#ifdef OLED_ENABLE + // Format: `Layer:{layer state}` + // + // Output example: + // + // Layer:-23------------ + // + oled_write_P(PSTR("L\xB6\xB7r\xB1"), false); + for (uint8_t i = 1; i < 8; i++) { + oled_write_char((layer_state_is(i) ? to_1x(i) : BL), false); + } + oled_write_char(' ', false); + +# ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + oled_write_P(PSTR("\xC2\xC3"), false); + if (get_auto_mouse_enable()) { + oled_write_P(LFSTR_ON, false); + } else { + oled_write_P(LFSTR_OFF, false); + } + + oled_write(format_4d(get_auto_mouse_timeout() / 10) + 1, false); + oled_write_char('0', false); +# else + oled_write_P(PSTR("\xC2\xC3\xB4\xB5 ---"), false); +# endif +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// Public API functions + +bool keyball_get_scroll_mode(void) { + return keyball.scroll_mode; +} + +void keyball_set_scroll_mode(bool mode) { + if (mode != keyball.scroll_mode) { + keyball.scroll_mode_changed = timer_read32(); + } + keyball.scroll_mode = mode; +} + +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + return keyball.scrollsnap_mode; +#else + return 0; +#endif +} + +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball.scrollsnap_mode = mode; +#endif +} + +uint8_t keyball_get_scroll_div(void) { + return keyball.scroll_div == 0 ? KEYBALL_SCROLL_DIV_DEFAULT : keyball.scroll_div; +} + +void keyball_set_scroll_div(uint8_t div) { + keyball.scroll_div = div > SCROLL_DIV_MAX ? SCROLL_DIV_MAX : div; +} + +uint8_t keyball_get_cpi(void) { + return keyball.cpi_value == 0 ? CPI_DEFAULT : keyball.cpi_value; +} + +void keyball_set_cpi(uint8_t cpi) { + if (cpi > CPI_MAX) { + cpi = CPI_MAX; + } + keyball.cpi_value = cpi; + keyball.cpi_changed = true; + if (keyball.this_have_ball) { + pmw3360_cpi_set(cpi == 0 ? CPI_DEFAULT - 1 : cpi - 1); + } +} + +////////////////////////////////////////////////////////////////////////////// +// Keyboard hooks + +void keyboard_post_init_kb(void) { +#ifdef SPLIT_KEYBOARD + // register transaction handlers on secondary. + if (!is_keyboard_master()) { + transaction_register_rpc(KEYBALL_GET_INFO, rpc_get_info_handler); + transaction_register_rpc(KEYBALL_GET_MOTION, rpc_get_motion_handler); + transaction_register_rpc(KEYBALL_SET_CPI, rpc_set_cpi_handler); + } +#endif + + // read keyball configuration from EEPROM + if (eeconfig_is_enabled()) { + keyball_config_t c = {.raw = eeconfig_read_kb()}; + keyball_set_cpi(c.cpi); + keyball_set_scroll_div(c.sdiv); +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(c.amle); + set_auto_mouse_timeout(c.amlto == 0 ? AUTO_MOUSE_TIME : (c.amlto + 1) * AML_TIMEOUT_QU); +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball_set_scrollsnap_mode(c.ssnap); +#endif + } + + keyball_on_adjust_layout(KEYBALL_ADJUST_PENDING); + keyboard_post_init_user(); +} + +#if SPLIT_KEYBOARD +void housekeeping_task_kb(void) { + if (is_keyboard_master()) { + rpc_get_info_invoke(); + if (keyball.that_have_ball) { + rpc_get_motion_invoke(); + rpc_set_cpi_invoke(); + } + } +} +#endif + +static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { + // Process only valid keycodes. + if (keycode >= 4 && keycode < 57) { + char value = pgm_read_byte(code_to_name + keycode - 4); + char where = BL; + if (!record->event.pressed) { + // Swap `value` and `where` when releasing. + where = value; + value = BL; + } + // Rewrite the last `where` of pressing_keys to `value` . + for (int i = 0; i < KEYBALL_OLED_MAX_PRESSING_KEYCODES; i++) { + if (keyball.pressing_keys[i] == where) { + keyball.pressing_keys[i] = value; + break; + } + } + } +} + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE +bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case SCRL_MO: + return true; + } + return is_mouse_record_user(keycode, record); +} +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // store last keycode, row, and col for OLED + keyball.last_kc = keycode; + keyball.last_pos = record->event.key; + + pressing_keys_update(keycode, record); + + if (!process_record_user(keycode, record)) { + return false; + } + + // strip QK_MODS part. + if (keycode >= QK_MODS && keycode <= QK_MODS_MAX) { + keycode &= 0xff; + } + + switch (keycode) { +#ifndef MOUSEKEY_ENABLE + // process KC_MS_BTN1~8 by myself + // See process_action() in quantum/action.c for details. + case KC_MS_BTN1 ... KC_MS_BTN8: { + extern void register_mouse(uint8_t mouse_keycode, bool pressed); + register_mouse(keycode, record->event.pressed); + // to apply QK_MODS actions, allow to process others. + return true; + } +#endif + + case SCRL_MO: + keyball_set_scroll_mode(record->event.pressed); + // process_auto_mouse may use this in future, if changed order of + // processes. + return true; + } + + // process events which works on pressed only. + if (record->event.pressed) { + switch (keycode) { + case KBC_RST: + keyball_set_cpi(0); + keyball_set_scroll_div(0); +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(false); + set_auto_mouse_timeout(AUTO_MOUSE_TIME); +#endif + break; + case KBC_SAVE: { + keyball_config_t c = { + .cpi = keyball.cpi_value, + .sdiv = keyball.scroll_div, +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + .amle = get_auto_mouse_enable(), + .amlto = (get_auto_mouse_timeout() / AML_TIMEOUT_QU) - 1, +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + .ssnap = keyball_get_scrollsnap_mode(), +#endif + }; + eeconfig_update_kb(c.raw); + } break; + + case CPI_I100: + add_cpi(1); + break; + case CPI_D100: + add_cpi(-1); + break; + case CPI_I1K: + add_cpi(10); + break; + case CPI_D1K: + add_cpi(-10); + break; + + case SCRL_TO: + keyball_set_scroll_mode(!keyball.scroll_mode); + break; + case SCRL_DVI: + add_scroll_div(1); + break; + case SCRL_DVD: + add_scroll_div(-1); + break; + +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + case SSNP_HOR: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_HORIZONTAL); + break; + case SSNP_VRT: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_VERTICAL); + break; + case SSNP_FRE: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_FREE); + break; +#endif + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + case AML_TO: + set_auto_mouse_enable(!get_auto_mouse_enable()); + break; + case AML_I50: + { + uint16_t v = get_auto_mouse_timeout() + 50; + set_auto_mouse_timeout(MIN(v, AML_TIMEOUT_MAX)); + } + break; + case AML_D50: + { + uint16_t v = get_auto_mouse_timeout() - 50; + set_auto_mouse_timeout(MAX(v, AML_TIMEOUT_MIN)); + } + break; +#endif + + default: + return true; + } + return false; + } + + return true; +} + +// Disable functions keycode_config() and mod_config() in keycode_config.c to +// reduce size. These functions are provided for customizing magic keycode. +// These two functions are mostly unnecessary if `MAGIC_KEYCODE_ENABLE = no` is +// set. +// +// If `MAGIC_KEYCODE_ENABLE = no` and you want to keep these two functions as +// they are, define the macro KEYBALL_KEEP_MAGIC_FUNCTIONS. +// +// See: https://docs.qmk.fm/#/squeezing_avr?id=magic-functions +// +#if !defined(MAGIC_KEYCODE_ENABLE) && !defined(KEYBALL_KEEP_MAGIC_FUNCTIONS) + +uint16_t keycode_config(uint16_t keycode) { + return keycode; +} + +uint8_t mod_config(uint8_t mod) { + return mod; +} + +#endif diff --git a/keyboards/keyball/lib/keyball/keyball.h b/keyboards/keyball/lib/keyball/keyball.h new file mode 100644 index 00000000000..9f201d4fff5 --- /dev/null +++ b/keyboards/keyball/lib/keyball/keyball.h @@ -0,0 +1,272 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +////////////////////////////////////////////////////////////////////////////// +// Configurations + +#ifndef KEYBALL_CPI_DEFAULT +# define KEYBALL_CPI_DEFAULT 500 +#endif + +#ifndef KEYBALL_SCROLL_DIV_DEFAULT +# define KEYBALL_SCROLL_DIV_DEFAULT 4 // 4: 1/8 (1/2^(n-1)) +#endif + +#ifndef KEYBALL_REPORTMOUSE_INTERVAL +# define KEYBALL_REPORTMOUSE_INTERVAL 8 // mouse report rate: 125Hz +#endif + +#ifndef KEYBALL_SCROLLBALL_INHIVITOR +# define KEYBALL_SCROLLBALL_INHIVITOR 50 +#endif + +/// To disable scroll snap feature, define 0 in your config.h +#ifndef KEYBALL_SCROLLSNAP_ENABLE +# define KEYBALL_SCROLLSNAP_ENABLE 2 +#endif + +#ifndef KEYBALL_SCROLLSNAP_RESET_TIMER +# define KEYBALL_SCROLLSNAP_RESET_TIMER 100 +#endif + +#ifndef KEYBALL_SCROLLSNAP_TENSION_THRESHOLD +# define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 12 +#endif + +/// Specify SROM ID to be uploaded PMW3360DW (optical sensor). It will be +/// enabled high CPI setting or so. Valid valus are 0x04 or 0x81. Define this +/// in your config.h to be enable. Please note that using this option will +/// increase the firmware size by more than 4KB. +//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x04 +//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x81 + +/// Defining this macro keeps two functions intact: keycode_config() and +/// mod_config() in keycode_config.c. +/// +/// These functions customize the magic key code and are useless if the magic +/// key code is disabled. Therefore, Keyball automatically disables it. +/// However, there may be cases where you still need these functions even after +/// disabling the magic key code. In that case, define this macro. +//#define KEYBALL_KEEP_MAGIC_FUNCTIONS + +////////////////////////////////////////////////////////////////////////////// +// Constants + +#define KEYBALL_TX_GETINFO_INTERVAL 500 +#define KEYBALL_TX_GETINFO_MAXTRY 10 +#define KEYBALL_TX_GETMOTION_INTERVAL 4 + +#if (PRODUCT_ID & 0xff00) == 0x0000 +# define KEYBALL_MODEL 46 +#elif (PRODUCT_ID & 0xff00) == 0x0100 +# define KEYBALL_MODEL 61 +#elif (PRODUCT_ID & 0xff00) == 0x0200 +# define KEYBALL_MODEL 39 +#elif (PRODUCT_ID & 0xff00) == 0x0300 +# define KEYBALL_MODEL 147 +#elif (PRODUCT_ID & 0xff00) == 0x0400 +# define KEYBALL_MODEL 44 +#endif + +#define KEYBALL_OLED_MAX_PRESSING_KEYCODES 6 + +////////////////////////////////////////////////////////////////////////////// +// Types + +enum keyball_keycodes { + KBC_RST = QK_KB_0, // Keyball configuration: reset to default + KBC_SAVE = QK_KB_1, // Keyball configuration: save to EEPROM + + CPI_I100 = QK_KB_2, // CPI +100 CPI + CPI_D100 = QK_KB_3, // CPI -100 CPI + CPI_I1K = QK_KB_4, // CPI +1000 CPI + CPI_D1K = QK_KB_5, // CPI -1000 CPI + + // In scroll mode, motion from primary trackball is treated as scroll + // wheel. + SCRL_TO = QK_KB_6, // Toggle scroll mode + SCRL_MO = QK_KB_7, // Momentary scroll mode + SCRL_DVI = QK_KB_8, // Increment scroll divider + SCRL_DVD = QK_KB_9, // Decrement scroll divider + + SSNP_VRT = QK_KB_13, // Set scroll snap mode as vertical + SSNP_HOR = QK_KB_14, // Set scroll snap mode as horizontal + SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) + + // Auto mouse layer control keycodes. + // Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined. + AML_TO = QK_KB_10, // Toggle automatic mouse layer + AML_I50 = QK_KB_11, // Increment automatic mouse layer timeout + AML_D50 = QK_KB_12, // Decrement automatic mouse layer timeout + + // User customizable 32 keycodes. + KEYBALL_SAFE_RANGE = QK_USER_0, +}; + +typedef union { + uint32_t raw; + struct { + uint8_t cpi : 7; + uint8_t sdiv : 3; // scroll divider +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + uint8_t amle : 1; // automatic mouse layer enabled + uint16_t amlto : 5; // automatic mouse layer timeout +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + uint8_t ssnap : 2; // scroll snap mode +#endif + }; +} keyball_config_t; + +typedef struct { + uint8_t ballcnt; // count of balls: support only 0 or 1, for now +} keyball_info_t; + +typedef struct { + int16_t x; + int16_t y; +} keyball_motion_t; + +typedef uint8_t keyball_cpi_t; + +typedef enum { + KEYBALL_SCROLLSNAP_MODE_VERTICAL = 0, + KEYBALL_SCROLLSNAP_MODE_HORIZONTAL = 1, + KEYBALL_SCROLLSNAP_MODE_FREE = 2, +} keyball_scrollsnap_mode_t; + +typedef struct { + bool this_have_ball; + bool that_enable; + bool that_have_ball; + + keyball_motion_t this_motion; + keyball_motion_t that_motion; + + uint8_t cpi_value; + bool cpi_changed; + + bool scroll_mode; + uint32_t scroll_mode_changed; + uint8_t scroll_div; + +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + uint32_t scroll_snap_last; + int8_t scroll_snap_tension_h; +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball_scrollsnap_mode_t scrollsnap_mode; +#endif + + uint16_t last_kc; + keypos_t last_pos; + report_mouse_t last_mouse; + + // Buffer to indicate pressing keys. + char pressing_keys[KEYBALL_OLED_MAX_PRESSING_KEYCODES + 1]; +} keyball_t; + +typedef enum { + KEYBALL_ADJUST_PENDING = 0, + KEYBALL_ADJUST_PRIMARY = 1, + KEYBALL_ADJUST_SECONDARY = 2, +} keyball_adjust_t; + +////////////////////////////////////////////////////////////////////////////// +// Exported values (touch carefully) + +extern keyball_t keyball; + +////////////////////////////////////////////////////////////////////////////// +// Hook points + +/// keyball_on_adjust_layout is called when the keyboard layout adjustted +void keyball_on_adjust_layout(keyball_adjust_t v); + +/// keyball_on_apply_motion_to_mouse_move applies trackball's motion m to r as +/// mouse movement. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left); + +/// keyball_on_apply_motion_to_mouse_scroll applies trackball's motion m to r +/// as mouse scroll. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left); + +////////////////////////////////////////////////////////////////////////////// +// Public API functions + +/// keyball_oled_render_ballinfo renders ball information to OLED. +/// It uses just 21 columns to show the info. +void keyball_oled_render_ballinfo(void); + +/// keyball_oled_render_keyinfo renders last processed key information to OLED. +/// It shows column, row, key code, and key name (if available). +void keyball_oled_render_keyinfo(void); + +/// keyball_oled_render_layerinfo renders current layer status information to +/// OLED. It shows layer mask with number (1~f) for active layers and '_' for +/// inactive layers. +void keyball_oled_render_layerinfo(void); + +/// keyball_get_scroll_mode gets current scroll mode. +bool keyball_get_scroll_mode(void); + +/// keyball_set_scroll_mode modify scroll mode. +void keyball_set_scroll_mode(bool mode); + +/// keyball_get_scrollsnap_mode gets current scroll snap mode. +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void); + +/// keyball_set_scrollsnap_mode change scroll snap mode. +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); + +/// keyball_get_scroll_div gets current scroll divider. +/// See also keyball_set_scroll_div for the scroll divider's detail. +uint8_t keyball_get_scroll_div(void); + +/// keyball_set_scroll_div changes scroll divider. +/// +/// The scroll divider is the number that divides the raw value when applying +/// trackball motion to scrolling. The CPI value of the trackball is very +/// high, so if you apply it to scrolling as is, it will scroll too much. +/// In order to adjust the scroll amount to be appropriate, it is applied after +/// dividing it by a scroll divider. The actual denominator is determined by +/// the following formula: +/// +/// denominator = 2 ^ (div - 1) ^2 +/// +/// Valid values are between 1 and 7, KEYBALL_SCROLL_DIV_DEFAULT is used when 0 +/// is specified. +void keyball_set_scroll_div(uint8_t div); + +/// keyball_get_cpi gets current CPI of trackball. +/// The actual CPI value is the returned value multiplied by 100: +/// +/// CPI = v * 100 +uint8_t keyball_get_cpi(void); + +/// keyball_set_cpi changes CPI of trackball. +/// Valid values are 0 to 120. If it is 0, KEYBALL_CPI_DEFAULT will be used, +/// otherwise the actual CPI value will be the set value multiplied by 100: +/// +/// CPI = v * 100 +/// +/// In addition, if you do not upload SROM, the maximum value will be limited +/// to 35 (3500CPI). +void keyball_set_cpi(uint8_t cpi); diff --git a/keyboards/keyball/lib/keyball/keycodes.md b/keyboards/keyball/lib/keyball/keycodes.md new file mode 100644 index 00000000000..ed1d15c33d1 --- /dev/null +++ b/keyboards/keyball/lib/keyball/keycodes.md @@ -0,0 +1,52 @@ +# Keyball: Special Keycodes + +* [English/英語](#english) +* [日本語/Japanese](#japanese) + + +## Special Keycodes + +| Keycode | Value on Remap | Hex | Description | +|:-----------|:----------------|:---------|:------------------------------------------------------------------| +| `KBC_RST` | `Kb 0` | `0x7e00` | Reset Keyball configuration[^1] | +| `KBC_SAVE` | `Kb 1` | `0x7e01` | Persist Keyball configuration[^1] to EEPROM | +| `CPI_I100` | `Kb 2` | `0x7e02` | Increase 100 CPI (max 12000) | +| `CPI_D100` | `Kb 3` | `0x7e03` | Decrease 100 CPI (min 100) | +| `CPI_I1K` | `Kb 4` | `0x7e04` | Increase 1000 CPI (max 12000) | +| `CPI_D1K` | `Kb 5` | `0x7e05` | Decrease 1000 CPI (min 100) | +| `SCRL_TO` | `Kb 6` | `0x7e06` | Toggle scroll mode | +| `SCRL_MO` | `Kb 7` | `0x7e07` | Enable scroll mode when pressing | +| `SCRL_DVI` | `Kb 8` | `0x7e08` | Increase scroll divider (max D7 = 1/128) <- Most Scroll slow | +| `SCRL_DVD` | `Kb 9` | `0x7e09` | Decrease scroll divider (min 0 = 1/1) <- Most Scroll fast | +| `AML_TO` | `Kb 10` | `0x7e0a` | Toggle automatic mouse layer | +| `AML_I50` | `Kb 11` | `0x7e0b` | Increase 50ms automatic mouse layer timeout (max 1000ms) | +| `AML_D50` | `Kb 12` | `0x7e0c` | Decrease 50ms automatic mouse layer timeout (min 100ms) | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | Set scroll snap mode as horizontal | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | Set scroll snap mode as disable (free scroll) | + +[^1]: CPI, scroll divider, automatic mouse layer's enable/disable, and automatic mouse layer's timeout. + + +## 特殊キーコード + +| キーコード | Remap上での表記 | 値 | 説明 | +|:-----------|:----------------|:---------|:------------------------------------------------------------------| +| `KBC_RST` | `Kb 0` | `0x7e00` | Keyball設定[^2]のリセット | +| `KBC_SAVE` | `Kb 1` | `0x7e01` | 現在のKeyball設定[^2]をEEPROMに保存します | +| `CPI_I100` | `Kb 2` | `0x7e02` | CPIを100増加させます(最大:12000) | +| `CPI_D100` | `Kb 3` | `0x7e03` | CPIを100減少させます(最小:100) | +| `CPI_I1K` | `Kb 4` | `0x7e04` | CPIを1000増加させます(最大:12000) | +| `CPI_D1K` | `Kb 5` | `0x7e05` | CPIを1000減少させます(最小:100) | +| `SCRL_TO` | `Kb 6` | `0x7e06` | タップごとにスクロールモードのON/OFFを切り替えます | +| `SCRL_MO` | `Kb 7` | `0x7e07` | キーを押している間、スクロールモードになります | +| `SCRL_DVI` | `Kb 8` | `0x7e08` | スクロール除数を1つ上げます(max D7 = 1/128)←最もスクロール遅い | +| `SCRL_DVD` | `Kb 9` | `0x7e09` | スクロール除数を1つ下げます(min D0 = 1/1)←最もスクロール速い | +| `AML_TO` | `Kb 10` | `0x7e0a` | 自動マウスレイヤーをトグルします。 | +| `AML_I50` | `Kb 11` | `0x7e0b` | 自動マウスレイヤーのタイムアウトを50msec増やします (max 1000ms) | +| `AML_D50` | `Kb 12` | `0x7e0c` | 自動マウスレイヤーのタイムアウトを50msec減らします (min 100ms) | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | スクロールスナップモードを水平にする | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | スクロールスナップモードを無効にする(自由スクロール) | + +[^2]: CPI、スクロール除数、自動マウスレイヤーのON/OFF状態、及び自動マウスレイヤのタイムアウト diff --git a/keyboards/keyball/lib/logofont/font.md b/keyboards/keyball/lib/logofont/font.md new file mode 100644 index 00000000000..5c963c75ca6 --- /dev/null +++ b/keyboards/keyball/lib/logofont/font.md @@ -0,0 +1,212 @@ +# Special character patterns + +## blank + +``` +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +``` + +## blank indicator + +``` +00000000 +00010000 +00010000 +00010000 +00000000 +00000000 +00000000 +``` + +## vertical label separator + +``` +00000000 +00000000 +01010101 +00000000 +00000000 +00000000 +``` + +## "ON" in 2 chars with light background + +``` +00111110 +01100011 +01011101 +01011101 +01100011 +01111111 +01000001 +01111011 +01110111 +01000001 +00111110 +00000000 +``` + +## "OFF" in 2 chars + +``` +00000000 +00011100 +00100010 +00100010 +00011100 +00000000 +00111110 +00001010 +00000000 +00111110 +00001010 +00000000 +``` + +## "aye" in 2 chars for "Layer" + +``` +00110010 +00101010 +00111100 +00000000 +00100110 +00101000 +00011110 +00000000 +00011100 +00101010 +00101100 +00000000 +``` + +## right half 'R' + +``` +00000000 +00000000 +00111111 +00001001 +00110110 +00000000 +``` + +## right half 'C' + +``` +00000000 +00000000 +00011110 +00100001 +00100001 +00000000 +``` + +## "KC" in 2 chars, indicate "keycode" + +``` +00000000 +00000000 +00000000 +00000000 +00111111 +00001000 +00110111 +00000000 +00011110 +00100001 +00100001 +00000000 +``` + +## "CPI" in 2 chars + +``` +00011110 +00100001 +00100001 +00000000 +00111111 +00001001 +00000110 +00000000 +00100001 +00111111 +00100001 +00000000 +``` + +## "SCR" in 2 chars + +``` +00100010 +00100101 +00011001 +00000000 +00011110 +00100001 +00100001 +00000000 +00111111 +00001001 +00110110 +00000000 +``` + +## "DIV" in 2 chars + +``` +00111111 +00100001 +00011110 +00000000 +00100001 +00111111 +00100001 +00000000 +00001111 +00110000 +00001111 +00000000 +``` + +## "AML" in 2 chars + +``` +00111110 +00001001 +00111110 +00000000 +00111111 +00000110 +00111111 +00000000 +00111111 +00100000 +00100000 +00000000 +``` + +## inactive "ON" in 2 chars + +(not use) + +``` +00000000 +00011100 +00100010 +00100010 +00011100 +00000000 +00111110 +00000100 +00001000 +00111110 +00000000 +00000000 +``` diff --git a/keyboards/keyball/lib/logofont/logofont.c b/keyboards/keyball/lib/logofont/logofont.c new file mode 100644 index 00000000000..29ce4888891 --- /dev/null +++ b/keyboards/keyball/lib/logofont/logofont.c @@ -0,0 +1,199 @@ +// Copyright 2021 @Yowkees: Keyball logo +// +// - Keyball logo (0x80 ~ 0xAF) +// +// Copyright 2024 MURAOKA Taro (aka KoRoN, @kaoriya): Other glyphs +// +// - ASCII characters (0x20 ~ 0x7E) +// - Special characters (0xB0 ~ 0xC3) + +#include "progmem.h" + +// clang-format off +const unsigned char font[] PROGMEM = { + + /////////////////////////////////////////////////////////////////////////// + // Standard ASCII characters, most of which fit within 5x6 area. + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 ' ' + 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, // 0x21 '!' + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 '"' + 0x12, 0x3F, 0x12, 0x3F, 0x12, 0x00, // 0x23 '#' + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, // 0x24 '$' + 0x36, 0x09, 0x1E, 0x24, 0x1B, 0x00, // 0x25 '%' + 0x18, 0x26, 0x29, 0x12, 0x28, 0x00, // 0x26 '&' + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // 0x27 ''' + 0x00, 0x1E, 0x21, 0x40, 0x00, 0x00, // 0x28 '(' + 0x00, 0x40, 0x21, 0x1E, 0x00, 0x00, // 0x29 ')' + 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00, // 0x2A '*' + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, // 0x2B '+' + 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, // 0x2C ',' + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 0x2D '-' + 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, // 0x2E '.' + 0x20, 0x10, 0x0C, 0x02, 0x01, 0x00, // 0x2F '/' + 0x1E, 0x29, 0x25, 0x23, 0x1E, 0x00, // 0x30 '0' + 0x00, 0x22, 0x3F, 0x20, 0x00, 0x00, // 0x31 '1' + 0x22, 0x31, 0x29, 0x29, 0x26, 0x00, // 0x32 '2' + 0x12, 0x21, 0x25, 0x25, 0x1A, 0x00, // 0x33 '3' + 0x18, 0x14, 0x12, 0x3F, 0x10, 0x00, // 0x34 '4' + 0x17, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x35 '5' + 0x1E, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x36 '6' + 0x01, 0x31, 0x09, 0x05, 0x03, 0x00, // 0x37 '7' + 0x1A, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x38 '8' + 0x06, 0x29, 0x29, 0x29, 0x1E, 0x00, // 0x39 '9' + 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, // 0x3A ':' + 0x00, 0x00, 0x33, 0x73, 0x00, 0x00, // 0x3B ';' + 0x08, 0x14, 0x14, 0x22, 0x22, 0x00, // 0x3C '<' + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // 0x3D '=' + 0x22, 0x22, 0x14, 0x14, 0x08, 0x00, // 0x3E '>' + 0x02, 0x01, 0x29, 0x05, 0x02, 0x00, // 0x3F '?' + 0x3E, 0x59, 0x55, 0x5D, 0x3E, 0x00, // 0x40 '@' + 0x38, 0x16, 0x11, 0x16, 0x38, 0x00, // 0x41 'A' + 0x3F, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x42 'B' + 0x1E, 0x21, 0x21, 0x21, 0x12, 0x00, // 0x43 'C' + 0x3F, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x44 'D' + 0x3F, 0x25, 0x25, 0x25, 0x21, 0x00, // 0x45 'E' + 0x3F, 0x09, 0x09, 0x09, 0x01, 0x00, // 0x46 'F' + 0x1E, 0x21, 0x21, 0x29, 0x1A, 0x00, // 0x47 'G' + 0x3F, 0x04, 0x04, 0x04, 0x3F, 0x00, // 0x48 'H' + 0x00, 0x21, 0x3F, 0x21, 0x00, 0x00, // 0x49 'I' + 0x10, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x4A 'J' + 0x3F, 0x04, 0x0C, 0x12, 0x21, 0x00, // 0x4B 'K' + 0x3F, 0x20, 0x20, 0x20, 0x20, 0x00, // 0x4C 'L' + 0x3F, 0x02, 0x04, 0x02, 0x3F, 0x00, // 0x4D 'M' + 0x3F, 0x02, 0x0C, 0x10, 0x3F, 0x00, // 0x4E 'N' + 0x1E, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x4F 'O' + 0x3F, 0x09, 0x09, 0x09, 0x06, 0x00, // 0x50 'P' + 0x1E, 0x21, 0x29, 0x11, 0x2E, 0x00, // 0x51 'Q' + 0x3F, 0x09, 0x09, 0x19, 0x26, 0x00, // 0x52 'R' + 0x12, 0x25, 0x25, 0x29, 0x12, 0x00, // 0x53 'S' + 0x01, 0x01, 0x3F, 0x01, 0x01, 0x00, // 0x54 'T' + 0x1F, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x55 'U' + 0x07, 0x18, 0x20, 0x18, 0x07, 0x00, // 0x56 'V' + 0x0F, 0x30, 0x0C, 0x30, 0x0F, 0x00, // 0x57 'W' + 0x21, 0x12, 0x0C, 0x12, 0x21, 0x00, // 0x58 'X' + 0x03, 0x04, 0x38, 0x04, 0x03, 0x00, // 0x59 'Y' + 0x31, 0x29, 0x25, 0x23, 0x21, 0x00, // 0x5A 'Z' + 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, // 0x5B '[' + 0x01, 0x02, 0x0C, 0x10, 0x20, 0x00, // 0x5C '\' + 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, // 0x5D ']' + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, // 0x5E '^' + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x5F '_' + 0x00, 0x01, 0x03, 0x04, 0x00, 0x00, // 0x60 '`' + 0x10, 0x2A, 0x2A, 0x2A, 0x3C, 0x00, // 0x61 'a' + 0x3F, 0x24, 0x22, 0x22, 0x1C, 0x00, // 0x62 'b' + 0x1C, 0x22, 0x22, 0x22, 0x24, 0x00, // 0x63 'c' + 0x1C, 0x22, 0x22, 0x24, 0x3F, 0x00, // 0x64 'd' + 0x1C, 0x2A, 0x2A, 0x2A, 0x0C, 0x00, // 0x65 'e' + 0x00, 0x04, 0x3E, 0x05, 0x05, 0x00, // 0x66 'f' + 0x0C, 0x52, 0x52, 0x54, 0x3E, 0x00, // 0x67 'g' + 0x3F, 0x08, 0x04, 0x04, 0x38, 0x00, // 0x68 'h' + 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, // 0x69 'i' + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, // 0x6A 'j' + 0x3F, 0x08, 0x08, 0x14, 0x22, 0x00, // 0x6B 'k' + 0x00, 0x01, 0x3F, 0x20, 0x00, 0x00, // 0x6C 'l' + 0x3E, 0x02, 0x3C, 0x02, 0x3C, 0x00, // 0x6D 'm' + 0x3E, 0x04, 0x02, 0x02, 0x3C, 0x00, // 0x6E 'n' + 0x1C, 0x22, 0x22, 0x22, 0x1C, 0x00, // 0x6F 'o' + 0x7E, 0x14, 0x22, 0x22, 0x1C, 0x00, // 0x70 'p' + 0x1C, 0x22, 0x22, 0x14, 0x7E, 0x00, // 0x71 'q' + 0x3E, 0x04, 0x02, 0x02, 0x04, 0x00, // 0x72 'r' + 0x24, 0x2A, 0x2A, 0x2A, 0x12, 0x00, // 0x73 's' + 0x00, 0x02, 0x1F, 0x22, 0x00, 0x00, // 0x74 't' + 0x1E, 0x20, 0x20, 0x10, 0x3E, 0x00, // 0x75 'u' + 0x06, 0x18, 0x20, 0x18, 0x06, 0x00, // 0x76 'v' + 0x0E, 0x30, 0x0C, 0x30, 0x0E, 0x00, // 0x77 'w' + 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, // 0x78 'x' + 0x0E, 0x50, 0x50, 0x48, 0x3E, 0x00, // 0x79 'y' + 0x22, 0x32, 0x2A, 0x26, 0x22, 0x00, // 0x7A 'z' + 0x08, 0x08, 0x77, 0x41, 0x41, 0x00, // 0x7B '{' + 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, // 0x7C '|' + 0x41, 0x41, 0x77, 0x08, 0x08, 0x00, // 0x7D '}' + 0x18, 0x04, 0x08, 0x10, 0x0C, 0x00, // 0x7E '~' + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x7F + + /////////////////////////////////////////////////////////////////////////// + // Keyball logo + + // Logo 1/3 (0x80 ~ 0x8F) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, + 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, + 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, + 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, + + // Logo 2/3 (0x90 ~ 0x9F) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, + 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, + 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, + 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, + 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, + 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, + 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, + 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, + 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, + 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + + // Logo 3/3 (0xA0 ~ 0xAF) + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x7F, + 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, + 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, + 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, + 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x03, 0x03, 0x03, + + /////////////////////////////////////////////////////////////////////////// + // Special characters for Keyball + + // 0xB0 + 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, // B0: blank indicator (BL) + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, // B1: vertical label separator + 0x3E, 0x63, 0x5D, 0x5D, 0x63, 0x7F, // B2, B3: + 0x41, 0x7B, 0x77, 0x41, 0x3E, 0x00, // "ON" in 2 chars with light bg. + 0x00, 0x1C, 0x22, 0x22, 0x1C, 0x00, // B4, B5: + 0x3E, 0x0A, 0x00, 0x3E, 0x0A, 0x00, // "OFF" in 2 chars + 0x32, 0x2A, 0x3C, 0x00, 0x26, 0x28, // B6, B7: + 0x1E, 0x00, 0x1C, 0x2A, 0x2C, 0x00, // "aye" in 2 chars + 0x00, 0x00, 0x3F, 0x09, 0x36, 0x00, // B8: right half "R" indicate "row" + 0x00, 0x00, 0x1E, 0x21, 0x21, 0x00, // B9: right halc "C" indicate "column" + 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, // BA, BB: + 0x37, 0x00, 0x1E, 0x21, 0x21, 0x00, // "KC" in 2 chars right aligned + 0x1E, 0x21, 0x21, 0x00, 0x3F, 0x09, // BC, BD: + 0x06, 0x00, 0x21, 0x3F, 0x21, 0x00, // "CPI" in 2 chars + 0x22, 0x25, 0x19, 0x00, 0x1E, 0x21, // BE, BF: + 0x21, 0x00, 0x3F, 0x09, 0x36, 0x00, // "SCR" in 2 chars indicate "scroll" + + // 0xC0 + 0x3F, 0x21, 0x1E, 0x00, 0x21, 0x3F, // C0, C1: + 0x21, 0x00, 0x0F, 0x30, 0x0F, 0x00, // "DIV" in 2 chars indicate "divider" + 0x3E, 0x09, 0x3E, 0x00, 0x3F, 0x06, // C2, C3: + 0x3F, 0x00, 0x3F, 0x20, 0x20, 0x00, // "AML" in 2 chars +}; +// clang-format on diff --git a/keyboards/keyball/lib/oledkit/oledkit.c b/keyboards/keyball/lib/oledkit/oledkit.c new file mode 100644 index 00000000000..04e67517a9e --- /dev/null +++ b/keyboards/keyball/lib/oledkit/oledkit.c @@ -0,0 +1,61 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "quantum.h" + +#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) + +__attribute__((weak)) void oledkit_render_logo_user(void) { + // Require `OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c"` + char ch = 0x80; + for (int y = 0; y < 3; y++) { + oled_write_P(PSTR(" "), false); + for (int x = 0; x < 16; x++) { + oled_write_char(ch++, false); + } + oled_advance_page(false); + } +} + +__attribute__((weak)) void oledkit_render_info_user(void) { + oledkit_render_logo_user(); +} + +__attribute__((weak)) bool oled_task_user(void) { + if (is_keyboard_master()) { + oledkit_render_info_user(); + } else { + oledkit_render_logo_user(); + } + return true; +} + +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { + // Logo needs to be rotated 180 degrees. + // + // A typical OLED has a narrow margin on the left side near the origin, and + // a wide margin on the right side. The Keyball logo consists of three + // lines. If the logo is displayed on an OLED consisting of four lines, the + // margin on the right side will be too large and the balance is not good. + // + // Additionally, by rotating it, the left side of the logo will be above + // the OLED screen, giving it a natural look. + return !is_keyboard_master() ? OLED_ROTATION_180 : rotation; +} + +#endif // OLED_ENABLE diff --git a/keyboards/keyball/lib/oledkit/oledkit.h b/keyboards/keyball/lib/oledkit/oledkit.h new file mode 100644 index 00000000000..c8865eb4525 --- /dev/null +++ b/keyboards/keyball/lib/oledkit/oledkit.h @@ -0,0 +1,34 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) + +// oledkit_render_info_user renders keyboard's internal state information to +// primary board. A keymap can override this by defining a function with same +// signature. +// +// It render a logo as default. +void oledkit_render_info_user(void); + +// oledkit_render_logo_user renders a logo of keyboard to secondary board. +// A keymap can override this by defining a function with same signature. +void oledkit_render_logo_user(void); + +#endif // OLED_ENABLE diff --git a/keyboards/keyball/readme.md b/keyboards/keyball/readme.md new file mode 100644 index 00000000000..3027c69d05f --- /dev/null +++ b/keyboards/keyball/readme.md @@ -0,0 +1,84 @@ +# Keyball series + +This directory includes source code of Keyball keyboard series: + +| Name | Description +|---------------|------------------------------------------------------------- +|[Keyball46](./keyball46)|A split keyboard with 46 vertically staggered keys and 34mm track ball. +|[Keyball61](./keyball61)|A split keyboard with 61 vertically staggered keys and 34mm track ball. +|[Keyball39](./keyball39)|A split keyboard with 39 vertically staggered keys and 34mm track ball. +|[ONE47](./one47)|A keyboard with 47 vertically keys and 34mm trackball. It will support BLE Micro Pro. +|[Keyball44](./keyball44)|A split keyboard with 44 vertically staggered keys and 34mm track ball. + +* Keyboard Designer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: ProMicro like footprint +* Hardware Availability: See [Where to Buy](../../../README.md#where-to-buy) + +See each directories for each keyboards in a table above. + +## How to build + +1. Check out this repository. + + ```console + $ git clone https://github.com/Yowkees/keyball.git keyball + ``` + +2. Check out [qmk/qmk_firmware](https://github.com/qmk/qmk_firmware/) repository in another place. + + ```console + $ git clone https://github.com/qmk/qmk_firmware.git --depth 1 --recurse-submodules --shallow-submodules -b 0.22.14 qmk + ``` + + Currently Keyball firmwares are verified to compile with QMK 0.22.14 + +3. Create a symbolic link to this `keyball/` directory from [qmk/qmk_firmware]'s `keyboards/` directory. + + ```console + $ ls + keyball/ qmk/ + + $ cd qmk/keyboards + $ ln -s ../../keyball/qmk_firmware/keyboards/keyball keyball + $ ls keyball/ + drivers/ keyball39/ keyball44/ keyball46/ keyball61/ lib/ one47/ readme.md + $ cd .. + ``` + +4. `make` your Keyball firmware. + + ```console + # Build Keyball39 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball39:default + + # Build Keyball44 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball44:default + + # Build Keyball61 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball61:default + ``` + +There are three keymaps provided at least: + +* `via` - Standard version with [Remap](https://remap-keys.app/) or VIA to change keymap +* `test` - Easy-to-use version for checking operation at build time +* `default` - Base version for creating your own customized firmware + +## How to create your keymap + +1. Fork this Yowkees/keyball repository +2. Checkout forked repository +3. (OPTIONAL) Create a new branch +4. Add a your keymap, or make some changes +5. Commit changes and push it to your forked repository +6. Open your forked repository with web browser +7. Click and open "Actions" tab +8. Click "Build a firmware on demand" in Workflows on left panel +9. Press "Run workflow" button on right side, then you will see forms +10. (OPTIONAL) Select a your working branch +11. Select a "Keyboard" from drop-down list +12. Enter the "keymap" you want to build +13. Click "Run workflow" +14. Wait a minute until the firmware build is finished +15. Click a latest workflow run and open details +16. Download built firmware in "Artifacts" section From 92b824496d95cc66e724865f2e785d5c671d7c0e Mon Sep 17 00:00:00 2001 From: rzrjck Date: Tue, 20 May 2025 00:53:54 +0200 Subject: [PATCH 03/22] code from idank/qmk_firmware for keyball61 on RP2040, (it uses custom pmw3360 sensor driver) --- keyboards/keyball/drivers/pmw3360/pmw3360.c | 2 +- keyboards/keyball/drivers/pmw3360/pmw3360.h | 2 +- keyboards/keyball/keyball61/config.h | 29 +- keyboards/keyball/keyball61/halconf.h | 25 ++ keyboards/keyball/keyball61/info.json | 88 ------ keyboards/keyball/keyball61/keyball61.h | 87 ------ keyboards/keyball/keyball61/keyboard.json | 286 ++++++++++++++++++ .../keyball61/keymaps/graphite/config.h | 40 ++- .../keyball61/keymaps/graphite/keymap.c | 116 +++++-- .../keyball61/keymaps/graphite/rules.mk | 9 +- .../keyball/keyball61/keymaps/test/rules.mk | 5 +- keyboards/keyball/keyball61/mcuconf.h | 23 ++ keyboards/keyball/keyball61/rules.mk | 14 +- .../keyball/lib/duplexmatrix/duplexmatrix.c | 77 +---- ...ix.sync-conflict-20240505-122328-VL7CYNH.c | 119 ++++++++ keyboards/keyball/lib/keyball/README.md | 4 +- keyboards/keyball/lib/keyball/keyball.c | 4 +- keyboards/keyball/lib/keyball/keyball.h | 12 +- qmk_firmware.sln | 55 ++++ 19 files changed, 684 insertions(+), 313 deletions(-) create mode 100644 keyboards/keyball/keyball61/halconf.h delete mode 100644 keyboards/keyball/keyball61/info.json create mode 100644 keyboards/keyball/keyball61/keyboard.json create mode 100644 keyboards/keyball/keyball61/mcuconf.h create mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c create mode 100644 qmk_firmware.sln diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.c b/keyboards/keyball/drivers/pmw3360/pmw3360.c index 02a9097614f..235a43a1136 100644 --- a/keyboards/keyball/drivers/pmw3360/pmw3360.c +++ b/keyboards/keyball/drivers/pmw3360/pmw3360.c @@ -23,7 +23,7 @@ along with this program. If not, see . #include "srom_0x81.c" #define PMW3360_SPI_MODE 3 -#define PMW3360_SPI_DIVISOR (F_CPU / PMW3360_CLOCKS) +#define PMW3360_SPI_DIVISOR 64 #define PMW3360_CLOCKS 2000000 static bool motion_bursting = false; diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.h b/keyboards/keyball/drivers/pmw3360/pmw3360.h index ebac2f69945..dee58caf60b 100644 --- a/keyboards/keyball/drivers/pmw3360/pmw3360.h +++ b/keyboards/keyball/drivers/pmw3360/pmw3360.h @@ -24,7 +24,7 @@ along with this program. If not, see . // Configurations #ifndef PMW3360_NCS_PIN -# define PMW3360_NCS_PIN B6 +# define PMW3360_NCS_PIN GP21 #endif /// DEBUG_PMW3360_SCAN_RATE enables scan performance counter. diff --git a/keyboards/keyball/keyball61/config.h b/keyboards/keyball/keyball61/config.h index 260cc8d6e28..3dae3c7b1cd 100644 --- a/keyboards/keyball/keyball61/config.h +++ b/keyboards/keyball/keyball61/config.h @@ -21,18 +21,17 @@ along with this program. If not, see . // Key matrix parameters (Keyball61 is duplex matrix) #define MATRIX_ROWS (5 * 2) // split keyboard #define MATRIX_COLS (4 * 2) // duplex matrix -#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } -#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define MATRIX_ROW_PINS { GP4, GP5, GP6, GP7, GP8 } +#define MATRIX_COL_PINS { GP29, GP28, GP27, GP26 } #define MATRIX_MASKED #define DEBOUNCE 5 // Split parameters -#define SOFT_SERIAL_PIN D2 -#define SPLIT_HAND_MATRIX_GRID F7, D7 -#define SPLIT_USB_DETECT -#ifdef OLED_ENABLE -# define SPLIT_OLED_ENABLE -#endif +#define SERIAL_USART_TX_PIN GP1 +#define SPLIT_HAND_MATRIX_GRID GP26, GP6 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT +// #define SPLIT_USB_DETECT +// #define SPLIT_USB_TIMEOUT 500 // If your PC does not recognize Keyball, try setting this macro. This macro // increases the firmware size by 200 bytes, so it is disabled by default, but @@ -42,9 +41,9 @@ along with this program. If not, see . #define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI // RGB LED settings -#define WS2812_DI_PIN D3 +#define WS2812_DI_PIN GP0 #ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 74 +# define RGBLIGHT_LED_COUNT 74 # define RGBLED_SPLIT { 37, 37 } # ifndef RGBLIGHT_LIMIT_VAL # define RGBLIGHT_LIMIT_VAL 120 // limitated for power consumption @@ -58,6 +57,7 @@ along with this program. If not, see . # ifndef RGBLIGHT_SAT_STEP # define RGBLIGHT_SAT_STEP 17 # endif +# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL #endif #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_SPLIT { 37, 37 } @@ -73,6 +73,11 @@ along with this program. If not, see . # define LAYER_STATE_8BIT #endif +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP22 +#define SPI_MISO_PIN GP20 +#define SPI_MOSI_PIN GP23 + // To squeeze firmware size -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE +// #undef LOCKING_SUPPORT_ENABLE +// #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/keyball/keyball61/halconf.h b/keyboards/keyball/keyball61/halconf.h new file mode 100644 index 00000000000..c09623ebfa4 --- /dev/null +++ b/keyboards/keyball/keyball61/halconf.h @@ -0,0 +1,25 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/keyball/keyball61/info.json b/keyboards/keyball/keyball61/info.json deleted file mode 100644 index 8af37c27756..00000000000 --- a/keyboards/keyball/keyball61/info.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0100", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball61", - "rgblight": { - "driver": "ws2812", - "led_count": 57 - // "split_count": [27, 29] - }, - "layouts": { - "LAYOUT_no_ball": { - "layout": [ - { "label": "L00", "x": 0, "y": 0 }, - { "label": "L01", "x": 1, "y": 0 }, - { "label": "L02", "x": 2, "y": 0 }, - { "label": "L03", "x": 3, "y": 0 }, - { "label": "L04", "x": 4, "y": 0 }, - { "label": "L05", "x": 5, "y": 0 }, - { "label": "R05", "x": 8, "y": 0 }, - { "label": "R04", "x": 9, "y": 0 }, - { "label": "R03", "x":10, "y": 0 }, - { "label": "R02", "x":11, "y": 0 }, - { "label": "R01", "x":12, "y": 0 }, - { "label": "R00", "x":13, "y": 0 }, - - { "label": "L10", "x": 0, "y": 1 }, - { "label": "L11", "x": 1, "y": 1 }, - { "label": "L12", "x": 2, "y": 1 }, - { "label": "L13", "x": 3, "y": 1 }, - { "label": "L14", "x": 4, "y": 1 }, - { "label": "L15", "x": 5, "y": 1 }, - { "label": "R15", "x": 8, "y": 1 }, - { "label": "R14", "x": 9, "y": 1 }, - { "label": "R13", "x":10, "y": 1 }, - { "label": "R12", "x":11, "y": 1 }, - { "label": "R11", "x":12, "y": 1 }, - { "label": "R10", "x":13, "y": 1 }, - - { "label": "L20", "x": 0, "y": 2 }, - { "label": "L21", "x": 1, "y": 2 }, - { "label": "L22", "x": 2, "y": 2 }, - { "label": "L23", "x": 3, "y": 2 }, - { "label": "L24", "x": 4, "y": 2 }, - { "label": "L25", "x": 5, "y": 2 }, - { "label": "R25", "x": 8, "y": 2 }, - { "label": "R24", "x": 9, "y": 2 }, - { "label": "R23", "x":10, "y": 2 }, - { "label": "R22", "x":11, "y": 2 }, - { "label": "R21", "x":12, "y": 2 }, - { "label": "R20", "x":13, "y": 2 }, - - { "label": "L30", "x": 0, "y": 3 }, - { "label": "L31", "x": 1, "y": 3 }, - { "label": "L32", "x": 2, "y": 3 }, - { "label": "L33", "x": 3, "y": 3 }, - { "label": "L34", "x": 4, "y": 3 }, - { "label": "L35", "x": 5, "y": 3 }, - { "label": "L36", "x": 6, "y": 3 }, - { "label": "R36", "x": 7, "y": 3 }, - { "label": "R35", "x": 8, "y": 3 }, - { "label": "R34", "x": 9, "y": 3 }, - { "label": "R33", "x":10, "y": 3 }, - { "label": "R32", "x":11, "y": 3 }, - { "label": "R31", "x":12, "y": 3 }, - { "label": "R30", "x":13, "y": 3 }, - - { "label": "L40", "x": 0, "y": 4 }, - { "label": "L41", "x": 1, "y": 4 }, - { "label": "L42", "x": 2, "y": 4 }, - { "label": "L43", "x": 3, "y": 4 }, - { "label": "L44", "x": 4, "y": 4 }, - { "label": "L45", "x": 5, "y": 4 }, - { "label": "L46", "x": 6, "y": 4 }, - { "label": "R46", "x": 7, "y": 4 }, - { "label": "R45", "x": 8, "y": 4 }, - { "label": "R44", "x": 9, "y": 4 }, - { "label": "R43", "x":10, "y": 4 }, - { "label": "R42", "x":11, "y": 4 }, - { "label": "R41", "x":12, "y": 4 }, - { "label": "R40", "x":13, "y": 4 } - ] - } - } -} diff --git a/keyboards/keyball/keyball61/keyball61.h b/keyboards/keyball/keyball61/keyball61.h index 857d83fda8c..9a958197a84 100644 --- a/keyboards/keyball/keyball61/keyball61.h +++ b/keyboards/keyball/keyball61/keyball61.h @@ -20,90 +20,3 @@ along with this program. If not, see . #include "quantum.h" #include "lib/keyball/keyball.h" - -// clang-format off - -#define LAYOUT_right_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, L45, L46, R46, R45, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ - } - -#define LAYOUT_left_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ - } - -#define LAYOUT_dual_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L45, L46, R46, R45, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ - } - -#define LAYOUT_no_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball -#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/keyball/keyball61/keyboard.json b/keyboards/keyball/keyball61/keyboard.json new file mode 100644 index 00000000000..128b089b795 --- /dev/null +++ b/keyboards/keyball/keyball61/keyboard.json @@ -0,0 +1,286 @@ +{ + "processor": "RP2040", + "bootloader": "rp2040", + "usb": { + "vid": "0x5957", + "pid": "0x0100", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball61", + "rgblight": { + "driver": "ws2812" + }, + "ws2812": { + "driver": "vendor" + }, + "split": { + "enabled": true + }, + "layout_aliases": { + "LAYOUT": "LAYOUT_left_ball", + "LAYOUT_universal": "LAYOUT_no_ball" + }, + "layouts": { + "LAYOUT_dual_ball": { + "layout": [ + {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, + {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, + {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, + {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, + {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, + {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, + {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, + {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, + {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, + {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, + {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, + {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, + {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, + {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, + {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, + {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, + {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, + {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, + {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, + {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, + {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, + {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, + {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, + {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, + {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, + {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, + {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, + {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, + {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, + {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, + {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, + {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, + {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, + {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, + {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, + {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, + {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, + {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, + {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, + {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, + {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, + {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, + {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, + {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, + {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, + {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, + {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, + {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, + {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, + {"label": "L45", "matrix": [4, 6], "x": 52, "y": 0}, + {"label": "L46", "matrix": [4, 7], "x": 53, "y": 0}, + {"label": "R46", "matrix": [9, 7], "x": 54, "y": 0}, + {"label": "R45", "matrix": [9, 6], "x": 55, "y": 0}, + {"label": "R41", "matrix": [9, 1], "x": 56, "y": 0}, + {"label": "R40", "matrix": [9, 0], "x": 57, "y": 0} + ] + }, + "LAYOUT_left_ball": { + "layout": [ + {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, + {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, + {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, + {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, + {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, + {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, + {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, + {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, + {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, + {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, + {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, + {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, + {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, + {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, + {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, + {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, + {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, + {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, + {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, + {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, + {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, + {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, + {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, + {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, + {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, + {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, + {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, + {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, + {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, + {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, + {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, + {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, + {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, + {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, + {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, + {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, + {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, + {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, + {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, + {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, + {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, + {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, + {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, + {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, + {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, + {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, + {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, + {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, + {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, + {"label": "L45", "matrix": [4, 6], "x": 52, "y": 0}, + {"label": "L46", "matrix": [4, 7], "x": 53, "y": 0}, + {"label": "R46", "matrix": [9, 7], "x": 54, "y": 0}, + {"label": "R45", "matrix": [9, 6], "x": 55, "y": 0}, + {"label": "R44", "matrix": [9, 5], "x": 56, "y": 0}, + {"label": "R43", "matrix": [9, 4], "x": 57, "y": 0}, + {"label": "R42", "matrix": [9, 2], "x": 58, "y": 0}, + {"label": "R41", "matrix": [9, 1], "x": 59, "y": 0}, + {"label": "R40", "matrix": [9, 0], "x": 60, "y": 0} + ] + }, + "LAYOUT_no_ball": { + "layout": [ + {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, + {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, + {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, + {"label": "R05", "matrix": [5, 6], "x": 8, "y": 0}, + {"label": "R04", "matrix": [5, 5], "x": 9, "y": 0}, + {"label": "R03", "matrix": [5, 4], "x": 10, "y": 0}, + {"label": "R02", "matrix": [5, 2], "x": 11, "y": 0}, + {"label": "R01", "matrix": [5, 1], "x": 12, "y": 0}, + {"label": "R00", "matrix": [5, 0], "x": 13, "y": 0}, + {"label": "L10", "matrix": [1, 0], "x": 0, "y": 1}, + {"label": "L11", "matrix": [1, 1], "x": 1, "y": 1}, + {"label": "L12", "matrix": [1, 2], "x": 2, "y": 1}, + {"label": "L13", "matrix": [1, 4], "x": 3, "y": 1}, + {"label": "L14", "matrix": [1, 5], "x": 4, "y": 1}, + {"label": "L15", "matrix": [1, 6], "x": 5, "y": 1}, + {"label": "R15", "matrix": [6, 6], "x": 8, "y": 1}, + {"label": "R14", "matrix": [6, 5], "x": 9, "y": 1}, + {"label": "R13", "matrix": [6, 4], "x": 10, "y": 1}, + {"label": "R12", "matrix": [6, 2], "x": 11, "y": 1}, + {"label": "R11", "matrix": [6, 1], "x": 12, "y": 1}, + {"label": "R10", "matrix": [6, 0], "x": 13, "y": 1}, + {"label": "L20", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "L21", "matrix": [2, 1], "x": 1, "y": 2}, + {"label": "L22", "matrix": [2, 2], "x": 2, "y": 2}, + {"label": "L23", "matrix": [2, 4], "x": 3, "y": 2}, + {"label": "L24", "matrix": [2, 5], "x": 4, "y": 2}, + {"label": "L25", "matrix": [2, 6], "x": 5, "y": 2}, + {"label": "R25", "matrix": [7, 6], "x": 8, "y": 2}, + {"label": "R24", "matrix": [7, 5], "x": 9, "y": 2}, + {"label": "R23", "matrix": [7, 4], "x": 10, "y": 2}, + {"label": "R22", "matrix": [7, 2], "x": 11, "y": 2}, + {"label": "R21", "matrix": [7, 1], "x": 12, "y": 2}, + {"label": "R20", "matrix": [7, 0], "x": 13, "y": 2}, + {"label": "L30", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "L31", "matrix": [3, 1], "x": 1, "y": 3}, + {"label": "L32", "matrix": [3, 2], "x": 2, "y": 3}, + {"label": "L33", "matrix": [3, 4], "x": 3, "y": 3}, + {"label": "L34", "matrix": [3, 5], "x": 4, "y": 3}, + {"label": "L35", "matrix": [3, 6], "x": 5, "y": 3}, + {"label": "L36", "matrix": [3, 7], "x": 6, "y": 3}, + {"label": "R36", "matrix": [8, 7], "x": 7, "y": 3}, + {"label": "R35", "matrix": [8, 6], "x": 8, "y": 3}, + {"label": "R34", "matrix": [8, 5], "x": 9, "y": 3}, + {"label": "R33", "matrix": [8, 4], "x": 10, "y": 3}, + {"label": "R32", "matrix": [8, 2], "x": 11, "y": 3}, + {"label": "R31", "matrix": [8, 1], "x": 12, "y": 3}, + {"label": "R30", "matrix": [8, 0], "x": 13, "y": 3}, + {"label": "L40", "matrix": [4, 0], "x": 0, "y": 4}, + {"label": "L41", "matrix": [4, 1], "x": 1, "y": 4}, + {"label": "L42", "matrix": [4, 2], "x": 2, "y": 4}, + {"label": "L43", "matrix": [4, 4], "x": 3, "y": 4}, + {"label": "L44", "matrix": [4, 5], "x": 4, "y": 4}, + {"label": "L45", "matrix": [4, 6], "x": 5, "y": 4}, + {"label": "L46", "matrix": [4, 7], "x": 6, "y": 4}, + {"label": "R46", "matrix": [9, 7], "x": 7, "y": 4}, + {"label": "R45", "matrix": [9, 6], "x": 8, "y": 4}, + {"label": "R44", "matrix": [9, 5], "x": 9, "y": 4}, + {"label": "R43", "matrix": [9, 4], "x": 10, "y": 4}, + {"label": "R42", "matrix": [9, 2], "x": 11, "y": 4}, + {"label": "R41", "matrix": [9, 1], "x": 12, "y": 4}, + {"label": "R40", "matrix": [9, 0], "x": 13, "y": 4} + ] + }, + "LAYOUT_right_ball": { + "layout": [ + {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, + {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, + {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, + {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, + {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, + {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, + {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, + {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, + {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, + {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, + {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, + {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, + {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, + {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, + {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, + {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, + {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, + {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, + {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, + {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, + {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, + {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, + {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, + {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, + {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, + {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, + {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, + {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, + {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, + {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, + {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, + {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, + {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, + {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, + {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, + {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, + {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, + {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, + {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, + {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, + {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, + {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, + {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, + {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, + {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, + {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, + {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, + {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, + {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, + {"label": "L42", "matrix": [4, 2], "x": 52, "y": 0}, + {"label": "L43", "matrix": [4, 4], "x": 53, "y": 0}, + {"label": "L44", "matrix": [4, 5], "x": 54, "y": 0}, + {"label": "L45", "matrix": [4, 6], "x": 55, "y": 0}, + {"label": "L46", "matrix": [4, 7], "x": 56, "y": 0}, + {"label": "R46", "matrix": [9, 7], "x": 57, "y": 0}, + {"label": "R45", "matrix": [9, 6], "x": 58, "y": 0}, + {"label": "R41", "matrix": [9, 1], "x": 59, "y": 0}, + {"label": "R40", "matrix": [9, 0], "x": 60, "y": 0} + ] + } + } +} diff --git a/keyboards/keyball/keyball61/keymaps/graphite/config.h b/keyboards/keyball/keyball61/keymaps/graphite/config.h index 83a99392c18..cd039a0e35a 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/config.h +++ b/keyboards/keyball/keyball61/keymaps/graphite/config.h @@ -1,4 +1,22 @@ +/* +This is the c configuration file for the keymap +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ #pragma once @@ -15,9 +33,29 @@ # define RGBLIGHT_EFFECT_TWINKLE #endif + +#ifdef RGB_MATRIX_ENABLE +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard + + // These modes also require the RGB_MATRIX_FRAMEBUFFER_EFFECTS define to be available. + #define ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! + + #define RGB_MATRIX_VAL_STEP 4 + #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR + #define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set + #define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set + #define RGB_MATRIX_DEFAULT_VAL 60 // RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set + #define RGB_MATRIX_DEFAULT_SPD 60 // Sets the default animation speed, if none has been set +#endif + + #define TAP_CODE_DELAY 5 #define POINTING_DEVICE_AUTO_MOUSE_ENABLE #define AUTO_MOUSE_DEFAULT_LAYER 2 -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD + + +//#define POINTING_DEVICE_DEBUG diff --git a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c index c85dc1cd62b..aaea18e8d6a 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c +++ b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c @@ -1,33 +1,77 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ #include QMK_KEYBOARD_H #include "quantum.h" +/////////////////////////////////////////// tap-dance + +//Tap Dance declarations +enum { + TD_MINS_PLUS, +}; + +// Tap Dance definitions +tap_dance_action_t tap_dance_actions[] = { + // Tap once for MINUS, twice for PLUS + [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), +}; + +////////////////////////////////////////// combos + +// const uint16_t PROGMEM left_sqbracket[] = {KC_L, KC_D, COMBO_END}; +// const uint16_t PROGMEM right_sqbracket[] = {KC_D, KC_W, COMBO_END}; +// const uint16_t PROGMEM left_parenthesis[] = {KC_X, KC_M, COMBO_END}; +// const uint16_t PROGMEM right_parenthesis[] = {KC_M, KC_C, COMBO_END}; +// combo_t key_combos[] = { +// COMBO(left_sqbracket, KC_LEFT_BRACKET), +// COMBO(right_sqbracket, KC_RIGHT_BRACKET), +// COMBO(left_parenthesis, KC_LEFT_PAREN), +// COMBO(right_parenthesis, KC_RIGHT_PAREN) +// }; + + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_universal( - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , QK_BOOT , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS , - KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , - MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6, KC_7, KC_8,KC_9,KC_0,KC_A, KC_B , KC_3 , KC_4 + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), + KC_LSFT, KC_N, LALT_T(KC_R), LCTL_T(KC_T), LSFT_T(KC_S), KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), LALT_T(KC_E), KC_I, KC_SLSH, + MO(1) , KC_Q, KC_X, KC_M, KC_C, KC_V, KC_RBRC, KC_NUHS, KC_K , KC_P , KC_COMM , KC_DOT , KC_SCLN , KC_EQL, + KC_LCTL , KC_LGUI , _______ , _______ , _______ , MO(1), KC_SPC, KC_ENT, MO(2) , KC_BSPC , KC_DEL , KC_RALT , KC_RGUI , MO(3) ), -// _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR +// _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR [1] = LAYOUT_universal( - S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), - S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), - S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , - _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), - _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ + S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) , S(KC_GRV), + S(KC_TAB), KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE , S(KC_QUOT),S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) , S(KC_MINS), + KC_LSFT, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_SLSH) , + _______ , KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT), S(KC_SCLN), S(KC_EQL), + S(KC_LCTL),S(KC_LALT),_______, _______, _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), S(KC_RALT), S(KC_RGUI), _______ ), [2] = LAYOUT_universal( - SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , - SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , - _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7, KC_F8, KC_F9 , KC_F10, KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, KC_F12, + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, + _______ , _______ , KC_BTN1 , KC_BTN3 , KC_BTN2 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , KC_BTN1 , _______ , KC_BTN2 , KC_BTN3 , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ ), [3] = LAYOUT_universal( @@ -35,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , - QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT + QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , _______ ), }; // clang-format on @@ -46,13 +90,39 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -#ifdef OLED_ENABLE +#ifdef OLED_ENABLE # include "lib/oledkit/oledkit.h" -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} + void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); + } #endif + + +//#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + void pointing_device_init_user(void) { + set_auto_mouse_enable(true); // always required before the auto mouse feature will work + + set_auto_mouse_layer(2); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of + set_auto_mouse_enable(true); + } +// #endif + + + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + // debug_enable=true; + // debug_keyboard=true; + // debug_mouse=true; + + set_auto_mouse_layer(2); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of + set_auto_mouse_enable(true); + +} + + + diff --git a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk index 16d2ff18ed0..69ef98f584e 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk +++ b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk @@ -1,5 +1,12 @@ RGBLIGHT_ENABLE = yes +RGB_MATRIX_ENABLE = no OLED_ENABLE = yes +TAP_DANCE_ENABLE = yes +CAPS_WORD_ENABLE = yes +COMBO_ENABLE = no -BOOTLOADER = rp2040 + +# CONSOLE_ENABLE = yes + +# COMBO_COUNT = 16 diff --git a/keyboards/keyball/keyball61/keymaps/test/rules.mk b/keyboards/keyball/keyball61/keymaps/test/rules.mk index 5746ccd2854..74c5ce7e160 100644 --- a/keyboards/keyball/keyball61/keymaps/test/rules.mk +++ b/keyboards/keyball/keyball61/keymaps/test/rules.mk @@ -1,3 +1,2 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes +RGBLIGHT_ENABLE = yes # Enable RGBLIGHT +OLED_ENABLE = yes # Please Enable this in each keymaps. diff --git a/keyboards/keyball/keyball61/mcuconf.h b/keyboards/keyball/keyball61/mcuconf.h new file mode 100644 index 00000000000..52b726a56d5 --- /dev/null +++ b/keyboards/keyball/keyball61/mcuconf.h @@ -0,0 +1,23 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#include_next + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/keyball/keyball61/rules.mk b/keyboards/keyball/keyball61/rules.mk index 1c6f0165df4..15ff56cb084 100644 --- a/keyboards/keyball/keyball61/rules.mk +++ b/keyboards/keyball/keyball61/rules.mk @@ -1,12 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes - # Build Options BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = no # Audio control and System control @@ -20,8 +11,8 @@ AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = lite SRC += lib/duplexmatrix/duplexmatrix.c -# Keyball61 is split keyboard. -SPLIT_KEYBOARD = yes +# Split keyboard. +SERIAL_DRIVER = vendor # Optical sensor driver for trackball. POINTING_DEVICE_ENABLE = yes @@ -49,5 +40,4 @@ SRC += lib/keyball/keyball.c # Disable other features to squeeze firmware size SPACE_CADET_ENABLE = no -GRAVE_ESC_ENABLE = no MAGIC_ENABLE = no diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c index 97fa4217532..0ae7995ebb5 100644 --- a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c +++ b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c @@ -25,13 +25,8 @@ along with this program. If not, see . # include "split_common/transactions.h" #endif -#ifdef SPLIT_KEYBOARD -# define PINNUM_ROW (MATRIX_ROWS / 2) -# define ROWS_PER_HAND (MATRIX_ROWS / 2) -#else -# define PINNUM_ROW (MATRIX_ROWS) -# define ROWS_PER_HAND (MATRIX_ROWS) -#endif +#define PINNUM_ROW (MATRIX_ROWS / 2) +#define ROWS_PER_HAND (MATRIX_ROWS / 2) #define PINNUM_COL (MATRIX_COLS / 2) #define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) @@ -91,7 +86,7 @@ static void duplex_scan_raw(matrix_row_t out_matrix[]) { duplex_scan_raw_post_kb(out_matrix); } -static bool duplex_scan(matrix_row_t current_matrix[]) { +bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; matrix_row_t tmp[MATRIX_ROWS] = {0}; @@ -105,73 +100,7 @@ static bool duplex_scan(matrix_row_t current_matrix[]) { return changed; } -#ifdef SPLIT_KEYBOARD -static uint8_t thisHand, thatHand; -#else -# define thisHand 0 -#endif - void matrix_init_custom(void) { -#ifdef SPLIT_KEYBOARD - split_pre_init(); -#endif - set_pins_input(col_pins, PINNUM_COL); set_pins_input(row_pins, PINNUM_ROW); - -#ifdef SPLIT_KEYBOARD - thisHand = isLeftHand ? 0 : ROWS_PER_HAND; - thatHand = ROWS_PER_HAND - thisHand; - - split_post_init(); -#endif -} - -#ifdef SPLIT_KEYBOARD - -// user-defined overridable functions -__attribute__((weak)) void matrix_slave_scan_kb(void) { - matrix_slave_scan_user(); -} - -__attribute__((weak)) void matrix_slave_scan_user(void) {} - -#endif - -// declare matrix buffers which defined in quantum/matrix_common.c -extern matrix_row_t raw_matrix[MATRIX_ROWS]; -extern matrix_row_t matrix[MATRIX_ROWS]; - -uint8_t matrix_scan(void) { - bool changed = duplex_scan(raw_matrix); - - debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - -#ifdef SPLIT_KEYBOARD - if (!is_keyboard_master()) { - // send to primary. - transport_slave(matrix + thatHand, matrix + thisHand); - matrix_slave_scan_kb(); - return changed; - } - - // receive from secondary. - static bool last_connected = false; - matrix_row_t* that_raw = raw_matrix + ROWS_PER_HAND; - memset(that_raw, 0, MATRIXSIZE_PER_HAND); - if (transport_master_if_connected(matrix + thisHand, that_raw)) { - last_connected = true; - if (memcmp(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND) != 0) { - memcpy(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND); - changed = true; - } - } else if (last_connected) { - last_connected = false; - memset(matrix + thatHand, 0, MATRIXSIZE_PER_HAND); - changed = true; - } -#endif - - matrix_scan_kb(); - return changed; } diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c new file mode 100644 index 00000000000..0fa65e81570 --- /dev/null +++ b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c @@ -0,0 +1,119 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include +#include "quantum.h" +#include "matrix.h" +#include "debounce.h" + +#ifdef SPLIT_KEYBOARD +# include "split_common/split_util.h" +# include "split_common/transactions.h" +#endif + +#define PINNUM_ROW (MATRIX_ROWS / 2) +#define ROWS_PER_HAND (MATRIX_ROWS / 2) +#define PINNUM_COL (MATRIX_COLS / 2) + +#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) + +static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; +static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; + +static inline void set_pin_input(pin_t pin) { + setPinInputHigh(pin); +} + +static void set_pins_input(pin_t* pins, uint8_t n) { + for (uint8_t i = 0; i < n; i++) { + set_pin_input(pins[i]); + } +} + +static inline void set_pin_output(pin_t pin) { + setPinOutput(pin); + writePinLow(pin); +} + +static inline bool get_pin(pin_t pin) { + return readPin(pin); +} + +__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} + +static void duplex_scan_raw(matrix_row_t out_matrix[]) { + // scan column to row + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + set_pin_output(row_pins[row]); + matrix_output_select_delay(); + for (uint8_t col = 0; col < PINNUM_COL; col++) { + if (!get_pin(col_pins[col])) { + out_matrix[row] |= 1 << col; + } + } + set_pin_input(row_pins[row]); + matrix_output_unselect_delay(row, false); + } + + // scan row to column. + for (uint8_t col = 0; col < PINNUM_COL; col++) { + set_pin_output(col_pins[col]); + matrix_output_select_delay(); + matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (!get_pin(row_pins[row])) { + out_matrix[row] |= shifter; + } + } + set_pin_input(col_pins[col]); + matrix_output_unselect_delay(col, false); + } + + duplex_scan_raw_post_kb(out_matrix); +} + +static bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + matrix_row_t tmp[MATRIX_ROWS] = {0}; + + duplex_scan_raw(tmp); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (tmp[row] != current_matrix[row]) { + changed = true; + current_matrix[row] = tmp[row]; + } + } + return changed; +} + +void matrix_init_custom(void) { + set_pins_input(col_pins, PINNUM_COL); + set_pins_input(row_pins, PINNUM_ROW); +} + +// declare matrix buffers which defined in quantum/matrix_common.c +extern matrix_row_t raw_matrix[MATRIX_ROWS]; +extern matrix_row_t matrix[MATRIX_ROWS]; + +uint8_t matrix_scan(void) { + bool changed = duplex_scan(raw_matrix); + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + + matrix_scan_kb(); + return changed; +} diff --git a/keyboards/keyball/lib/keyball/README.md b/keyboards/keyball/lib/keyball/README.md index ba60d0e92c0..0c54427a9b5 100644 --- a/keyboards/keyball/lib/keyball/README.md +++ b/keyboards/keyball/lib/keyball/README.md @@ -5,7 +5,7 @@ When scrolling with the trackball, the scroll direction is restricted. This restriction is called "scroll snap". -The direction of restriction can be changed using [special key codes](keycodes.md#english). +The direction of restriction can be changed using special key codes. You can also release this restriction. It is called as "scroll snap mode" The current mode is displayed on the OLED. @@ -39,7 +39,7 @@ please make pull requests to share it us. * 水平方向にスナップ * スナップしない自由スクロール -以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の[独自キーコード](keycodes.md#japanese)を用いて手動で切り替える。 +以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 #### up to 1.3.2 diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c index 0e54a50cc72..07efac7a7df 100644 --- a/keyboards/keyball/lib/keyball/keyball.c +++ b/keyboards/keyball/lib/keyball/keyball.c @@ -33,7 +33,7 @@ const uint16_t AML_TIMEOUT_MIN = 100; const uint16_t AML_TIMEOUT_MAX = 1000; const uint16_t AML_TIMEOUT_QU = 50; // Quantization Unit -#define BL 0xB0 // Blank indicator character +static const char BL = '\xB0'; // Blank indicator character static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; @@ -411,7 +411,7 @@ void keyball_oled_render_ballinfo(void) { oled_write(format_4d(keyball_get_cpi()) + 1, false); oled_write_P(PSTR("00 "), false); - // indicate scroll snap mode: "VT" (vertical), "HO" (horizontal), and "SCR" (free) + // indicate scroll snap mode: "VT" (vertical), "HN" (horiozntal), and "SCR" (free) #if 1 && KEYBALL_SCROLLSNAP_ENABLE == 2 switch (keyball_get_scrollsnap_mode()) { case KEYBALL_SCROLLSNAP_MODE_VERTICAL: diff --git a/keyboards/keyball/lib/keyball/keyball.h b/keyboards/keyball/lib/keyball/keyball.h index 9f201d4fff5..32003a84632 100644 --- a/keyboards/keyball/lib/keyball/keyball.h +++ b/keyboards/keyball/lib/keyball/keyball.h @@ -256,17 +256,17 @@ uint8_t keyball_get_scroll_div(void); void keyball_set_scroll_div(uint8_t div); /// keyball_get_cpi gets current CPI of trackball. -/// The actual CPI value is the returned value multiplied by 100: +/// The actual CPI value is the returned value +1 and multiplied by 100: /// -/// CPI = v * 100 +/// CPI = (v + 1) * 100 uint8_t keyball_get_cpi(void); /// keyball_set_cpi changes CPI of trackball. -/// Valid values are 0 to 120. If it is 0, KEYBALL_CPI_DEFAULT will be used, -/// otherwise the actual CPI value will be the set value multiplied by 100: +/// Valid values are between 0 to 119, and the actual CPI value is the set +/// value +1 and multiplied by 100: /// -/// CPI = v * 100 +/// CPI = (v + 1) * 100 /// /// In addition, if you do not upload SROM, the maximum value will be limited -/// to 35 (3500CPI). +/// to 34 (3500CPI). void keyball_set_cpi(uint8_t cpi); diff --git a/qmk_firmware.sln b/qmk_firmware.sln new file mode 100644 index 00000000000..5044ace618f --- /dev/null +++ b/qmk_firmware.sln @@ -0,0 +1,55 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{3A8DF596-E814-FECC-DD4B-D8EF8AAC1A0D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lufa", "lufa", "{05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projects", "Projects", "{EBAEACE1-FFDC-2B03-6487-1FD503E5D58B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LEDNotifier", "LEDNotifier", "{263C1B12-F4D9-330A-570B-947F5E3B8527}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CPUMonitor", "lib\lufa\Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj", "{088719F7-C934-BC63-1527-6EFF4B84BC94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LEDMixer", "lib\lufa\Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj", "{E50FF490-1163-BB1F-C704-7DD84ED8F5FD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TempDataLogger", "TempDataLogger", "{04CDC07F-3F25-3195-D559-D5409EC77759}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TempLoggerHostApp", "lib\lufa\Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj", "{34968B94-999A-114F-A945-DCF12133FBDB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {088719F7-C934-BC63-1527-6EFF4B84BC94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {088719F7-C934-BC63-1527-6EFF4B84BC94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {088719F7-C934-BC63-1527-6EFF4B84BC94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {088719F7-C934-BC63-1527-6EFF4B84BC94}.Release|Any CPU.Build.0 = Release|Any CPU + {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Release|Any CPU.Build.0 = Release|Any CPU + {34968B94-999A-114F-A945-DCF12133FBDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34968B94-999A-114F-A945-DCF12133FBDB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34968B94-999A-114F-A945-DCF12133FBDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34968B94-999A-114F-A945-DCF12133FBDB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A} = {3A8DF596-E814-FECC-DD4B-D8EF8AAC1A0D} + {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} = {05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A} + {263C1B12-F4D9-330A-570B-947F5E3B8527} = {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} + {088719F7-C934-BC63-1527-6EFF4B84BC94} = {263C1B12-F4D9-330A-570B-947F5E3B8527} + {E50FF490-1163-BB1F-C704-7DD84ED8F5FD} = {263C1B12-F4D9-330A-570B-947F5E3B8527} + {04CDC07F-3F25-3195-D559-D5409EC77759} = {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} + {34968B94-999A-114F-A945-DCF12133FBDB} = {04CDC07F-3F25-3195-D559-D5409EC77759} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0F4CBF29-187F-4FDE-A7D5-C19E42C10D93} + EndGlobalSection +EndGlobal From 4035c70a2436bd7180085aa1ecdf078eefc32688 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 22 May 2025 14:30:14 +0200 Subject: [PATCH 04/22] first working code with qmk_firmware pmw3360 driver --- keyboards/keyball/drivers/pmw3360/pmw3360.c | 176 ------------ keyboards/keyball/drivers/pmw3360/pmw3360.h | 171 ------------ .../pmw3360/pmw3360_pointing_device_driver.c | 51 ---- keyboards/keyball/drivers/pmw3360/srom_0x04.c | 263 ------------------ keyboards/keyball/drivers/pmw3360/srom_0x81.c | 263 ------------------ keyboards/keyball/keyball61/config.h | 7 +- .../keyball61/keymaps/graphite/config.h | 4 +- .../keyball61/keymaps/graphite/keymap.c | 6 +- .../keyball61/keymaps/graphite/rules.mk | 3 +- keyboards/keyball/keyball61/rules.mk | 5 +- keyboards/keyball/lib/keyball/keyball.c | 93 +++++-- keyboards/keyball/lib/keyball/keyball.h | 8 +- 12 files changed, 90 insertions(+), 960 deletions(-) delete mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360.c delete mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360.h delete mode 100644 keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c delete mode 100644 keyboards/keyball/drivers/pmw3360/srom_0x04.c delete mode 100644 keyboards/keyball/drivers/pmw3360/srom_0x81.c diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.c b/keyboards/keyball/drivers/pmw3360/pmw3360.c deleted file mode 100644 index 235a43a1136..00000000000 --- a/keyboards/keyball/drivers/pmw3360/pmw3360.c +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include "quantum.h" -#include "pmw3360.h" - -// Include SROM definitions. -#include "srom_0x04.c" -#include "srom_0x81.c" - -#define PMW3360_SPI_MODE 3 -#define PMW3360_SPI_DIVISOR 64 -#define PMW3360_CLOCKS 2000000 - -static bool motion_bursting = false; - -bool pmw3360_spi_start(void) { - return spi_start(PMW3360_NCS_PIN, false, PMW3360_SPI_MODE, PMW3360_SPI_DIVISOR); -} - -uint8_t pmw3360_reg_read(uint8_t addr) { - pmw3360_spi_start(); - spi_write(addr & 0x7f); - wait_us(160); - uint8_t data = spi_read(); - wait_us(1); - spi_stop(); - wait_us(19); - // Reset motion_bursting mode if read from a register other than motion - // burst register. - if (addr != pmw3360_Motion_Burst) { - motion_bursting = false; - } - return data; -} - -void pmw3360_reg_write(uint8_t addr, uint8_t data) { - pmw3360_spi_start(); - spi_write(addr | 0x80); - spi_write(data); - wait_us(35); - spi_stop(); - wait_us(145); -} - -uint8_t pmw3360_cpi_get(void) { - return pmw3360_reg_read(pmw3360_Config1); -} - -void pmw3360_cpi_set(uint8_t cpi) { - if (cpi > pmw3360_MAXCPI) { - cpi = pmw3360_MAXCPI; - } - pmw3360_reg_write(pmw3360_Config1, cpi); -} - -static uint32_t pmw3360_timer = 0; -static uint32_t pmw3360_scan_count = 0; -static uint32_t pmw3360_last_count = 0; - -void pmw3360_scan_perf_task(void) { - pmw3360_scan_count++; - uint32_t now = timer_read32(); - if (TIMER_DIFF_32(now, pmw3360_timer) > 1000) { -#if defined(CONSOLE_ENABLE) - dprintf("pmw3360 scan frequency: %lu\n", pmw3360_scan_count); -#endif - pmw3360_last_count = pmw3360_scan_count; - pmw3360_scan_count = 0; - pmw3360_timer = now; - } -} - -uint32_t pmw3360_scan_rate_get(void) { - return pmw3360_last_count; -} - -bool pmw3360_motion_read(pmw3360_motion_t *d) { -#ifdef DEBUG_PMW3360_SCAN_RATE - pmw3360_scan_perf_task(); -#endif - uint8_t mot = pmw3360_reg_read(pmw3360_Motion); - if ((mot & 0x88) != 0x80) { - return false; - } - d->x = pmw3360_reg_read(pmw3360_Delta_X_L); - d->x |= pmw3360_reg_read(pmw3360_Delta_X_H) << 8; - d->y = pmw3360_reg_read(pmw3360_Delta_Y_L); - d->y |= pmw3360_reg_read(pmw3360_Delta_Y_H) << 8; - return true; -} - -bool pmw3360_motion_burst(pmw3360_motion_t *d) { -#ifdef DEBUG_PMW3360_SCAN_RATE - pmw3360_scan_perf_task(); -#endif - // Start motion burst if motion burst mode is not started. - if (!motion_bursting) { - pmw3360_reg_write(pmw3360_Motion_Burst, 0); - motion_bursting = true; - } - - pmw3360_spi_start(); - spi_write(pmw3360_Motion_Burst); - wait_us(35); - spi_read(); // skip MOT - spi_read(); // skip Observation - d->x = spi_read(); - d->x |= spi_read() << 8; - d->y = spi_read(); - d->y |= spi_read() << 8; - spi_stop(); - // Required NCS in 500ns after motion burst. - wait_us(1); - return true; -} - -bool pmw3360_init(void) { - spi_init(); - setPinOutput(PMW3360_NCS_PIN); - // reboot - pmw3360_spi_start(); - pmw3360_reg_write(pmw3360_Power_Up_Reset, 0x5a); - wait_ms(50); - // read five registers of motion and discard those values - pmw3360_reg_read(pmw3360_Motion); - pmw3360_reg_read(pmw3360_Delta_X_L); - pmw3360_reg_read(pmw3360_Delta_X_H); - pmw3360_reg_read(pmw3360_Delta_Y_L); - pmw3360_reg_read(pmw3360_Delta_Y_H); - // configuration - pmw3360_reg_write(pmw3360_Config2, 0x00); - // check product ID and revision ID - uint8_t pid = pmw3360_reg_read(pmw3360_Product_ID); - uint8_t rev = pmw3360_reg_read(pmw3360_Revision_ID); - spi_stop(); - return pid == 0x42 && rev == 0x01; -} - -uint8_t pmw3360_srom_id = 0; - -void pmw3360_srom_upload(pmw3360_srom_t srom) { - pmw3360_reg_write(pmw3360_Config2, 0x00); - pmw3360_reg_write(pmw3360_SROM_Enable, 0x1d); - wait_us(10); - pmw3360_reg_write(pmw3360_SROM_Enable, 0x18); - - // SROM upload (download for PMW3360) with burst mode - pmw3360_spi_start(); - spi_write(pmw3360_SROM_Load_Burst | 0x80); - wait_us(15); - for (size_t i = 0; i < srom.len; i++) { - spi_write(pgm_read_byte(srom.data + i)); - wait_us(15); - } - spi_stop(); - wait_us(200); - - pmw3360_srom_id = pmw3360_reg_read(pmw3360_SROM_ID); - pmw3360_reg_write(pmw3360_Config2, 0x00); - wait_ms(10); -} diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360.h b/keyboards/keyball/drivers/pmw3360/pmw3360.h deleted file mode 100644 index dee58caf60b..00000000000 --- a/keyboards/keyball/drivers/pmw3360/pmw3360.h +++ /dev/null @@ -1,171 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include -#include "spi_master.h" - -////////////////////////////////////////////////////////////////////////////// -// Configurations - -#ifndef PMW3360_NCS_PIN -# define PMW3360_NCS_PIN GP21 -#endif - -/// DEBUG_PMW3360_SCAN_RATE enables scan performance counter. -/// It records scan count in a last second and enables pmw3360_scan_rate_get(). -/// Additionally, it will be logged automatically when defined CONSOLE_ENABLE -/// and `debug_enable = true`. -//#define DEBUG_PMW3360_SCAN_RATE - -////////////////////////////////////////////////////////////////////////////// -// Types - -typedef struct { - const uint8_t *data; - size_t len; -} pmw3360_srom_t; - -typedef struct { - int16_t x; - int16_t y; -} pmw3360_motion_t; - -typedef enum { - pmw3360_Product_ID = 0x00, - pmw3360_Revision_ID = 0x01, - pmw3360_Motion = 0x02, - pmw3360_Delta_X_L = 0x03, - pmw3360_Delta_X_H = 0x04, - pmw3360_Delta_Y_L = 0x05, - pmw3360_Delta_Y_H = 0x06, - pmw3360_SQUAL = 0x07, - pmw3360_Raw_Data_Sum = 0x08, - pmw3360_Maximum_Raw_data = 0x09, - pmw3360_Minimum_Raw_data = 0x0A, - pmw3360_Shutter_Lower = 0x0B, - pmw3360_Shutter_Upper = 0x0C, - pmw3360_Control = 0x0D, - pmw3360_Config1 = 0x0F, - pmw3360_Config2 = 0x10, - pmw3360_Angle_Tune = 0x11, - pmw3360_Frame_Capture = 0x12, - pmw3360_SROM_Enable = 0x13, - pmw3360_Run_Downshift = 0x14, - pmw3360_Rest1_Rate_Lower = 0x15, - pmw3360_Rest1_Rate_Upper = 0x16, - pmw3360_Rest1_Downshift = 0x17, - pmw3360_Rest2_Rate_Lower = 0x18, - pmw3360_Rest2_Rate_Upper = 0x19, - pmw3360_Rest2_Downshift = 0x1A, - pmw3360_Rest3_Rate_Lower = 0x1B, - pmw3360_Rest3_Rate_Upper = 0x1C, - pmw3360_Observation = 0x24, - pmw3360_Data_Out_Lower = 0x25, - pmw3360_Data_Out_Upper = 0x26, - pmw3360_Raw_Data_Dump = 0x29, - pmw3360_SROM_ID = 0x2A, - pmw3360_Min_SQ_Run = 0x2B, - pmw3360_Raw_Data_Threshold = 0x2C, - pmw3360_Config5 = 0x2F, - pmw3360_Power_Up_Reset = 0x3A, - pmw3360_Shutdown = 0x3B, - pmw3360_Inverse_Product_ID = 0x3F, - pmw3360_LiftCutoff_Tune3 = 0x41, - pmw3360_Angle_Snap = 0x42, - pmw3360_LiftCutoff_Tune1 = 0x4A, - pmw3360_Motion_Burst = 0x50, - pmw3360_LiftCutoff_Tune_Timeout = 0x58, - pmw3360_LiftCutoff_Tune_Min_Length = 0x5A, - pmw3360_SROM_Load_Burst = 0x62, - pmw3360_Lift_Config = 0x63, - pmw3360_Raw_Data_Burst = 0x64, - pmw3360_LiftCutoff_Tune2 = 0x65, -} pmw3360_reg_t; - -enum { - pmw3360_MAXCPI = 0x77, // = 119: 12000 CPI -}; - -////////////////////////////////////////////////////////////////////////////// -// Exported values (touch carefully) - -/// SROM ID, last uploaded. 0 means not uploaded yet. -extern uint8_t pmw3360_srom_id; - -/// SROM 0x04 -extern const pmw3360_srom_t pmw3360_srom_0x04; -/// SROM 0x81 -extern const pmw3360_srom_t pmw3360_srom_0x81; - -////////////////////////////////////////////////////////////////////////////// -// Top level API - -/// pmw3360_init initializes PMW3360DM-T2QU module. -/// It will return true when succeeded, otherwise false. -bool pmw3360_init(void); - -void pmw3360_srom_upload(pmw3360_srom_t srom); - -/// pmw3360_motion_read gets a motion data by Motion register. -/// This requires to write a dummy data to pmw3360_Motion register -/// just before. -bool pmw3360_motion_read(pmw3360_motion_t *d); - -/// pmw3360_motion_burst gets a motion data by Motion_Burst command. -/// This requires to write a dummy data to pmw3360_Motion_Burst register -/// just before. -bool pmw3360_motion_burst(pmw3360_motion_t *d); - -/// pmw3360_scan_rate_get gets count of scan in a last second. -/// This works only when DEBUG_PMW3360_SCAN_RATE is defined. -uint32_t pmw3360_scan_rate_get(void); - -// TODO: document -uint8_t pmw3360_cpi_get(void); - -// TODO: document -void pmw3360_cpi_set(uint8_t cpi); - -////////////////////////////////////////////////////////////////////////////// -// Register operations - -/// pmw3360_reg_write writes a value to a register. -void pmw3360_reg_write(uint8_t addr, uint8_t data); - -/// pmw3360_reg_read reads a value from a register. -uint8_t pmw3360_reg_read(uint8_t addr); - -////////////////////////////////////////////////////////////////////////////// -// SPI operations - -bool pmw3360_spi_start(void); - -void inline pmw3360_spi_stop(void) { - spi_stop(); -} - -/// \deprecated use pmw3360_reg_write() instead of this. -spi_status_t inline pmw3360_spi_write(uint8_t data) { - return spi_write(data); -} - -/// \deprecated use pmw3360_reg_read() instead of this. -spi_status_t inline pmw3360_spi_read(void) { - return spi_read(); -} diff --git a/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c b/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c deleted file mode 100644 index 50c187bdd1e..00000000000 --- a/keyboards/keyball/drivers/pmw3360/pmw3360_pointing_device_driver.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include "pointing_device.h" -#include "pmw3360.h" - -bool pmw3360_has = false; - -void pointing_device_driver_init(void) { - pmw3360_has = pmw3360_init(); - pmw3360_reg_write(pmw3360_Motion_Burst, 0); -} - -#define constrain_hid(amt) ((amt) < -127 ? -127 : ((amt) > 127 ? 127 : (amt))) - -report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { - pmw3360_motion_t d = {0}; - if (pmw3360_has && pmw3360_motion_burst(&d)) { - mouse_report.x = constrain_hid(d.y); - mouse_report.y = constrain_hid(d.x); - } - return mouse_report; -} - -uint16_t pointing_device_driver_get_cpi(void) { - if (!pmw3360_has) { - return 0; - } - return pmw3360_cpi_get(); -} - -void pointing_device_driver_set_cpi(uint16_t cpi) { - if (!pmw3360_has) { - return; - } - pmw3360_cpi_set(cpi); -} diff --git a/keyboards/keyball/drivers/pmw3360/srom_0x04.c b/keyboards/keyball/drivers/pmw3360/srom_0x04.c deleted file mode 100644 index dd471cab90c..00000000000 --- a/keyboards/keyball/drivers/pmw3360/srom_0x04.c +++ /dev/null @@ -1,263 +0,0 @@ -static const uint8_t srom_data_0x04[] PROGMEM = { - 0x01, 0x04, 0x8E, 0x96, 0x6E, 0x77, 0x3E, 0xFE, 0x7E, 0x5F, 0x1D, 0xB8, 0xF2, 0x66, 0x4E, 0xFF, - 0x5D, 0x19, 0xB0, 0xC2, 0x04, 0x69, 0x54, 0x2A, 0xD6, 0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0xAA, 0xB7, 0xCD, 0xF9, 0x51, 0x20, 0xA3, 0xC4, - 0xEB, 0x35, 0xC9, 0xF1, 0x60, 0x42, 0x06, 0x8E, 0x7F, 0x7C, 0x7A, 0x76, 0x6E, 0x3F, 0xFC, 0x7A, - 0x76, 0x6E, 0x5E, 0x3E, 0xFE, 0x7E, 0x5F, 0x3C, 0xDB, 0x15, 0x89, 0x71, 0x41, 0xE1, 0x21, 0xC0, - 0xE3, 0x44, 0xEB, 0x54, 0x2A, 0xB7, 0xCD, 0xF9, 0x70, 0x62, 0x27, 0xAD, 0xD8, 0x32, 0xC7, 0x0C, - 0x7B, 0x74, 0x4B, 0x14, 0xAA, 0xB7, 0xEC, 0x3B, 0xD5, 0x28, 0xD2, 0x07, 0x6D, 0x39, 0xD1, 0x20, - 0xC2, 0xE7, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0xB2, 0xC7, 0x0C, 0x59, 0x28, 0xF3, 0x9B -}; - -const pmw3360_srom_t pmw3360_srom_0x04 = { - .data = srom_data_0x04, - .len = sizeof(srom_data_0x04), -}; diff --git a/keyboards/keyball/drivers/pmw3360/srom_0x81.c b/keyboards/keyball/drivers/pmw3360/srom_0x81.c deleted file mode 100644 index 1a3016fbe83..00000000000 --- a/keyboards/keyball/drivers/pmw3360/srom_0x81.c +++ /dev/null @@ -1,263 +0,0 @@ -static const uint8_t srom_data_0x81[] PROGMEM = { - 0x01, 0x81, 0x01, 0x82, 0x46, 0x27, 0x9E, 0xBE, 0xFE, 0x5F, 0x3C, 0xFA, 0x76, 0x6E, 0x5E, 0x3E, - 0xFE, 0x5F, 0x1D, 0x99, 0x91, 0xA0, 0xC2, 0x06, 0x8E, 0x9E, 0x9F, 0xBC, 0xDB, 0x34, 0xEA, 0x56, - 0x0F, 0x9C, 0x9B, 0xB4, 0xCB, 0x14, 0x8B, 0x75, 0x68, 0x33, 0xC5, 0x08, 0x73, 0x45, 0xE9, 0x50, - 0x22, 0xA7, 0xCC, 0xFB, 0x55,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0x68, 0x33, 0xE4, 0x2B, 0xB5, 0xE8, 0x33, 0xE4, 0x2B, 0xB5, 0xE8, - 0x52, 0x26, 0xAF, 0xDC, 0x3A, 0xF6, 0x6E, 0x5E, 0x1F, 0xBC, 0xFA, 0x76, 0x6E, 0x3F, 0xDD, 0x38, - 0xF2, 0x47, 0x0C, 0x7B, 0x74, 0x4B, 0x14, 0x8B, 0x94, 0xAA, 0xD6, 0x0F, 0x9C, 0x9B, 0xB4, 0xEA, - 0x56, 0x2E, 0xDE, 0x1F, 0x9D, 0x99, 0xB0, 0xE2, 0x27, 0xCC, 0x1A, 0xB6, 0xEE, 0x3F, 0xFC, 0x7A, - 0x57, 0x0D, 0x98, 0x93, 0xA4, 0xAB, 0xB5, 0xC9, 0xF1, 0x60, 0x7B, 0x17, 0xC8, 0x4A -}; - -const pmw3360_srom_t pmw3360_srom_0x81 = { - .data = srom_data_0x81, - .len = sizeof(srom_data_0x81), -}; diff --git a/keyboards/keyball/keyball61/config.h b/keyboards/keyball/keyball61/config.h index 3dae3c7b1cd..22e563b87b2 100644 --- a/keyboards/keyball/keyball61/config.h +++ b/keyboards/keyball/keyball61/config.h @@ -57,7 +57,7 @@ along with this program. If not, see . # ifndef RGBLIGHT_SAT_STEP # define RGBLIGHT_SAT_STEP 17 # endif -# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL +# define RGBLIGHT_DEFAULT_MODE 6 // set the rainbow mode #endif #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_SPLIT { 37, 37 } @@ -78,6 +78,11 @@ along with this program. If not, see . #define SPI_MISO_PIN GP20 #define SPI_MOSI_PIN GP23 +#define PMW33XX_CS_PIN GP21 + +#define POINTING_DEVICE_ROTATION_90 +#define POINTING_DEVICE_INVERT_Y + // To squeeze firmware size // #undef LOCKING_SUPPORT_ENABLE // #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/keyball/keyball61/keymaps/graphite/config.h b/keyboards/keyball/keyball61/keymaps/graphite/config.h index cd039a0e35a..092c4232cfe 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/config.h +++ b/keyboards/keyball/keyball61/keymaps/graphite/config.h @@ -58,4 +58,6 @@ along with this program. If not, see . #define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD -//#define POINTING_DEVICE_DEBUG +#define POINTING_DEVICE_DEBUG + +#define MOUSE_EXTENDED_REPORT diff --git a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c index aaea18e8d6a..21a6c573907 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c +++ b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c @@ -115,9 +115,9 @@ layer_state_t layer_state_set_user(layer_state_t state) { void keyboard_post_init_user(void) { // Customise these values to desired behaviour - // debug_enable=true; - // debug_keyboard=true; - // debug_mouse=true; + debug_enable=true; + debug_keyboard=true; + debug_mouse=true; set_auto_mouse_layer(2); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of set_auto_mouse_enable(true); diff --git a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk index 69ef98f584e..8f0d372d4a7 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk +++ b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk @@ -6,7 +6,6 @@ TAP_DANCE_ENABLE = yes CAPS_WORD_ENABLE = yes COMBO_ENABLE = no - -# CONSOLE_ENABLE = yes +CONSOLE_ENABLE = yes # COMBO_COUNT = 16 diff --git a/keyboards/keyball/keyball61/rules.mk b/keyboards/keyball/keyball61/rules.mk index 15ff56cb084..e00c9cd4cdb 100644 --- a/keyboards/keyball/keyball61/rules.mk +++ b/keyboards/keyball/keyball61/rules.mk @@ -16,9 +16,7 @@ SERIAL_DRIVER = vendor # Optical sensor driver for trackball. POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += drivers/pmw3360/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate +POINTING_DEVICE_DRIVER = pmw3360 # This is unnecessary for processing KC_MS_BTN*. MOUSEKEY_ENABLE = no @@ -26,7 +24,6 @@ MOUSEKEY_ENABLE = no # Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. RGBLIGHT_ENABLE = no # Enable RGBLIGHT RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c index 07efac7a7df..366cd802a5f 100644 --- a/keyboards/keyball/lib/keyball/keyball.c +++ b/keyboards/keyball/lib/keyball/keyball.c @@ -21,21 +21,24 @@ along with this program. If not, see . #endif #include "keyball.h" -#include "drivers/pmw3360/pmw3360.h" +//#include "drivers/pmw3360/pmw3360.h" #include -const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; -const uint8_t CPI_MAX = pmw3360_MAXCPI + 1; -const uint8_t SCROLL_DIV_MAX = 7; +const uint16_t CPI_STEP = PMW33XX_CPI_STEP +const uint16_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; +const uint16_t CPI_MAX = PMW33XX_CPI_MAX; +const uint8_t SCROLL_DIV_MAX = 7; const uint16_t AML_TIMEOUT_MIN = 100; const uint16_t AML_TIMEOUT_MAX = 1000; const uint16_t AML_TIMEOUT_QU = 50; // Quantization Unit static const char BL = '\xB0'; // Blank indicator character -static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; -static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; +#ifdef OLED_ENABLE + static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; + static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; +#endif keyball_t keyball = { .this_have_ball = false, @@ -120,7 +123,7 @@ static char to_1x(uint8_t x) { } #endif -static void add_cpi(int8_t delta) { +static void add_cpi(uint16_t delta) { int16_t v = keyball_get_cpi() + delta; keyball_set_cpi(v < 1 ? 1 : v); } @@ -140,6 +143,13 @@ void keyboard_pre_init_kb(void) { } #endif + +void pointing_device_init_kb(void) { + keyball.this_have_ball = pmw33xx_init(0); + pointing_device_init_user(); +} + +/* void pointing_device_driver_init(void) { #if KEYBALL_MODEL != 46 keyball.this_have_ball = pmw3360_init(); @@ -157,14 +167,18 @@ void pointing_device_driver_init(void) { pmw3360_cpi_set(CPI_DEFAULT - 1); } } +*/ +/* uint16_t pointing_device_driver_get_cpi(void) { return keyball_get_cpi(); } + void pointing_device_driver_set_cpi(uint16_t cpi) { keyball_set_cpi(cpi); } +*/ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { #if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 @@ -235,13 +249,15 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio #endif } -static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { - if (as_scroll) { - keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); - } else { - keyball_on_apply_motion_to_mouse_move(m, r, is_left); - } -} + +// static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { +// if (as_scroll) { +// keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); +// } else { +// keyball_on_apply_motion_to_mouse_move(m, r, is_left); +// } +// } + static inline bool should_report(void) { uint32_t now = timer_read32(); @@ -264,6 +280,37 @@ static inline bool should_report(void) { return true; } +/////////// new code + +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + if (!is_keyboard_master()) return mouse_report; + + if (keyball.this_have_ball) { + ATOMIC_BLOCK_FORCEON { + keyball.this_motion.x = add16(keyball.this_motion.x, mouse_report.x); + keyball.this_motion.y = add16(keyball.this_motion.y, mouse_report.y); + } + } + // report mouse event, if keyboard is primary. + if (is_keyboard_master() && should_report()) { + // modify mouse report by PMW3360 motion. + // motion_to_mouse(&keyball.this_motion, &mouse_report, is_keyboard_left(), keyball.scroll_mode); + // motion_to_mouse(&keyball.that_motion, &mouse_report, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); + // store mouse report for OLED. + keyball.last_mouse = mouse_report; + } + return mouse_report; + +} + + + + + +////// end new code + + +/* report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { // fetch from optical sensor. if (keyball.this_have_ball) { @@ -285,6 +332,7 @@ report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { } return rep; } +*/ ////////////////////////////////////////////////////////////////////////////// // Split RPC @@ -547,18 +595,18 @@ void keyball_set_scroll_div(uint8_t div) { keyball.scroll_div = div > SCROLL_DIV_MAX ? SCROLL_DIV_MAX : div; } -uint8_t keyball_get_cpi(void) { +uint16_t keyball_get_cpi(void) { return keyball.cpi_value == 0 ? CPI_DEFAULT : keyball.cpi_value; } -void keyball_set_cpi(uint8_t cpi) { +void keyball_set_cpi(uint16_t cpi) { if (cpi > CPI_MAX) { cpi = CPI_MAX; } keyball.cpi_value = cpi; keyball.cpi_changed = true; if (keyball.this_have_ball) { - pmw3360_cpi_set(cpi == 0 ? CPI_DEFAULT - 1 : cpi - 1); + pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT - 1 : cpi - 1); } } @@ -606,6 +654,8 @@ void housekeeping_task_kb(void) { #endif static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { + +#ifdef OLED_ENABLE // Process only valid keycodes. if (keycode >= 4 && keycode < 57) { char value = pgm_read_byte(code_to_name + keycode - 4); @@ -623,6 +673,7 @@ static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { } } } +#endif } #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE @@ -697,16 +748,16 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } break; case CPI_I100: - add_cpi(1); + add_cpi(100); break; case CPI_D100: - add_cpi(-1); + add_cpi(-100); break; case CPI_I1K: - add_cpi(10); + add_cpi(1000); break; case CPI_D1K: - add_cpi(-10); + add_cpi(-1000); break; case SCRL_TO: diff --git a/keyboards/keyball/lib/keyball/keyball.h b/keyboards/keyball/lib/keyball/keyball.h index 32003a84632..9364a6d61bd 100644 --- a/keyboards/keyball/lib/keyball/keyball.h +++ b/keyboards/keyball/lib/keyball/keyball.h @@ -159,8 +159,8 @@ typedef struct { keyball_motion_t this_motion; keyball_motion_t that_motion; - uint8_t cpi_value; - bool cpi_changed; + uint16_t cpi_value; + bool cpi_changed; bool scroll_mode; uint32_t scroll_mode_changed; @@ -259,7 +259,7 @@ void keyball_set_scroll_div(uint8_t div); /// The actual CPI value is the returned value +1 and multiplied by 100: /// /// CPI = (v + 1) * 100 -uint8_t keyball_get_cpi(void); +uint16_t keyball_get_cpi(void); /// keyball_set_cpi changes CPI of trackball. /// Valid values are between 0 to 119, and the actual CPI value is the set @@ -269,4 +269,4 @@ uint8_t keyball_get_cpi(void); /// /// In addition, if you do not upload SROM, the maximum value will be limited /// to 34 (3500CPI). -void keyball_set_cpi(uint8_t cpi); +void keyball_set_cpi(uint16_t cpi); From 204e7a1ac726803a9ee2cd8721880d0143a30088 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Sun, 25 May 2025 19:48:00 +0200 Subject: [PATCH 05/22] changing CPI thru qmk core pmw33xx driver --- .../keyball61/keymaps/graphite/config.h | 4 ++-- .../keyball61/keymaps/graphite/keymap.c | 1 - keyboards/keyball/lib/keyball/keyball.c | 21 ++++++++----------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/keyboards/keyball/keyball61/keymaps/graphite/config.h b/keyboards/keyball/keyball61/keymaps/graphite/config.h index 092c4232cfe..1eef9cbdfe5 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/config.h +++ b/keyboards/keyball/keyball61/keymaps/graphite/config.h @@ -58,6 +58,6 @@ along with this program. If not, see . #define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD -#define POINTING_DEVICE_DEBUG - #define MOUSE_EXTENDED_REPORT + +#define RGBLIGHT_SLEEP diff --git a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c index 21a6c573907..1728080e7d0 100644 --- a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c +++ b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c @@ -125,4 +125,3 @@ void keyboard_post_init_user(void) { } - diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c index 366cd802a5f..baf15007381 100644 --- a/keyboards/keyball/lib/keyball/keyball.c +++ b/keyboards/keyball/lib/keyball/keyball.c @@ -25,9 +25,8 @@ along with this program. If not, see . #include -const uint16_t CPI_STEP = PMW33XX_CPI_STEP -const uint16_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; -const uint16_t CPI_MAX = PMW33XX_CPI_MAX; +const uint16_t CPI_STEP = PMW33XX_CPI_STEP; +const uint16_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT; const uint8_t SCROLL_DIV_MAX = 7; const uint16_t AML_TIMEOUT_MIN = 100; @@ -456,7 +455,7 @@ void keyball_oled_render_ballinfo(void) { // 2nd line, empty label and CPI oled_write_P(PSTR(" \xB1\xBC\xBD"), false); - oled_write(format_4d(keyball_get_cpi()) + 1, false); + oled_write(format_4d((keyball_get_cpi()+1)/100), false); oled_write_P(PSTR("00 "), false); // indicate scroll snap mode: "VT" (vertical), "HN" (horiozntal), and "SCR" (free) @@ -600,13 +599,11 @@ uint16_t keyball_get_cpi(void) { } void keyball_set_cpi(uint16_t cpi) { - if (cpi > CPI_MAX) { - cpi = CPI_MAX; - } keyball.cpi_value = cpi; keyball.cpi_changed = true; if (keyball.this_have_ball) { - pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT - 1 : cpi - 1); + pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT : cpi); + keyball.cpi_value = pmw33xx_get_cpi_wrapper(); } } @@ -748,16 +745,16 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } break; case CPI_I100: - add_cpi(100); + add_cpi(CPI_STEP); break; case CPI_D100: - add_cpi(-100); + add_cpi(-CPI_STEP); break; case CPI_I1K: - add_cpi(1000); + add_cpi(CPI_STEP*10); break; case CPI_D1K: - add_cpi(-1000); + add_cpi(-CPI_STEP*10); break; case SCRL_TO: From d5f6512fe6a0380f6850c455161f182a3a9ed66e Mon Sep 17 00:00:00 2001 From: rzrjck Date: Mon, 26 May 2025 18:31:14 +0200 Subject: [PATCH 06/22] CPI and keyball.motion tranferred thru RPC to master side --- .../keyball61/keymaps/default/keymap.c | 11 ++++ .../keyball61/keymaps/default/rules.mk | 2 + keyboards/keyball/lib/keyball/keyball.c | 55 +++++++++++-------- 3 files changed, 44 insertions(+), 24 deletions(-) diff --git a/keyboards/keyball/keyball61/keymaps/default/keymap.c b/keyboards/keyball/keyball61/keymaps/default/keymap.c index 2a42e4fb57f..1d402f22c99 100644 --- a/keyboards/keyball/keyball61/keymaps/default/keymap.c +++ b/keyboards/keyball/keyball61/keymaps/default/keymap.c @@ -72,3 +72,14 @@ void oledkit_render_info_user(void) { keyball_oled_render_layerinfo(); } #endif + + + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_keyboard=true; + debug_mouse=true; + + +} diff --git a/keyboards/keyball/keyball61/keymaps/default/rules.mk b/keyboards/keyball/keyball61/keymaps/default/rules.mk index 5746ccd2854..12c7160d862 100644 --- a/keyboards/keyball/keyball61/keymaps/default/rules.mk +++ b/keyboards/keyball/keyball61/keymaps/default/rules.mk @@ -1,3 +1,5 @@ RGBLIGHT_ENABLE = yes OLED_ENABLE = yes + +CONSOLE_ENABLE = yes diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c index baf15007381..7cfdd12bac6 100644 --- a/keyboards/keyball/lib/keyball/keyball.c +++ b/keyboards/keyball/lib/keyball/keyball.c @@ -183,10 +183,10 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_ #if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 r->x = clip2int8(m->y); r->y = clip2int8(m->x); - if (is_left) { - r->x = -r->x; - r->y = -r->y; - } + // if (is_left) { + // r->x = -r->x; + // r->y = -r->y; + // } #elif KEYBALL_MODEL == 46 r->x = clip2int8(m->x); r->y = -clip2int8(m->y); @@ -249,13 +249,13 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio } -// static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { -// if (as_scroll) { -// keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); -// } else { -// keyball_on_apply_motion_to_mouse_move(m, r, is_left); -// } -// } + static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { + if (as_scroll) { + keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); + } else { + keyball_on_apply_motion_to_mouse_move(m, r, is_left); + } +} static inline bool should_report(void) { @@ -282,21 +282,26 @@ static inline bool should_report(void) { /////////// new code report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { - if (!is_keyboard_master()) return mouse_report; + // if (is_keyboard_master()) return mouse_report; if (keyball.this_have_ball) { + pmw33xx_report_t report = pmw33xx_read_burst(0); + //if (pmw3360_motion_burst(&d)) { ATOMIC_BLOCK_FORCEON { - keyball.this_motion.x = add16(keyball.this_motion.x, mouse_report.x); - keyball.this_motion.y = add16(keyball.this_motion.y, mouse_report.y); + keyball.this_motion.x = add16(keyball.this_motion.x, report.delta_x); + keyball.this_motion.y = add16(keyball.this_motion.y, report.delta_y); } - } - // report mouse event, if keyboard is primary. - if (is_keyboard_master() && should_report()) { - // modify mouse report by PMW3360 motion. - // motion_to_mouse(&keyball.this_motion, &mouse_report, is_keyboard_left(), keyball.scroll_mode); - // motion_to_mouse(&keyball.that_motion, &mouse_report, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); - // store mouse report for OLED. - keyball.last_mouse = mouse_report; + //} + } + else { + // report mouse event, if keyboard is primary. + if (is_keyboard_master() && should_report()) { + // modify mouse report by PMW3360 motion. + motion_to_mouse(&keyball.this_motion, &mouse_report, is_keyboard_left(), keyball.scroll_mode); + motion_to_mouse(&keyball.that_motion, &mouse_report, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); + //store mouse report for OLED. + keyball.last_mouse = mouse_report; + } } return mouse_report; @@ -400,20 +405,22 @@ static void rpc_get_motion_invoke(void) { if (transaction_rpc_exec(KEYBALL_GET_MOTION, 0, NULL, sizeof(recv), &recv)) { keyball.that_motion.x = add16(keyball.that_motion.x, recv.x); keyball.that_motion.y = add16(keyball.that_motion.y, recv.y); + dprintf("rcv x: %d, %d ", recv.x, recv.y); + dprintf("mot x: %d, %d \n", keyball.that_motion.x, keyball.that_motion.y); } last_sync = now; return; } static void rpc_set_cpi_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { - keyball_set_cpi(*(keyball_cpi_t *)in_data); + keyball_set_cpi((*(keyball_cpi_t *)in_data) * 100); } static void rpc_set_cpi_invoke(void) { if (!keyball.cpi_changed) { return; } - keyball_cpi_t req = keyball.cpi_value; + keyball_cpi_t req = keyball.cpi_value / 100; if (!transaction_rpc_send(KEYBALL_SET_CPI, sizeof(req), &req)) { return; } From 0b74cafdbbfa186c494728b80cbbe5d318d71581 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Mon, 26 May 2025 18:33:07 +0200 Subject: [PATCH 07/22] Code works with core pmw33xx driver, converted_to: rp2040ce - sides don't cummunicate --- .../keyball/drivers/pmw3360/srom_0x04.c | 263 ++++++ .../keyball/drivers/pmw3360/srom_0x81.c | 263 ++++++ keyboards/yowkees/keyball/keyball39/.noci | 0 keyboards/yowkees/keyball/keyball39/config.h | 79 ++ keyboards/yowkees/keyball/keyball39/info.json | 63 ++ .../yowkees/keyball/keyball39/keyball39.c | 46 + .../yowkees/keyball/keyball39/keyball39.h | 97 ++ .../keyball39/keymaps/default/config.h | 39 + .../keyball39/keymaps/default/keymap.c | 71 ++ .../keyball39/keymaps/default/rules.mk | 3 + .../keyball39/keymaps/develop/config.h | 33 + .../keyball39/keymaps/develop/keymap.c | 51 ++ .../keyball39/keymaps/develop/rules.mk | 6 + .../keyball/keyball39/keymaps/test/config.h | 25 + .../keyball/keyball39/keymaps/test/keymap.c | 51 ++ .../keyball/keyball39/keymaps/test/rules.mk | 6 + keyboards/yowkees/keyball/keyball39/readme.md | 21 + keyboards/yowkees/keyball/keyball39/rules.mk | 49 + keyboards/yowkees/keyball/keyball44/.noci | 0 keyboards/yowkees/keyball/keyball44/config.h | 79 ++ keyboards/yowkees/keyball/keyball44/info.json | 67 ++ .../yowkees/keyball/keyball44/keyball44.c | 46 + .../yowkees/keyball/keyball44/keyball44.h | 97 ++ .../keyball44/keymaps/default/config.h | 39 + .../keyball44/keymaps/default/keymap.c | 71 ++ .../keyball44/keymaps/default/rules.mk | 3 + .../keyball44/keymaps/develop/config.h | 33 + .../keyball44/keymaps/develop/keymap.c | 51 ++ .../keyball44/keymaps/develop/rules.mk | 6 + .../keyball/keyball44/keymaps/test/config.h | 25 + .../keyball/keyball44/keymaps/test/keymap.c | 51 ++ .../keyball/keyball44/keymaps/test/rules.mk | 6 + keyboards/yowkees/keyball/keyball44/readme.md | 20 + keyboards/yowkees/keyball/keyball44/rules.mk | 49 + keyboards/yowkees/keyball/keyball46/.noci | 0 keyboards/yowkees/keyball/keyball46/config.h | 80 ++ .../keyball/keyball46/docs/diff_from_v1.md | 49 + .../keyball/keyball46/docs/features_v1_ja.md | 154 ++++ keyboards/yowkees/keyball/keyball46/info.json | 218 +++++ .../yowkees/keyball/keyball46/keyball46.c | 66 ++ .../yowkees/keyball/keyball46/keyball46.h | 113 +++ .../yowkees/keyball/keyball46/keyball46.json | 32 + .../keyball/keyball46/keyball46_left.json | 32 + .../keyball46/keymaps/default/config.h | 42 + .../keyball46/keymaps/default/keymap.c | 117 +++ .../keyball46/keymaps/default/rules.mk | 3 + .../keyball46/keymaps/develop/config.h | 39 + .../keyball46/keymaps/develop/keymap.c | 57 ++ .../keyball46/keymaps/develop/rules.mk | 6 + .../keyball/keyball46/keymaps/test/config.h | 25 + .../keyball/keyball46/keymaps/test/keymap.c | 56 ++ .../keyball/keyball46/keymaps/test/rules.mk | 3 + .../keyball46/keymaps/test_Both/config.h | 28 + .../keyball46/keymaps/test_Both/keymap.c | 57 ++ .../keyball46/keymaps/test_Both/rules.mk | 3 + .../keyball46/keymaps/test_Left/config.h | 28 + .../keyball46/keymaps/test_Left/keymap.c | 57 ++ .../keyball46/keymaps/test_Left/rules.mk | 3 + .../keyball46/keymaps/via_Both/config.h | 42 + .../keyball46/keymaps/via_Both/keymap.c | 117 +++ .../keyball46/keymaps/via_Both/rules.mk | 5 + .../keyball46/keymaps/via_Left/config.h | 42 + .../keyball46/keymaps/via_Left/keymap.c | 117 +++ .../keyball46/keymaps/via_Left/rules.mk | 5 + keyboards/yowkees/keyball/keyball46/readme.md | 25 + keyboards/yowkees/keyball/keyball46/rules.mk | 49 + keyboards/yowkees/keyball/keyball61/.noci | 0 keyboards/yowkees/keyball/keyball61/config.h | 91 ++ keyboards/yowkees/keyball/keyball61/halconf.h | 25 + keyboards/yowkees/keyball/keyball61/info.json | 86 ++ .../yowkees/keyball/keyball61/keyball61.c | 48 + .../yowkees/keyball/keyball61/keyball61.h | 109 +++ .../keyball61/keymaps/default/config.h | 39 + .../keyball61/keymaps/default/keymap.c | 84 ++ .../keyball61/keymaps/default/rules.mk | 8 + .../keyball61/keymaps/develop/config.h | 33 + .../keyball61/keymaps/develop/keymap.c | 59 ++ .../keyball61/keymaps/develop/rules.mk | 6 + .../keyball/keyball61/keymaps/test/config.h | 25 + .../keyball/keyball61/keymaps/test/keymap.c | 52 ++ .../keyball/keyball61/keymaps/test/rules.mk | 3 + keyboards/yowkees/keyball/keyball61/mcuconf.h | 23 + keyboards/yowkees/keyball/keyball61/readme.md | 21 + keyboards/yowkees/keyball/keyball61/rules.mk | 51 ++ .../keyball/lib/duplexmatrix/duplexmatrix.c | 177 ++++ .../keyball/lib/duplexmatrix/duplexmatrix.h | 20 + keyboards/yowkees/keyball/lib/glcdfont.c | 234 +++++ .../yowkees/keyball/lib/keyball/README.md | 128 +++ .../yowkees/keyball/lib/keyball/keyball.c | 841 ++++++++++++++++++ .../yowkees/keyball/lib/keyball/keyball.h | 276 ++++++ .../yowkees/keyball/lib/keyball/keycodes.md | 52 ++ .../yowkees/keyball/lib/logofont/font.md | 212 +++++ .../yowkees/keyball/lib/logofont/logofont.c | 199 +++++ .../yowkees/keyball/lib/oledkit/oledkit.c | 61 ++ .../yowkees/keyball/lib/oledkit/oledkit.h | 34 + keyboards/yowkees/keyball/one47/.noci | 0 keyboards/yowkees/keyball/one47/config.h | 59 ++ keyboards/yowkees/keyball/one47/info.json | 68 ++ .../keyball/one47/keymaps/default/config.h | 36 + .../keyball/one47/keymaps/default/keymap.c | 70 ++ .../keyball/one47/keymaps/default/rules.mk | 3 + .../keyball/one47/keymaps/develop/config.h | 33 + .../keyball/one47/keymaps/develop/keymap.c | 57 ++ .../keyball/one47/keymaps/develop/rules.mk | 6 + .../keyball/one47/keymaps/test/config.h | 27 + .../keyball/one47/keymaps/test/keymap.c | 51 ++ .../keyball/one47/keymaps/test/rules.mk | 3 + keyboards/yowkees/keyball/one47/one47.c | 97 ++ keyboards/yowkees/keyball/one47/one47.h | 54 ++ keyboards/yowkees/keyball/one47/readme.md | 20 + keyboards/yowkees/keyball/one47/rules.mk | 53 ++ keyboards/yowkees/keyball/readme.md | 84 ++ 112 files changed, 7197 insertions(+) create mode 100644 keyboards/yowkees/keyball/drivers/pmw3360/srom_0x04.c create mode 100644 keyboards/yowkees/keyball/drivers/pmw3360/srom_0x81.c create mode 100644 keyboards/yowkees/keyball/keyball39/.noci create mode 100644 keyboards/yowkees/keyball/keyball39/config.h create mode 100644 keyboards/yowkees/keyball/keyball39/info.json create mode 100644 keyboards/yowkees/keyball/keyball39/keyball39.c create mode 100644 keyboards/yowkees/keyball/keyball39/keyball39.h create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/config.h create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/config.h create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball39/readme.md create mode 100644 keyboards/yowkees/keyball/keyball39/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball44/.noci create mode 100644 keyboards/yowkees/keyball/keyball44/config.h create mode 100644 keyboards/yowkees/keyball/keyball44/info.json create mode 100644 keyboards/yowkees/keyball/keyball44/keyball44.c create mode 100644 keyboards/yowkees/keyball/keyball44/keyball44.h create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/config.h create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/config.h create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball44/readme.md create mode 100644 keyboards/yowkees/keyball/keyball44/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/.noci create mode 100644 keyboards/yowkees/keyball/keyball46/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md create mode 100644 keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md create mode 100644 keyboards/yowkees/keyball/keyball46/info.json create mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.c create mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.h create mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.json create mode 100644 keyboards/yowkees/keyball/keyball46/keyball46_left.json create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball46/readme.md create mode 100644 keyboards/yowkees/keyball/keyball46/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball61/.noci create mode 100644 keyboards/yowkees/keyball/keyball61/config.h create mode 100644 keyboards/yowkees/keyball/keyball61/halconf.h create mode 100644 keyboards/yowkees/keyball/keyball61/info.json create mode 100644 keyboards/yowkees/keyball/keyball61/keyball61.c create mode 100644 keyboards/yowkees/keyball/keyball61/keyball61.h create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/default/config.h create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/config.h create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c create mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk create mode 100644 keyboards/yowkees/keyball/keyball61/mcuconf.h create mode 100644 keyboards/yowkees/keyball/keyball61/readme.md create mode 100644 keyboards/yowkees/keyball/keyball61/rules.mk create mode 100644 keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c create mode 100644 keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h create mode 100644 keyboards/yowkees/keyball/lib/glcdfont.c create mode 100644 keyboards/yowkees/keyball/lib/keyball/README.md create mode 100644 keyboards/yowkees/keyball/lib/keyball/keyball.c create mode 100644 keyboards/yowkees/keyball/lib/keyball/keyball.h create mode 100644 keyboards/yowkees/keyball/lib/keyball/keycodes.md create mode 100644 keyboards/yowkees/keyball/lib/logofont/font.md create mode 100644 keyboards/yowkees/keyball/lib/logofont/logofont.c create mode 100644 keyboards/yowkees/keyball/lib/oledkit/oledkit.c create mode 100644 keyboards/yowkees/keyball/lib/oledkit/oledkit.h create mode 100644 keyboards/yowkees/keyball/one47/.noci create mode 100644 keyboards/yowkees/keyball/one47/config.h create mode 100644 keyboards/yowkees/keyball/one47/info.json create mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/config.h create mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/keymap.c create mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/rules.mk create mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/config.h create mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c create mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk create mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/config.h create mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/keymap.c create mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/rules.mk create mode 100644 keyboards/yowkees/keyball/one47/one47.c create mode 100644 keyboards/yowkees/keyball/one47/one47.h create mode 100644 keyboards/yowkees/keyball/one47/readme.md create mode 100644 keyboards/yowkees/keyball/one47/rules.mk create mode 100644 keyboards/yowkees/keyball/readme.md diff --git a/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x04.c b/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x04.c new file mode 100644 index 00000000000..dd471cab90c --- /dev/null +++ b/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x04.c @@ -0,0 +1,263 @@ +static const uint8_t srom_data_0x04[] PROGMEM = { + 0x01, 0x04, 0x8E, 0x96, 0x6E, 0x77, 0x3E, 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 0x67, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0x93, 0xA4, 0xAB, 0xD4, + 0x2A, 0xD6, 0x0F, 0x9C, 0x9B, 0xB4, 0xCB, 0x14, 0xAA, 0xB7, 0xCD, 0xF9, 0x51, 0x20, 0xA3, 0xC4, + 0xEB, 0x35, 0xC9, 0xF1, 0x60, 0x42, 0x06, 0x8E, 0x7F, 0x7C, 0x7A, 0x76, 0x6E, 0x3F, 0xFC, 0x7A, + 0x76, 0x6E, 0x5E, 0x3E, 0xFE, 0x7E, 0x5F, 0x3C, 0xDB, 0x15, 0x89, 0x71, 0x41, 0xE1, 0x21, 0xC0, + 0xE3, 0x44, 0xEB, 0x54, 0x2A, 0xB7, 0xCD, 0xF9, 0x70, 0x62, 0x27, 0xAD, 0xD8, 0x32, 0xC7, 0x0C, + 0x7B, 0x74, 0x4B, 0x14, 0xAA, 0xB7, 0xEC, 0x3B, 0xD5, 0x28, 0xD2, 0x07, 0x6D, 0x39, 0xD1, 0x20, + 0xC2, 0xE7, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0xB2, 0xC7, 0x0C, 0x59, 0x28, 0xF3, 0x9B +}; + +const pmw3360_srom_t pmw3360_srom_0x04 = { + .data = srom_data_0x04, + .len = sizeof(srom_data_0x04), +}; diff --git a/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x81.c b/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x81.c new file mode 100644 index 00000000000..1a3016fbe83 --- /dev/null +++ b/keyboards/yowkees/keyball/drivers/pmw3360/srom_0x81.c @@ -0,0 +1,263 @@ +static const uint8_t srom_data_0x81[] PROGMEM = { + 0x01, 0x81, 0x01, 0x82, 0x46, 0x27, 0x9E, 0xBE, 0xFE, 0x5F, 0x3C, 0xFA, 0x76, 0x6E, 0x5E, 0x3E, + 0xFE, 0x5F, 0x1D, 0x99, 0x91, 0xA0, 0xC2, 0x06, 0x8E, 0x9E, 0x9F, 0xBC, 0xDB, 0x34, 0xEA, 0x56,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 0x2B, 0xB5, 0xE8, 0x33, 0xC5, 0x08, 0x92, 0xA6, 0xAF, 0xDC, 0x1B, 0xB4, 0xEA, 0x56, 0x0F, + 0x9C, 0x9B, 0xB4, 0xCB, 0xF5, 0x68, 0x33, 0xE4, 0x2B, 0xB5, 0xE8, 0x33, 0xE4, 0x2B, 0xB5, 0xE8, + 0x52, 0x26, 0xAF, 0xDC, 0x3A, 0xF6, 0x6E, 0x5E, 0x1F, 0xBC, 0xFA, 0x76, 0x6E, 0x3F, 0xDD, 0x38, + 0xF2, 0x47, 0x0C, 0x7B, 0x74, 0x4B, 0x14, 0x8B, 0x94, 0xAA, 0xD6, 0x0F, 0x9C, 0x9B, 0xB4, 0xEA, + 0x56, 0x2E, 0xDE, 0x1F, 0x9D, 0x99, 0xB0, 0xE2, 0x27, 0xCC, 0x1A, 0xB6, 0xEE, 0x3F, 0xFC, 0x7A, + 0x57, 0x0D, 0x98, 0x93, 0xA4, 0xAB, 0xB5, 0xC9, 0xF1, 0x60, 0x7B, 0x17, 0xC8, 0x4A +}; + +const pmw3360_srom_t pmw3360_srom_0x81 = { + .data = srom_data_0x81, + .len = sizeof(srom_data_0x81), +}; diff --git a/keyboards/yowkees/keyball/keyball39/.noci b/keyboards/yowkees/keyball/keyball39/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/yowkees/keyball/keyball39/config.h b/keyboards/yowkees/keyball/keyball39/config.h new file mode 100644 index 00000000000..83441bf6060 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters +#define MATRIX_ROWS (4 * 2) // split keyboard +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_MASKED +#define DEBOUNCE 5 +#define DIODE_DIRECTION COL2ROW + +// Split parameters +#define SOFT_SERIAL_PIN D2 +#define SPLIT_HAND_MATRIX_GRID F6, B5 +#define SPLIT_USB_DETECT +#ifdef OLED_ENABLE +# define SPLIT_OLED_ENABLE +#endif + +// If your PC does not recognize Keyball, try setting this macro. This macro +// increases the firmware size by 200 bytes, so it is disabled by default, but +// it has been reported to work well in such cases. +//#define SPLIT_WATCHDOG_ENABLE + +#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 48 +# define RGBLED_SPLIT { 24, 24 } // (24 + 22) +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 150 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 15 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 24, 24 } +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball39/info.json b/keyboards/yowkees/keyball/keyball39/info.json new file mode 100644 index 00000000000..163269d8466 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/info.json @@ -0,0 +1,63 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0200", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball39", + "rgblight": { + "driver": "ws2812" + }, + "layouts": { + "LAYOUT_no_ball": { + "layout": [ + { "label": "L00", "x": 0, "y": 0 }, + { "label": "L01", "x": 1, "y": 0 }, + { "label": "L02", "x": 2, "y": 0 }, + { "label": "L03", "x": 3, "y": 0 }, + { "label": "L04", "x": 4, "y": 0 }, + { "label": "R04", "x": 7, "y": 0 }, + { "label": "R03", "x": 8, "y": 0 }, + { "label": "R02", "x": 9, "y": 0 }, + { "label": "R01", "x":10, "y": 0 }, + { "label": "R00", "x":11, "y": 0 }, + + { "label": "L10", "x": 0, "y": 1 }, + { "label": "L11", "x": 1, "y": 1 }, + { "label": "L12", "x": 2, "y": 1 }, + { "label": "L13", "x": 3, "y": 1 }, + { "label": "L14", "x": 4, "y": 1 }, + { "label": "R14", "x": 7, "y": 1 }, + { "label": "R13", "x": 8, "y": 1 }, + { "label": "R12", "x": 9, "y": 1 }, + { "label": "R11", "x":10, "y": 1 }, + { "label": "R10", "x":11, "y": 1 }, + + { "label": "L20", "x": 0, "y": 2 }, + { "label": "L21", "x": 1, "y": 2 }, + { "label": "L22", "x": 2, "y": 2 }, + { "label": "L23", "x": 3, "y": 2 }, + { "label": "L24", "x": 4, "y": 2 }, + { "label": "R24", "x": 7, "y": 2 }, + { "label": "R23", "x": 8, "y": 2 }, + { "label": "R22", "x": 9, "y": 2 }, + { "label": "R21", "x":10, "y": 2 }, + { "label": "R20", "x":11, "y": 2 }, + + { "label": "L30", "x": 0, "y": 3 }, + { "label": "L31", "x": 1, "y": 3 }, + { "label": "L32", "x": 2, "y": 3 }, + { "label": "L33", "x": 3, "y": 3 }, + { "label": "L34", "x": 4, "y": 3 }, + { "label": "L35", "x": 5, "y": 3 }, + { "label": "R35", "x": 6, "y": 3 }, + { "label": "R34", "x": 7, "y": 3 }, + { "label": "R33", "x": 8, "y": 3 }, + { "label": "R32", "x": 9, "y": 3 }, + { "label": "R31", "x":10, "y": 3 }, + { "label": "R30", "x":11, "y": 3 } + ] + } + } +} diff --git a/keyboards/yowkees/keyball/keyball39/keyball39.c b/keyboards/yowkees/keyball/keyball39/keyball39.c new file mode 100644 index 00000000000..5472a0d48ff --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keyball39.c @@ -0,0 +1,46 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off +matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b00011111, + 0b00011111, + 0b00011111, + 0b00111111, + 0b00011111, + 0b00011111, + 0b00011111, + 0b00111111, +}; +// clang-format on + +void keyball_on_adjust_layout(keyball_adjust_t v) { +#ifdef RGBLIGHT_ENABLE + // adjust RGBLIGHT's clipping and effect ranges + uint8_t lednum_this = keyball.this_have_ball ? 22 : 24; + uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 22 : 24; + rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); + rgblight_set_effect_range(0, lednum_this + lednum_that); +#endif +} diff --git a/keyboards/yowkees/keyball/keyball39/keyball39.h b/keyboards/yowkees/keyball/keyball39/keyball39.h new file mode 100644 index 00000000000..a2555e0b502 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keyball39.h @@ -0,0 +1,97 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, KC_NO }, \ + { L10, L11, L12, L13, L14, KC_NO }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, KC_NO }, \ + { R10, R11, R12, R13, R14, KC_NO }, \ + { R20, R21, R22, R23, R24, KC_NO }, \ + { R30, KC_NO, KC_NO, KC_NO, R34, R35 }, \ + } + +#define LAYOUT_left_ball( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L34, L35, R35, R34, R33, R32, R31, R30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, KC_NO }, \ + { L10, L11, L12, L13, L14, KC_NO }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, KC_NO, KC_NO, KC_NO, L34, L35 }, \ + { R00, R01, R02, R03, R04, KC_NO }, \ + { R10, R11, R12, R13, R14, KC_NO }, \ + { R20, R21, R22, R23, R24, KC_NO }, \ + { R30, R31, R32, R33, R34, R35 }, \ + } + +#define LAYOUT_dual_ball( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L34, L35, R35, R34, R30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, KC_NO }, \ + { L10, L11, L12, L13, L14, KC_NO }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, KC_NO, KC_NO, KC_NO, L34, L35 }, \ + { R00, R01, R02, R03, R04, KC_NO }, \ + { R10, R11, R12, R13, R14, KC_NO }, \ + { R20, R21, R22, R23, R24, KC_NO }, \ + { R30, KC_NO, KC_NO, KC_NO, R34, R35 }, \ + } + +#define LAYOUT_no_ball( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, KC_NO }, \ + { L10, L11, L12, L13, L14, KC_NO }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, KC_NO }, \ + { R10, R11, R12, R13, R14, KC_NO }, \ + { R20, R21, R22, R23, R24, KC_NO }, \ + { R30, R31, R32, R33, R34, R35 }, \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball +#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h new file mode 100644 index 00000000000..ec062cf45e0 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c new file mode 100644 index 00000000000..ebc39675860 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for default + [0] = LAYOUT_universal( + 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_MINS , + KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , + KC_LCTL , KC_LGUI , KC_LALT ,LSFT_T(KC_LNG2),LT(1,KC_SPC),LT(3,KC_LNG1),KC_BSPC,LT(2,KC_ENT),LSFT_T(KC_LNG2),KC_RALT,KC_RGUI, KC_RSFT + ), + + [1] = LAYOUT_universal( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_RBRC , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , + KC_F5 , KC_EXLM , S(KC_6) ,S(KC_INT3), S(KC_8) , S(KC_INT1), KC_BTN1 , KC_PGUP , KC_BTN2 , KC_SCLN , + S(KC_EQL),S(KC_LBRC),S(KC_7) , S(KC_2) ,S(KC_RBRC), KC_LBRC , KC_DLR , KC_PGDN , KC_BTN3 , KC_F11 , + KC_INT1 , KC_EQL , S(KC_3) , _______ , _______ , _______ , TO(2) , TO(0) , _______ , KC_RALT , KC_RGUI , KC_F12 + ), + + [2] = LAYOUT_universal( + KC_TAB , KC_7 , KC_8 , KC_9 , KC_MINS , KC_NUHS , _______ , KC_BTN3 , _______ , KC_BSPC , + S(KC_QUOT), KC_4 , KC_5 , KC_6 ,S(KC_SCLN), S(KC_9) , KC_BTN1 , KC_UP , KC_BTN2 , KC_QUOT , + KC_SLSH , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_NUHS), KC_LEFT , KC_DOWN , KC_RGHT , _______ , + KC_ESC , KC_0 , KC_DOT , KC_DEL , KC_ENT , KC_BSPC , _______ , _______ , _______ , _______ , _______ , _______ + ), + + [3] = LAYOUT_universal( + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , _______ , SSNP_HOR , SSNP_VRT , SSNP_FRE , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , _______ , _______ , _______ , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , + QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h new file mode 100644 index 00000000000..7c18d0969f7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c new file mode 100644 index 00000000000..dca2006c475 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_universal( + 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_LCTL , KC_LGUI , KC_LALT , SCRL_MO , KC_SPC ,LT(1,KC_TAB),LT(1,KC_BSPC), KC_ENT , SCRL_MO , KC_RALT , KC_RGUI , KC_RSFT + ), + + [1] = LAYOUT_universal( + RGB_TOG , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , RGB_M_K , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , + QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT + ), +}; +// clang-format on + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h new file mode 100644 index 00000000000..b8849eed0cc --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c new file mode 100644 index 00000000000..beb81aa4574 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + 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_LCTL , KC_LGUI , KC_LALT , KC_ESC , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_ESC , KC_RALT , KC_RGUI , KC_RSFT + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball39/readme.md b/keyboards/yowkees/keyball/keyball39/readme.md new file mode 100644 index 00000000000..6076b3f2917 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/readme.md @@ -0,0 +1,21 @@ +# Keyball39 + +![Keyball39](../../../../keyball39/doc/rev1/images/kb39_001.jpg) + +A split keyboard with 39 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: Keyball39 PCB, ProMicro +* Hardware Availability: + * + * + +Make example for this keyboard (after setting up your build environment): + + make keyball/keyball39:default + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/keyball39/rules.mk b/keyboards/yowkees/keyball/keyball39/rules.mk new file mode 100644 index 00000000000..0dfde5b3dd9 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball39/rules.mk @@ -0,0 +1,49 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Keyball39 is split keyboard. +SPLIT_KEYBOARD = yes + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += drivers/pmw3360/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/keyball44/.noci b/keyboards/yowkees/keyball/keyball44/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/yowkees/keyball/keyball44/config.h b/keyboards/yowkees/keyball/keyball44/config.h new file mode 100644 index 00000000000..b2282c2a6de --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters +#define MATRIX_ROWS (4 * 2) // split keyboard +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_MASKED +#define DEBOUNCE 5 +#define DIODE_DIRECTION COL2ROW + +// Split parameters +#define SOFT_SERIAL_PIN D2 +#define SPLIT_HAND_MATRIX_GRID F7, D4 +#define SPLIT_USB_DETECT +#ifdef OLED_ENABLE +# define SPLIT_OLED_ENABLE +#endif + +// If your PC does not recognize Keyball, try setting this macro. This macro +// increases the firmware size by 200 bytes, so it is disabled by default, but +// it has been reported to work well in such cases. +//#define SPLIT_WATCHDOG_ENABLE + +#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 60 +# define RGBLED_SPLIT { 30, 30 } // (30 + 29) +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 150 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 15 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 30, 30 } +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball44/info.json b/keyboards/yowkees/keyball/keyball44/info.json new file mode 100644 index 00000000000..45b860f991f --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/info.json @@ -0,0 +1,67 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0400", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball44", + "rgblight": { + "driver": "ws2812" + }, + "layouts": { + "LAYOUT_no_ball": { + "layout": [ + { "label": "L00", "x": 0, "y": 0 }, + { "label": "L01", "x": 1, "y": 0 }, + { "label": "L02", "x": 2, "y": 0 }, + { "label": "L03", "x": 3, "y": 0 }, + { "label": "L04", "x": 4, "y": 0 }, + { "label": "L05", "x": 5, "y": 0 }, + { "label": "R05", "x": 7, "y": 0 }, + { "label": "R04", "x": 8, "y": 0 }, + { "label": "R03", "x": 9, "y": 0 }, + { "label": "R02", "x":10, "y": 0 }, + { "label": "R01", "x":11, "y": 0 }, + { "label": "R00", "x":12, "y": 0 }, + + { "label": "L10", "x": 0, "y": 1 }, + { "label": "L11", "x": 1, "y": 1 }, + { "label": "L12", "x": 2, "y": 1 }, + { "label": "L13", "x": 3, "y": 1 }, + { "label": "L14", "x": 4, "y": 1 }, + { "label": "L15", "x": 5, "y": 1 }, + { "label": "R15", "x": 7, "y": 1 }, + { "label": "R14", "x": 8, "y": 1 }, + { "label": "R13", "x": 9, "y": 1 }, + { "label": "R12", "x":10, "y": 1 }, + { "label": "R11", "x":11, "y": 1 }, + { "label": "R10", "x":12, "y": 1 }, + + { "label": "L20", "x": 0, "y": 2 }, + { "label": "L21", "x": 1, "y": 2 }, + { "label": "L22", "x": 2, "y": 2 }, + { "label": "L23", "x": 3, "y": 2 }, + { "label": "L24", "x": 4, "y": 2 }, + { "label": "L25", "x": 5, "y": 2 }, + { "label": "R25", "x": 7, "y": 2 }, + { "label": "R24", "x": 8, "y": 2 }, + { "label": "R23", "x": 9, "y": 2 }, + { "label": "R22", "x":10, "y": 2 }, + { "label": "R21", "x":11, "y": 2 }, + { "label": "R20", "x":12, "y": 2 }, + + { "label": "L31", "x": 1, "y": 3 }, + { "label": "L32", "x": 2, "y": 3 }, + { "label": "L33", "x": 3, "y": 3 }, + { "label": "L34", "x": 4, "y": 3 }, + { "label": "L35", "x": 5, "y": 3 }, + { "label": "R35", "x": 7, "y": 3 }, + { "label": "R34", "x": 8, "y": 3 }, + { "label": "R33", "x": 9, "y": 3 }, + { "label": "R32", "x":10, "y": 3 }, + { "label": "R31", "x":11, "y": 3 } + ] + } + } +} diff --git a/keyboards/yowkees/keyball/keyball44/keyball44.c b/keyboards/yowkees/keyball/keyball44/keyball44.c new file mode 100644 index 00000000000..2fc24dfb0ac --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keyball44.c @@ -0,0 +1,46 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off +matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b00111111, + 0b00111111, + 0b00111111, + 0b00111110, + 0b00111111, + 0b00111111, + 0b00111111, + 0b00111110, +}; +// clang-format on + +void keyball_on_adjust_layout(keyball_adjust_t v) { +#ifdef RGBLIGHT_ENABLE + // adjust RGBLIGHT's clipping and effect ranges + uint8_t lednum_this = keyball.this_have_ball ? 29 : 30; + uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 29 : 30; + rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); + rgblight_set_effect_range(0, lednum_this + lednum_that); +#endif +} diff --git a/keyboards/yowkees/keyball/keyball44/keyball44.h b/keyboards/yowkees/keyball/keyball44/keyball44.h new file mode 100644 index 00000000000..0a39a4fa3d7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keyball44.h @@ -0,0 +1,97 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L31, L32, L33, L34, L35, R35, R34, R31 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, R31, KC_NO, KC_NO, R34, R35 }, \ + } + +#define LAYOUT_left_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L31, L34, L35, R35, R34, R33, R32, R31 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, L31, KC_NO, KC_NO, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, R31, R32, R33, R34, R35 }, \ + } + +#define LAYOUT_dual_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L31, L34, L35, R35, R34, R31 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, L31, KC_NO, KC_NO, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, R31, KC_NO, KC_NO, R34, R35 }, \ + } + +#define LAYOUT_no_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L31, L32, L33, L34, L35, R35, R34, R33, R32, R31 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, R31, R32, R33, R34, R35 }, \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball +#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h new file mode 100644 index 00000000000..ec062cf45e0 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c new file mode 100644 index 00000000000..9446f052dc6 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for default + [0] = LAYOUT_universal( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_INT1 , + KC_LALT,KC_LGUI,LCTL_T(KC_LNG2) ,LT(1,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT), RCTL_T(KC_LNG2), KC_RALT , KC_PSCR + ), + + [1] = LAYOUT_universal( + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , + SSNP_HOR , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), + + [2] = LAYOUT_universal( + _______ ,S(KC_QUOT), KC_7 , KC_8 , KC_9 , S(KC_8) , S(KC_9) , S(KC_1) , S(KC_6) , KC_LBRC , S(KC_4) , _______ , + _______ ,S(KC_SCLN), KC_4 , KC_5 , KC_6 , KC_RBRC , KC_NUHS , KC_MINS , S(KC_EQL), S(KC_3) , KC_QUOT , S(KC_2) , + _______ ,S(KC_MINS), KC_1 , KC_2 , KC_3 ,S(KC_RBRC), S(KC_NUHS),S(KC_INT1), KC_EQL ,S(KC_LBRC),S(KC_SLSH),S(KC_INT3), + KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ + ), + + [3] = LAYOUT_universal( + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , _______ , KBC_SAVE , + QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h new file mode 100644 index 00000000000..7c18d0969f7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c new file mode 100644 index 00000000000..9a32b9d4855 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_universal( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_LGUI , KC_LALT , SCRL_MO , KC_SPC , LT(1,KC_TAB), LT(1,KC_BSPC), KC_ENT , SCRL_MO , KC_RALT , KC_RGUI + ), + + [1] = LAYOUT_universal( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , _______ , KBC_SAVE , + QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT + ), +}; +// clang-format on + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h new file mode 100644 index 00000000000..b8849eed0cc --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c new file mode 100644 index 00000000000..194c6d837c7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_DEL , KC_BSPC , KC_ENT , KC_RALT , KC_RGUI , KC_RCTL + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/readme.md b/keyboards/yowkees/keyball/keyball44/readme.md new file mode 100644 index 00000000000..4707f2c6574 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/readme.md @@ -0,0 +1,20 @@ +# Keyball44 + +![Keyball44](../../../../keyball44/doc/rev1/images/kb44_001.jpg) + +A split keyboard with 44 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: Keyball44 PCB, ProMicro +* Hardware Availability: + * + +Make example for this keyboard (after setting up your build environment): + + make keyball/keyball44:default + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/keyball44/rules.mk b/keyboards/yowkees/keyball/keyball44/rules.mk new file mode 100644 index 00000000000..77004677fad --- /dev/null +++ b/keyboards/yowkees/keyball/keyball44/rules.mk @@ -0,0 +1,49 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Keyball44 is split keyboard. +SPLIT_KEYBOARD = yes + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += drivers/pmw3360/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/keyball46/.noci b/keyboards/yowkees/keyball/keyball46/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/yowkees/keyball/keyball46/config.h b/keyboards/yowkees/keyball/keyball46/config.h new file mode 100644 index 00000000000..d3592fec608 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters (Keyball61 is duplex matrix) +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_MASKED +#define DEBOUNCE 5 +#define DIODE_DIRECTION COL2ROW + +// Split parameters +#define SOFT_SERIAL_PIN D2 +//#define SPLIT_HAND_MATRIX_GRID F7, B5 // for ball +//#define SPLIT_HAND_MATRIX_GRID F6, B5 // for noball +#define SPLIT_USB_DETECT +#ifdef OLED_ENABLE +# define SPLIT_OLED_ENABLE +#endif + +// If your PC does not recognize Keyball, try setting this macro. This macro +// increases the firmware size by 200 bytes, so it is disabled by default, but +// it has been reported to work well in such cases. +//#define SPLIT_WATCHDOG_ENABLE + +#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 14 +# define RGBLED_SPLIT { 7, 7 } +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 255 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 17 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 7, 7 } +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md b/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md new file mode 100644 index 00000000000..fb2b42467ca --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md @@ -0,0 +1,49 @@ +# Differences from V1 + +* `KEYBALL_SCROLL_DIVIDER` - deleted + + V2 is able to change scroll divider dynamically by keycodes: + + * `SCRL_DVI` - increment scroll divider (maximum 7) + * `SCRL_DVD` - decrement scroll divider (mininum 1) + + The effect of scroll divider is changed. + It is applied as `1 / (2 ^ (n-1))`. + Therefore, its divider will be like this table: + + Value | Divider + -----:|-------: + 1 | 1 / 1 + 2 | 1 / 2 + 3 | 1 / 4 + 4 | 1 / 8 + 5 | 1 / 16 + 6 | 1 / 32 + 7 | 1 / 64 + + Default is 4, it can be changed by defining `KEYBALL_SCROLL_DIV_DEFAULT` in your config.h + +* `KEYBALL_POINTER_DIVIDER` - deleted + + V2 controls resolution (CPI) of optical sensor PMW3360DM directly. + The minimum is 100, and the maximum is 12000, with 100 step. + + CPI can be changed by keycodes: + + * `CPI_I1K` - increase 1000 CPI + * `CPI_I100` - increase 100 CPI + * `CPI_D100` - decrease 100 CPI + * `CPI_D1K` - decrease 1000 CPI + + Default is 500, it can be changed by defiing `KEYBALL_CPI_DEFAULT` in your + config.h + +* `void keyball_process_trackball_default()` API - deleted + +* `void keyball_process_trackball_user()` overridable function - deleted + +* `TRACKBALL_MAX_NUMBER` constant - deleted + +* `TRACKBALL_SAMPLE_COUNT` - deleted + + V2 controls resolution (CPI) of optical sensor PMW3360DM directly. diff --git a/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md b/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md new file mode 100644 index 00000000000..4a102b7d41f --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md @@ -0,0 +1,154 @@ +# Keyball のカスタマイズ可能な機能 + +## キーマップで利用可能な Keyball の機能 + +### `bool keyball_get_scroll_mode(void)` API + +トラックボールの現在のスクロールモードを取得します。 + +### `void keyball_set_scroll_mode(bool mode)` API + +トラックボールのスクロールモードを変更します。 + +### `KEYBALL_SCROLL_DIVIDER` + +スクロールモードではトラックボールの移動量を `KEYBALL_SCROLL_DIVIDER` で割るこ +とで程よいスクロール量に調整しています。 + +各キーマップの config.h で設定できます。デフォルトは `10` で `0` 以下の値を設定 +するとコンパイルエラーになります。 + +### `KEYBALL_POINTER_DIVIDER` + +トラックボールによるポインタの移動量を `KEYBALL_POINTER_DIVIDER` で割ることで調 +整できます。 + +各キーマップの config.h で設定できます。デフォルトは `1` で `0` 以下の値を設定 +するとコンパイルエラーになります。 + +### `void keyball_process_trackball_default()` API + +トラックボールイベントのデフォルトハンドラです。1つ目のトラックボールはマウスポ +インタに、2つ目のトラックボールはスクロール量に反映されます。 + +### `void keyball_process_trackball_user()` オーバーライド可能な関数 + +トラックボールの移動方法を独自に定義できます。トラックボールの移動量をOLEDに表 +示したい時などに `keyball_process_trackball_default` と合わせて利用できます。 + +例: + +```c +void keyball_process_trackball_user( + const trackball_delta_t *primary, + const trackball_delta_t *secondary) { + // FIXME: modify or apply deltas for your purpose. +} +``` + +## トラックボールドライバ + +Keyballに搭載されているトラックボールのドライバーです。 + +### `TRACKBALL_MAX_NUMBER` 定数 + +サポート可能な最大のトラックボール数で現在は `2` です。 + +### `TRACKBALL_SAMPLE_COUNT` + +トラックボールでは光学センサから数回に渡って読み取った平均値をポインティングデ +バイスの移動量として送信しており `TRACKBALL_SAMPLE_COUNT` はその回数を指定する +設定項目です。 + +各キーマップの config.h で設定できます。デフォルトは `10` で `0` 以下の値を設定 +するとコンパイルエラーになります。 + +設定例: + +```c +#define TRACKBALL_SAMPLE_COUNT 100 +``` + +## OLED Kit + +OLED KitはKeyballのキーマップがOLEDにロゴなどの各種情報を表示するのを容易にする +ためのライブラリです。キーマップの rules.mk に `OLED_ENABLE = yes` を追 +加すれば自動的に利用されますが、キーマップで表示内容をカスタマイズすることもで +きます。 + +表示内容をカスタマイズするには keymap.c 等に以下の2つを追加してください。 + +1. `#include "lib/oledkit/oledkit.h"` +2. `void oledkit_render_info_user(void)` を定義する + +`oledkit_render_info_user()` はプライマリ(USBケーブルが接続されている)側のキー +ボードに情報を表示する際にコールバックされる関数です。レイヤー状態などの各種情 +報を `oled_write_*()` を用いてプライマリ側のOLEDに描画することができます。 + +例: keymaps/default/keymap.c より抜粋 + +```c +#ifdef OLED_ENABLE + +void oledkit_render_info_user(void) { + const char *n; + switch (get_highest_layer(layer_state)) { + case _QWERTY: + n = PSTR("Default"); + break; + case _RAISE: + n = PSTR("Raise"); + break; + case _LOWER: + n = PSTR("Lower"); + break; + case _BALL: + n = PSTR("Adjust"); + break; + default: + n = PSTR("Undefined"); + break; + } + oled_write_P(PSTR("Layer: "), false); + oled_write_ln_P(n, false); +} + +#endif +``` + +この例は現在アクティブなレイヤー名を表示するという、OLEDの良くある利用方法で +す。 + +以下では OLED Kit の設定項目を解説します。 + +### `OLEDKIT_DISABLE` define マクロ + +OLED Kitを無効化する設定項目です。各キーマップでOLED Kitを使いたくない場合、す +なわちOLED表示を完全に自身でコントロールしたい場合に設定してください。 + +各キーマップの config.h で設定できます。 + +設定例: + +```c +#define OLEDKIT_DISABLE +``` + +### `oledkit_render_info_user()` オーバーライド可能関数 + +`oledkit_render_info_user()` 関数を定義するとプライマリ側のOLEDに表示する内容を +カスタマイズできます。デフォルトではロゴを表示するようになっています。 + +各キーマップの keymap.c で定義できます。 + +設定例は上述してあります。 + +### `oledkit_render_logo_user()` オーバーライド可能関数 + +`oledkit_render_logo_user` 関数を定義するとセカンダリ(USBケーブルが接続されてい +ない)側のOLEDに表示する内容をカスタマイズできます。デフォルトではロゴを表示する +ようになっています。ただしキーボードとしての主要な情報はほぼプライマリ側に集約 +されているため、アクティブなレイヤーやタイプしたキーなどの情報を表示することは +できません。 + +各キーマップの keymap.c で定義できます。 diff --git a/keyboards/yowkees/keyball/keyball46/info.json b/keyboards/yowkees/keyball/keyball46/info.json new file mode 100644 index 00000000000..df2efb1e918 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/info.json @@ -0,0 +1,218 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0001", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball46", + "url": "", + "maintainer": "Yowkees", + "width": 17.5, + "height": 4.5, + "rgblight": { + "driver": "ws2812" + }, + "layouts": { + "LAYOUT_right_ball": { + "layout": [ + {"label":"L00", "x":0, "y":1.18}, + {"label":"L01", "x":1, "y":1.03}, + {"label":"L02", "x":2, "y":0.35}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0.05}, + {"label":"L05", "x":5, "y":0.10}, + {"label":"R00", "x":11.5, "y":0.10}, + {"label":"R01", "x":12.5, "y":0.05}, + {"label":"R02", "x":13.5, "y":0}, + {"label":"R03", "x":14.5, "y":0.35}, + {"label":"R04", "x":15.5, "y":1.08}, + {"label":"R05", "x":16.5, "y":1.18}, + {"label":"L10", "x":0, "y":2.18}, + {"label":"L11", "x":1, "y":2.03}, + {"label":"L12", "x":2, "y":1.35}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1.05}, + {"label":"L15", "x":5, "y":1.10}, + {"label":"R10", "x":11.5, "y":1.10}, + {"label":"R11", "x":12.5, "y":1.05}, + {"label":"R12", "x":13.5, "y":1}, + {"label":"R13", "x":14.5, "y":1.35}, + {"label":"R14", "x":15.5, "y":2.03}, + {"label":"R15", "x":16.5, "y":2.18}, + {"label":"L20", "x":0, "y":3.18}, + {"label":"L21", "x":1, "y":3.03}, + {"label":"L22", "x":2, "y":2.35}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2.05}, + {"label":"R20", "x":11.5, "y":2.10}, + {"label":"R21", "x":12.5, "y":2.05}, + {"label":"R22", "x":13.5, "y":2}, + {"label":"R23", "x":14.5, "y":2.35}, + {"label":"R24", "x":15.5, "y":3.03}, + {"label":"R25", "x":16.5, "y":3.18}, + {"label":"L30", "x":0, "y":4.18}, + {"label":"L31", "x":1, "y":4.03}, + {"label":"L32", "x":2, "y":3.25}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3.05}, + {"label":"L35", "x":5.25, "y":3.10}, + {"label":"R31", "x":10.25, "y":3.20}, + {"label":"R32", "x":11.5, "y":3.10}, + {"label":"R33", "x":12.5, "y":3.05}, + {"label":"R34", "x":13.5, "y":3.05}, + {"label":"R35", "x":14.5, "y":3.05} + ] + }, + "LAYOUT_left_ball": { + "layout": [ + {"label":"L00", "x":0, "y":1.18}, + {"label":"L01", "x":1, "y":1.03}, + {"label":"L02", "x":2, "y":0.35}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0.05}, + {"label":"L05", "x":5, "y":0.10}, + {"label":"R00", "x":11.5, "y":0.10}, + {"label":"R01", "x":12.5, "y":0.05}, + {"label":"R02", "x":13.5, "y":0}, + {"label":"R03", "x":14.5, "y":0.35}, + {"label":"R04", "x":15.5, "y":1.08}, + {"label":"R05", "x":16.5, "y":1.18}, + {"label":"L10", "x":0, "y":2.18}, + {"label":"L11", "x":1, "y":2.03}, + {"label":"L12", "x":2, "y":1.35}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1.05}, + {"label":"L15", "x":5, "y":1.10}, + {"label":"R10", "x":11.5, "y":1.10}, + {"label":"R11", "x":12.5, "y":1.05}, + {"label":"R12", "x":13.5, "y":1}, + {"label":"R13", "x":14.5, "y":1.35}, + {"label":"R14", "x":15.5, "y":2.03}, + {"label":"R15", "x":16.5, "y":2.18}, + {"label":"L20", "x":0, "y":3.18}, + {"label":"L21", "x":1, "y":3.03}, + {"label":"L22", "x":2, "y":2.35}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2.05}, + {"label":"L25", "x":5, "y":2.10}, + {"label":"R21", "x":12.5, "y":2.05}, + {"label":"R22", "x":13.5, "y":2}, + {"label":"R23", "x":14.5, "y":2.35}, + {"label":"R24", "x":15.5, "y":3.03}, + {"label":"R25", "x":16.5, "y":3.18}, + {"label":"L30", "x":0, "y":4.18}, + {"label":"L31", "x":1, "y":4.03}, + {"label":"L32", "x":2, "y":3.25}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3.05}, + {"label":"R30", "x":9.25, "y":3.50}, + {"label":"R31", "x":10.25, "y":3.20}, + {"label":"R32", "x":11.5, "y":3.10}, + {"label":"R33", "x":12.5, "y":3.05}, + {"label":"R34", "x":13.5, "y":3.05}, + {"label":"R35", "x":14.5, "y":3.05} + ] + }, + "LAYOUT_double_balls": { + "layout": [ + {"label":"L00", "x":0, "y":1.18}, + {"label":"L01", "x":1, "y":1.03}, + {"label":"L02", "x":2, "y":0.35}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0.05}, + {"label":"L05", "x":5, "y":0.10}, + {"label":"R00", "x":11.5, "y":0.10}, + {"label":"R01", "x":12.5, "y":0.05}, + {"label":"R02", "x":13.5, "y":0}, + {"label":"R03", "x":14.5, "y":0.35}, + {"label":"R04", "x":15.5, "y":1.08}, + {"label":"R05", "x":16.5, "y":1.18}, + {"label":"L10", "x":0, "y":2.18}, + {"label":"L11", "x":1, "y":2.03}, + {"label":"L12", "x":2, "y":1.35}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1.05}, + {"label":"L15", "x":5, "y":1.10}, + {"label":"R10", "x":11.5, "y":1.10}, + {"label":"R11", "x":12.5, "y":1.05}, + {"label":"R12", "x":13.5, "y":1}, + {"label":"R13", "x":14.5, "y":1.35}, + {"label":"R14", "x":15.5, "y":2.03}, + {"label":"R15", "x":16.5, "y":2.18}, + {"label":"L20", "x":0, "y":3.18}, + {"label":"L21", "x":1, "y":3.03}, + {"label":"L22", "x":2, "y":2.35}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2.05}, + {"label":"L25", "x":5, "y":2.10}, + {"label":"R20", "x":11.5, "y":2.10}, + {"label":"R21", "x":12.5, "y":2.05}, + {"label":"R22", "x":13.5, "y":2}, + {"label":"R23", "x":14.5, "y":2.35}, + {"label":"R24", "x":15.5, "y":3.03}, + {"label":"R25", "x":16.5, "y":3.18}, + {"label":"L30", "x":0, "y":4.18}, + {"label":"L31", "x":1, "y":4.03}, + {"label":"L32", "x":2, "y":3.25}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3.05}, + {"label":"R31", "x":10.25, "y":3.20}, + {"label":"R32", "x":11.5, "y":3.10}, + {"label":"R33", "x":12.5, "y":3.05}, + {"label":"R34", "x":13.5, "y":3.05}, + {"label":"R35", "x":14.5, "y":3.05} + ] + }, + "LAYOUT_no_balls": { + "layout": [ + {"label":"L00", "x":0, "y":1.18}, + {"label":"L01", "x":1, "y":1.03}, + {"label":"L02", "x":2, "y":0.35}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0.05}, + {"label":"L05", "x":5, "y":0.10}, + {"label":"R00", "x":11.5, "y":0.10}, + {"label":"R01", "x":12.5, "y":0.05}, + {"label":"R02", "x":13.5, "y":0}, + {"label":"R03", "x":14.5, "y":0.35}, + {"label":"R04", "x":15.5, "y":1.08}, + {"label":"R05", "x":16.5, "y":1.18}, + {"label":"L10", "x":0, "y":2.18}, + {"label":"L11", "x":1, "y":2.03}, + {"label":"L12", "x":2, "y":1.35}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1.05}, + {"label":"L15", "x":5, "y":1.10}, + {"label":"R10", "x":11.5, "y":1.10}, + {"label":"R11", "x":12.5, "y":1.05}, + {"label":"R12", "x":13.5, "y":1}, + {"label":"R13", "x":14.5, "y":1.35}, + {"label":"R14", "x":15.5, "y":2.03}, + {"label":"R15", "x":16.5, "y":2.18}, + {"label":"L20", "x":0, "y":3.18}, + {"label":"L21", "x":1, "y":3.03}, + {"label":"L22", "x":2, "y":2.35}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2.05}, + {"label":"R21", "x":12.5, "y":2.05}, + {"label":"R22", "x":13.5, "y":2}, + {"label":"R23", "x":14.5, "y":2.35}, + {"label":"R24", "x":15.5, "y":3.03}, + {"label":"R25", "x":16.5, "y":3.18}, + {"label":"L30", "x":0, "y":4.18}, + {"label":"L31", "x":1, "y":4.03}, + {"label":"L32", "x":2, "y":3.25}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3.05}, + {"label":"L35", "x":5.25, "y":3.10}, + {"label":"R30", "x":9.25, "y":3.50}, + {"label":"R31", "x":10.25, "y":3.20}, + {"label":"R32", "x":11.5, "y":3.10}, + {"label":"R33", "x":12.5, "y":3.05}, + {"label":"R34", "x":13.5, "y":3.05}, + {"label":"R35", "x":14.5, "y":3.05} + ] + } + } +} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.c b/keyboards/yowkees/keyball/keyball46/keyball46.c new file mode 100644 index 00000000000..14283834c60 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keyball46.c @@ -0,0 +1,66 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off +matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b0111111, + 0b0111111, + 0b0011111, + 0b0011111, + + 0b0111111, + 0b0111111, + 0b0011111, + 0b0011111, +}; +// clang-format on + +////////////////////////////////////////////////////////////////////////////// + +static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { + extern void matrix_io_delay(void); + setPinInputHigh(in_pin); + setPinOutput(out_pin); + writePinLow(out_pin); + wait_us(1); + uint8_t pin_state = readPin(in_pin); + setPinInputHigh(out_pin); + matrix_io_delay(); + return pin_state; +} + +bool is_keyboard_left(void) { + return !peek_matrix_intersection(keyball.this_have_ball ? F7 : F6, B5); +} + +////////////////////////////////////////////////////////////////////////////// + +void keyball_on_adjust_layout(keyball_adjust_t v) { + if (v == KEYBALL_ADJUST_PRIMARY) { + // adjust matrix mask + bool is_left = is_keyboard_left(); + matrix_mask[(is_left ? 2 : 6) + (keyball.this_have_ball ? 0 : 1)] = 0b0111111; + matrix_mask[(is_left ? 6 : 2) + (keyball.that_have_ball ? 0 : 1)] = 0b0111111; + } +} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.h b/keyboards/yowkees/keyball/keyball46/keyball46.h new file mode 100644 index 00000000000..df443475fb7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keyball46.h @@ -0,0 +1,113 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, KC_NO}, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, KC_NO } \ + } + +#define LAYOUT_left_ball( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, KC_NO }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, KC_NO }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + +#define LAYOUT_double_balls( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, KC_NO }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, KC_NO } \ + } + +#define LAYOUT_no_balls( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, KC_NO }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + +#define LAYOUT_universal( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.json b/keyboards/yowkees/keyball/keyball46/keyball46.json new file mode 100644 index 00000000000..aed56b9c0a9 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keyball46.json @@ -0,0 +1,32 @@ +{ + "name": "Keyball46", + "vendorId": "0x5957", + "productId": "0x0001", + "lighting": "qmk_rgblight", + "matrix": { "rows": 8, "cols": 6 }, + "layouts": { + "keymap": [ + [{"x":2,"c":"#aaaaaa"},"0,2",{"x":8.25},"4,3"], + [{"y":-0.87,"x":1},"0,1",{"x":1},"0,3",{"x":6.25},"4,4",{"x":1},"4,2"], + [{"y":-0.88,"x":4},"0,4",{"x":4.25},"4,5"], + [{"y":-0.87},"0,0",{"x":12.25},"4,1",{"c":"#777777"},"4,0"], + [{"y":-0.88,"x":5,"c":"#aaaaaa","h":1.5},"0,5"], + [{"y":-0.5,"x":2},"1,2",{"x":8.25},"5,3"], + [{"y":-0.87,"x":1},"1,1",{"x":1},"1,3",{"x":6.25},"5,4",{"x":1},"5,2"], + [{"y":-0.88,"x":4},"1,4",{"x":4.25},"5,5"], + [{"y":-0.87},"1,0",{"x":12.25},"5,1",{"c":"#777777"},"5,0"], + [{"y":-0.88,"x":6.25},"2,5",{"x":0.75},"7,5"], + [{"y":-0.5,"x":2,"c":"#aaaaaa"},"2,2",{"x":2,"h":1.5},"1,5",{"x":5.25},"6,3"], + [{"y":-0.87,"x":1},"2,1",{"x":1},"2,3",{"x":6.25},"6,4",{"x":1},"6,2"], + [{"y":-0.88,"x":4},"2,4",{"x":4.25},"6,5"], + [{"y":-0.87},"2,0",{"x":12.25},"6,1",{"c":"#777777"},"6,0"], + [{"y":-0.25,"x":1},"3,1",{"x":10.25},"7,2"], + [{"y":-0.75},"3,0",{"x":12.25},"7,1","7,0"], + [{"y":-0.88,"x":2.5},"3,2",{"x":7.25},"7,3"], + [{"r":10,"y":-1.7,"x":4.3},"3,3"], + [{"r":20,"rx":6.5,"ry":4.25,"y":0.05,"x":-1.6},"3,4"], + [{"r":-60,"y":-1.4,"x":-1.1,"w":1.25},"3,5"], + [{"r":-10,"rx":0,"ry":0,"y":5.3,"x":8.75},"7,4"] + ] + } +} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46_left.json b/keyboards/yowkees/keyball/keyball46/keyball46_left.json new file mode 100644 index 00000000000..2835e61318a --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keyball46_left.json @@ -0,0 +1,32 @@ +{ + "name": "Keyball46_Left", + "vendorId": "0x5957", + "productId": "0x0002", + "lighting": "qmk_rgblight", + "matrix": { "rows": 8, "cols": 6 }, + "layouts": { + "keymap": [ + [{"y":1,"x":2},"0,2",{"x":9.75},"4,2"], + [{"y":-0.87,"x":1},"0,1",{"x":1},"0,3",{"x":7.75},"4,3",{"x":1},"4,1"], + [{"y":-0.88,"x":4},"0,4","0,5",{"x":3.75,"c":"#aaaaaa","h":1.5},"4,5",{"c":"#cccccc"},"4,4"], + [{"y":-0.87},"0,0",{"x":13.75},"4,0"], + [{"y":-0.38,"x":2},"1,2",{"x":9.75},"5,2"], + [{"y":-0.87,"x":1},"1,1",{"x":1},"1,3",{"x":7.75},"5,3",{"x":1},"5,1"], + [{"y":-0.88,"x":4},"1,4","1,5",{"x":0.25,"c":"#aaaaaa"},"3,5",{"x":1.25},"6,5",{"x":1.25,"c":"#cccccc"},"5,4"], + [{"y":-0.87},"1,0",{"x":13.75},"5,0"], + [{"y":-0.63,"x":9.75,"c":"#aaaaaa","h":1.5},"5,5"], + [{"y":-0.75,"x":2,"c":"#cccccc"},"2,2",{"x":9.75},"6,2"], + [{"y":-0.87,"x":1},"2,1",{"x":1},"2,3",{"x":7.75},"6,3",{"x":1},"6,1"], + [{"y":-0.88,"x":4},"2,4","2,5",{"x":4.75},"6,4"], + [{"y":-0.87},"2,0",{"x":13.75},"6,0"], + [{"y":-0.38,"x":2},"3,2"], + [{"y":-0.87,"x":1},"3,1",{"x":11.75},"7,1"], + [{"y":-0.75},"3,0",{"x":13.75},"7,0"], + [{"y":-0.88,"x":3.5,"c":"#aaaaaa"},"3,3",{"x":7.75},"7,2"], + [{"r":10,"rx":6.5,"ry":4.25,"y":0.55,"x":-1.65},"3,4"], + [{"r":-30,"rx":13,"y":-1.05,"x":-4.45,"h":1.25},"7,5"], + [{"r":-20,"y":-0.2,"x":-3.3},"7,4"], + [{"r":-10,"rx":0,"ry":0,"y":6.55,"x":10},"7,3"] + ] + } +} diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h new file mode 100644 index 00000000000..e44b0be8553 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#undef PRODUCT_ID +#define PRODUCT_ID 0x0005 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c new file mode 100644 index 00000000000..98b1bc6192d --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2021 @Yowkees + +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 . +*/ + +#include QMK_KEYBOARD_H + +enum keymap_layers { + _QWERTY, + _LOWER, + _RAISE, + _BALL, +}; + +///////////////////////////////////////////////////////////////////////////// +// Special key codes for shorthand + +// clang-format off + +// layer +#define KC_L_SPC LT(_LOWER, KC_SPC) +#define KC_R_ENT LT(_RAISE, KC_ENT) + +// shift_t +#define KC_S_EN LSFT_T(KC_LNG2) + +// original +#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust +#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock +#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space +#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete +#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space +#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete +// clang-format on + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_right_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, KC_SCLN, + //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| + KC_LCTL,KC_AL_CP, KC_G_BS, KC_L_SPC, KC_S_EN, KC_A_JA, KC_R_ENT,KC_G_DEL, KC_EXLM, KC_TAB, KC_PSCR + //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_RAISE] = LAYOUT_right_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_BSLS, KC_7, KC_8, KC_9, KC_PLUS, KC_LPRN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_RPRN, _______, KC_LEFT, KC_UP, KC_RGHT, _______, KC_F12, + //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| + KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, _______, _______, KC_DOWN, _______, _______, _______, + //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| + _______, KC_0, KC_ENT, KC_A_DEL, KC_SPC, _______, _______, _______, _______, _______, _______ + //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_LOWER] = LAYOUT_right_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LPRN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_HASH, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT, KC_RPRN, _______, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, + //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| + KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, _______, _______, KC_PGDN, _______, _______, _______, + //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| + _______, KC_PERC, _______, _______, _______, _______, KC_A_BS, _______, _______, _______, _______ + //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_BALL] = LAYOUT_right_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| + RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, + //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| + QK_BOOT, EE_CLR , _______, _______, _______, _______, _______,SCRL_DVD, SCRL_DVI, _______, KBC_RST + //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == _BALL); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h new file mode 100644 index 00000000000..dc31a732168 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +// PMW3360 performance counter. Require CONSOLE_ENABLE too. +//#define DEBUG_PMW3360_SCAN_RATE + +// Disable mouse report rate throttling. +//#define KEYBALL_REPORTMOUSE_INTERVAL 0 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c new file mode 100644 index 00000000000..6b70405d514 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_universal( + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_LBRC , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_RBRC , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_Z , KC_X , KC_C , KC_V , KC_B , _______ , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_BSLS , + KC_LCTL , KC_APP , MO(1) , SCRL_MO ,KC_MS_BTN1, KC_ENT , _______ , KC_SPC , KC_RALT , MO(1) , KC_RGUI , KC_RSFT + ), + + [1] = LAYOUT_universal( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , + QK_BOOT , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , SCRL_DVD , SCRL_DVI , _______ , KBC_RST + ), +}; +// clang-format on + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif + +void keyboard_post_init_user(void) { +#if defined(DEBUG_PMW3360_SCAN_RATE) && defined(CONSOLE_ENABLE) + debug_enable = true; +#endif +} diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h new file mode 100644 index 00000000000..c7088883686 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c new file mode 100644 index 00000000000..2ed175df561 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_right_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, KC_SCLN, + //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ESC, KC_ENT, KC_DEL, KC_EXLM, KC_TAB, KC_RSFT + //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h new file mode 100644 index 00000000000..bc3a2377560 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif + +#undef PRODUCT_ID +#define PRODUCT_ID 0x0003 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c new file mode 100644 index 00000000000..34366e2da93 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Test keymap for double balls configuration. + [0] = LAYOUT_double_balls( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + KC_ESC, KC_GRV, KC_LALT, KC_BSPC, KC_SPC, KC_ENT, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS + //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h new file mode 100644 index 00000000000..a17dff49a85 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif + +#undef PRODUCT_ID +#define PRODUCT_ID 0x0002 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c new file mode 100644 index 00000000000..7e2d315b365 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Test keymap for left ball configuration. + [0] = LAYOUT_left_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, + //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| + KC_ESC, KC_GRV, KC_LALT, KC_BSPC, KC_SPC, KC_ESC, KC_LGUI, KC_ENT, KC_DEL, KC_TAB, KC_RSFT + //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h new file mode 100644 index 00000000000..eedf25f4283 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +//# 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 + +#undef PRODUCT_ID +#define PRODUCT_ID 0x0003 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c new file mode 100644 index 00000000000..0c5f3621d4b --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2021 @Yowkees + +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 . +*/ + +#include QMK_KEYBOARD_H + +enum keymap_layers { + _QWERTY, + _LOWER, + _RAISE, + _BALL, +}; + +///////////////////////////////////////////////////////////////////////////// +// Special key codes for shorthand + +// clang-format off + +// layer +#define KC_L_SPC LT(_LOWER, KC_SPC) +#define KC_R_ENT LT(_RAISE, KC_ENT) + +// shift_t +#define KC_S_EN LSFT_T(KC_LNG2) + +// original +#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust +#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock +#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space +#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete +#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space +#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete +// clang-format on + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_double_balls( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + KC_ESC, KC_GRV, KC_LALT, KC_BSPC,KC_L_SPC, KC_R_ENT, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS + //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_RAISE] = LAYOUT_double_balls( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_HASH, KC_7, KC_8, KC_9, KC_PLUS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_AT, KC_EXLM, KC_AMPR, KC_PIPE, KC_PERC, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, KC_RSFT, + //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + KC_ESC, KC_GRV, KC_0, KC_LNG2 ,KC_A_DEL, _______, _______, KC_LPRN, KC_RPRN, KC_BSLS + //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_LOWER] = LAYOUT_double_balls( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, _______, _______, KC_DOWN, _______, _______, _______, _______, KC_PGDN, _______, _______, KC_RSFT, + //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + KC_ESC, KC_GRV, KC_LALT, _______, _______, KC_A_BS,KC_LNG1 , KC_LPRN, KC_RPRN, KC_BSLS + //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + + [_BALL] = LAYOUT_double_balls( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, + //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + QK_BOOT, EE_CLR , _______, _______, _______, _______,SCRL_DVD, SCRL_DVI, _______, KBC_RST + //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' + ), + +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == _BALL); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk new file mode 100644 index 00000000000..d80df3fa49a --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +VIA_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h new file mode 100644 index 00000000000..30a67de66bb --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +//# 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 + +#undef PRODUCT_ID +#define PRODUCT_ID 0x0002 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c new file mode 100644 index 00000000000..e32244bbad3 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2021 @Yowkees + +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 . +*/ + +#include QMK_KEYBOARD_H + +enum keymap_layers { + _QWERTY, + _LOWER, + _RAISE, + _BALL, +}; + +///////////////////////////////////////////////////////////////////////////// +// Special key codes for shorthand + +// clang-format off + +// layer +#define KC_L_SPC LT(_LOWER, KC_SPC) +#define KC_R_ENT LT(_RAISE, KC_ENT) + +// shift_t +#define KC_S_EN LSFT_T(KC_LNG2) + +// original +#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust +#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock +#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space +#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete +#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space +#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete +// clang-format on + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_left_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, + //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| + KC_LCTL, KC_PSCR,KC_AL_CP, KC_G_BS, KC_SPC, KC_A_JA, KC_S_EN, KC_R_ENT, KC_G_DEL, KC_EXLM, KC_TAB + //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' + ), + + [_RAISE] = LAYOUT_left_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_BSLS, KC_7, KC_8, KC_9, KC_PLUS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_RPRN, KC_LEFT, KC_UP, KC_RGHT, _______, KC_F12, + //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| + _______, KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, _______, KC_DOWN, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| + _______, _______, KC_0, KC_ENT,KC_A_DEL, KC_SPC, _______, _______, _______, _______, _______ + //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' + ), + + [_LOWER] = LAYOUT_left_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_HASH, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT, KC_RPRN, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, + //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| + _______, KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, _______, KC_PGDN, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| + _______, _______, KC_0, _______, _______, _______, _______, KC_A_BS, _______, _______, _______ + //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' + ), + + [_BALL] = LAYOUT_left_ball( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| + RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, + //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| + QK_BOOT, EE_CLR , _______, _______, _______, _______, _______, SCRL_DVD, SCRL_DVI, _______, KBC_RST + //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' + ), + +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == _BALL); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk new file mode 100644 index 00000000000..d80df3fa49a --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +VIA_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/readme.md b/keyboards/yowkees/keyball/keyball46/readme.md new file mode 100644 index 00000000000..55e35184d8b --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/readme.md @@ -0,0 +1,25 @@ +# Keyball46 + +![Keyball46](../../../../keyball46/doc/rev1/images/yw001.jpg) + +A split keyboard with 4x6 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: Keyball46 PCB, ProMicro +* Hardware Availability: + Unavailable + * ~~[BOOTH](https://yowkees.booth.pm/)~~ + +Make example for this keyboard (after setting up your build environment): + + make keyball/keyball46:default + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. + +## Changes + +* Keyball46 firmware V2 has some incompatibles with V1. See [document](./docs/diff_from_v1.md) for details. diff --git a/keyboards/yowkees/keyball/keyball46/rules.mk b/keyboards/yowkees/keyball/keyball46/rules.mk new file mode 100644 index 00000000000..7ed03f4f771 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball46/rules.mk @@ -0,0 +1,49 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Keyball46 is split keyboard. +SPLIT_KEYBOARD = yes + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += drivers/pmw3360/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/keyball61/.noci b/keyboards/yowkees/keyball/keyball61/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/yowkees/keyball/keyball61/config.h b/keyboards/yowkees/keyball/keyball61/config.h new file mode 100644 index 00000000000..47d92432208 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters (Keyball61 is duplex matrix) +#define MATRIX_ROWS (5 * 2) // split keyboard +#define MATRIX_COLS (4 * 2) // duplex matrix +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define MATRIX_MASKED +#define DEBOUNCE 5 + +// Split parameters +#define SOFT_SERIAL_PIN D2 +#define SPLIT_HAND_MATRIX_GRID F7, D7 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT +#define SPLIT_USB_DETECT + +#ifdef OLED_ENABLE +# define SPLIT_OLED_ENABLE +#endif + +// If your PC does not recognize Keyball, try setting this macro. This macro +// increases the firmware size by 200 bytes, so it is disabled by default, but +// it has been reported to work well in such cases. +//#define SPLIT_WATCHDOG_ENABLE + +#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_LED_COUNT 74 +# define RGBLED_SPLIT { 37, 37 } +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 120 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 12 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 37, 37 } +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define PMW33XX_CS_PIN B6 + +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN B1 +#define SPI_MOSI_PIN B2 +#define SPI_MISO_PIN B3 + +#define POINTING_DEVICE_ROTATION_90 +#define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/yowkees/keyball/keyball61/halconf.h b/keyboards/yowkees/keyball/keyball61/halconf.h new file mode 100644 index 00000000000..c09623ebfa4 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/halconf.h @@ -0,0 +1,25 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/yowkees/keyball/keyball61/info.json b/keyboards/yowkees/keyball/keyball61/info.json new file mode 100644 index 00000000000..c4a6f6f2796 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/info.json @@ -0,0 +1,86 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0100", + "device_version": "1.0.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "Keyball61", + "rgblight": { + "driver": "ws2812" + }, + "layouts": { + "LAYOUT_no_ball": { + "layout": [ + { "label": "L00", "x": 0, "y": 0 }, + { "label": "L01", "x": 1, "y": 0 }, + { "label": "L02", "x": 2, "y": 0 }, + { "label": "L03", "x": 3, "y": 0 }, + { "label": "L04", "x": 4, "y": 0 }, + { "label": "L05", "x": 5, "y": 0 }, + { "label": "R05", "x": 8, "y": 0 }, + { "label": "R04", "x": 9, "y": 0 }, + { "label": "R03", "x":10, "y": 0 }, + { "label": "R02", "x":11, "y": 0 }, + { "label": "R01", "x":12, "y": 0 }, + { "label": "R00", "x":13, "y": 0 }, + + { "label": "L10", "x": 0, "y": 1 }, + { "label": "L11", "x": 1, "y": 1 }, + { "label": "L12", "x": 2, "y": 1 }, + { "label": "L13", "x": 3, "y": 1 }, + { "label": "L14", "x": 4, "y": 1 }, + { "label": "L15", "x": 5, "y": 1 }, + { "label": "R15", "x": 8, "y": 1 }, + { "label": "R14", "x": 9, "y": 1 }, + { "label": "R13", "x":10, "y": 1 }, + { "label": "R12", "x":11, "y": 1 }, + { "label": "R11", "x":12, "y": 1 }, + { "label": "R10", "x":13, "y": 1 }, + + { "label": "L20", "x": 0, "y": 2 }, + { "label": "L21", "x": 1, "y": 2 }, + { "label": "L22", "x": 2, "y": 2 }, + { "label": "L23", "x": 3, "y": 2 }, + { "label": "L24", "x": 4, "y": 2 }, + { "label": "L25", "x": 5, "y": 2 }, + { "label": "R25", "x": 8, "y": 2 }, + { "label": "R24", "x": 9, "y": 2 }, + { "label": "R23", "x":10, "y": 2 }, + { "label": "R22", "x":11, "y": 2 }, + { "label": "R21", "x":12, "y": 2 }, + { "label": "R20", "x":13, "y": 2 }, + + { "label": "L30", "x": 0, "y": 3 }, + { "label": "L31", "x": 1, "y": 3 }, + { "label": "L32", "x": 2, "y": 3 }, + { "label": "L33", "x": 3, "y": 3 }, + { "label": "L34", "x": 4, "y": 3 }, + { "label": "L35", "x": 5, "y": 3 }, + { "label": "L36", "x": 6, "y": 3 }, + { "label": "R36", "x": 7, "y": 3 }, + { "label": "R35", "x": 8, "y": 3 }, + { "label": "R34", "x": 9, "y": 3 }, + { "label": "R33", "x":10, "y": 3 }, + { "label": "R32", "x":11, "y": 3 }, + { "label": "R31", "x":12, "y": 3 }, + { "label": "R30", "x":13, "y": 3 }, + + { "label": "L40", "x": 0, "y": 4 }, + { "label": "L41", "x": 1, "y": 4 }, + { "label": "L42", "x": 2, "y": 4 }, + { "label": "L43", "x": 3, "y": 4 }, + { "label": "L44", "x": 4, "y": 4 }, + { "label": "L45", "x": 5, "y": 4 }, + { "label": "L46", "x": 6, "y": 4 }, + { "label": "R46", "x": 7, "y": 4 }, + { "label": "R45", "x": 8, "y": 4 }, + { "label": "R44", "x": 9, "y": 4 }, + { "label": "R43", "x":10, "y": 4 }, + { "label": "R42", "x":11, "y": 4 }, + { "label": "R41", "x":12, "y": 4 }, + { "label": "R40", "x":13, "y": 4 } + ] + } + } +} diff --git a/keyboards/yowkees/keyball/keyball61/keyball61.c b/keyboards/yowkees/keyball/keyball61/keyball61.c new file mode 100644 index 00000000000..1c90f5945f1 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keyball61.c @@ -0,0 +1,48 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off +matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b01110111, + 0b01110111, + 0b01110111, + 0b11110111, + 0b11110111, + 0b01110111, + 0b01110111, + 0b01110111, + 0b11110111, + 0b11110111, +}; +// clang-format on + +void keyball_on_adjust_layout(keyball_adjust_t v) { +#ifdef RGBLIGHT_ENABLE + // adjust RGBLIGHT's clipping and effect ranges + uint8_t lednum_this = keyball.this_have_ball ? 34 : 37; + uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 34 : 37; + rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); + rgblight_set_effect_range(0, lednum_this + lednum_that); +#endif +} diff --git a/keyboards/yowkees/keyball/keyball61/keyball61.h b/keyboards/yowkees/keyball/keyball61/keyball61.h new file mode 100644 index 00000000000..857d83fda8c --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keyball61.h @@ -0,0 +1,109 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ + } + +#define LAYOUT_left_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ + } + +#define LAYOUT_dual_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L45, L46, R46, R45, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ + } + +#define LAYOUT_no_ball( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ + { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ + { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ + { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ + { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ + { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball +#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h new file mode 100644 index 00000000000..71e24111855 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +#define AUTO_MOUSE_DEFAULT_LAYER 2 diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c new file mode 100644 index 00000000000..9ab8d17b8ff --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + 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_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , + MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR + ), + + [1] = LAYOUT_universal( + S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), + S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), + S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , + _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), + _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ + ), + + [2] = LAYOUT_universal( + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ + ), + + [3] = LAYOUT_universal( + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , + QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_keyboard=true; + debug_mouse=true; + + +} + diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk new file mode 100644 index 00000000000..51604795596 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk @@ -0,0 +1,8 @@ +RGBLIGHT_ENABLE = no + +OLED_ENABLE = yes + +POINTING_DEVICE_ENABLE = yes + +CONSOLE_ENABLE = yes + diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h new file mode 100644 index 00000000000..7c18d0969f7 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c new file mode 100644 index 00000000000..34e1400dcdb --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_universal( + 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SCRL_TO , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_LGUI , KC_APP , KC_HOME , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI + ), + + [1] = LAYOUT_universal( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , + QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT + ), +}; +// clang-format on + +void keyboard_post_init_user(void) { +#ifdef CONSOLE_ENABLE + debug_enable = true; +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h new file mode 100644 index 00000000000..60cd183d54c --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c new file mode 100644 index 00000000000..5f1f8c673a5 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c @@ -0,0 +1,52 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_universal( + 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + KC_LGUI , KC_APP , KC_HOME , KC_END , KC_LALT , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball61/mcuconf.h b/keyboards/yowkees/keyball/keyball61/mcuconf.h new file mode 100644 index 00000000000..52b726a56d5 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/mcuconf.h @@ -0,0 +1,23 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#include_next + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/yowkees/keyball/keyball61/readme.md b/keyboards/yowkees/keyball/keyball61/readme.md new file mode 100644 index 00000000000..95fe4d42a3c --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/readme.md @@ -0,0 +1,21 @@ +# Keyball61 + +![Keyball61](../../../..//keyball61/doc/rev1/images/kb61_001.jpg) + +A split keyboard with 61 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: Keyball61 PCB, ProMicro +* Hardware Availability: + * + * + +Make example for this keyboard (after setting up your build environment): + + make keyball/keyball61:default + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/keyball61/rules.mk b/keyboards/yowkees/keyball/keyball61/rules.mk new file mode 100644 index 00000000000..d363d22f540 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/rules.mk @@ -0,0 +1,51 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Duplex matrix. +CUSTOM_MATRIX = lite +SRC += lib/duplexmatrix/duplexmatrix.c + +# Keyball61 is split keyboard. +SPLIT_KEYBOARD = yes + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pmw3360 + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c new file mode 100644 index 00000000000..97fa4217532 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c @@ -0,0 +1,177 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include +#include "quantum.h" +#include "matrix.h" +#include "debounce.h" + +#ifdef SPLIT_KEYBOARD +# include "split_common/split_util.h" +# include "split_common/transactions.h" +#endif + +#ifdef SPLIT_KEYBOARD +# define PINNUM_ROW (MATRIX_ROWS / 2) +# define ROWS_PER_HAND (MATRIX_ROWS / 2) +#else +# define PINNUM_ROW (MATRIX_ROWS) +# define ROWS_PER_HAND (MATRIX_ROWS) +#endif +#define PINNUM_COL (MATRIX_COLS / 2) + +#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) + +static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; +static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; + +static inline void set_pin_input(pin_t pin) { + setPinInputHigh(pin); +} + +static void set_pins_input(pin_t* pins, uint8_t n) { + for (uint8_t i = 0; i < n; i++) { + set_pin_input(pins[i]); + } +} + +static inline void set_pin_output(pin_t pin) { + setPinOutput(pin); + writePinLow(pin); +} + +static inline bool get_pin(pin_t pin) { + return readPin(pin); +} + +__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} + +static void duplex_scan_raw(matrix_row_t out_matrix[]) { + // scan column to row + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + set_pin_output(row_pins[row]); + matrix_output_select_delay(); + for (uint8_t col = 0; col < PINNUM_COL; col++) { + if (!get_pin(col_pins[col])) { + out_matrix[row] |= 1 << col; + } + } + set_pin_input(row_pins[row]); + matrix_output_unselect_delay(row, false); + } + + // scan row to column. + for (uint8_t col = 0; col < PINNUM_COL; col++) { + set_pin_output(col_pins[col]); + matrix_output_select_delay(); + matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (!get_pin(row_pins[row])) { + out_matrix[row] |= shifter; + } + } + set_pin_input(col_pins[col]); + matrix_output_unselect_delay(col, false); + } + + duplex_scan_raw_post_kb(out_matrix); +} + +static bool duplex_scan(matrix_row_t current_matrix[]) { + bool changed = false; + matrix_row_t tmp[MATRIX_ROWS] = {0}; + + duplex_scan_raw(tmp); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (tmp[row] != current_matrix[row]) { + changed = true; + current_matrix[row] = tmp[row]; + } + } + return changed; +} + +#ifdef SPLIT_KEYBOARD +static uint8_t thisHand, thatHand; +#else +# define thisHand 0 +#endif + +void matrix_init_custom(void) { +#ifdef SPLIT_KEYBOARD + split_pre_init(); +#endif + + set_pins_input(col_pins, PINNUM_COL); + set_pins_input(row_pins, PINNUM_ROW); + +#ifdef SPLIT_KEYBOARD + thisHand = isLeftHand ? 0 : ROWS_PER_HAND; + thatHand = ROWS_PER_HAND - thisHand; + + split_post_init(); +#endif +} + +#ifdef SPLIT_KEYBOARD + +// user-defined overridable functions +__attribute__((weak)) void matrix_slave_scan_kb(void) { + matrix_slave_scan_user(); +} + +__attribute__((weak)) void matrix_slave_scan_user(void) {} + +#endif + +// declare matrix buffers which defined in quantum/matrix_common.c +extern matrix_row_t raw_matrix[MATRIX_ROWS]; +extern matrix_row_t matrix[MATRIX_ROWS]; + +uint8_t matrix_scan(void) { + bool changed = duplex_scan(raw_matrix); + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + +#ifdef SPLIT_KEYBOARD + if (!is_keyboard_master()) { + // send to primary. + transport_slave(matrix + thatHand, matrix + thisHand); + matrix_slave_scan_kb(); + return changed; + } + + // receive from secondary. + static bool last_connected = false; + matrix_row_t* that_raw = raw_matrix + ROWS_PER_HAND; + memset(that_raw, 0, MATRIXSIZE_PER_HAND); + if (transport_master_if_connected(matrix + thisHand, that_raw)) { + last_connected = true; + if (memcmp(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND) != 0) { + memcpy(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND); + changed = true; + } + } else if (last_connected) { + last_connected = false; + memset(matrix + thatHand, 0, MATRIXSIZE_PER_HAND); + changed = true; + } +#endif + + matrix_scan_kb(); + return changed; +} diff --git a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h new file mode 100644 index 00000000000..44f57c629aa --- /dev/null +++ b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h @@ -0,0 +1,20 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]); diff --git a/keyboards/yowkees/keyball/lib/glcdfont.c b/keyboards/yowkees/keyball/lib/glcdfont.c new file mode 100644 index 00000000000..c634898aed1 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/glcdfont.c @@ -0,0 +1,234 @@ +// 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 +// clang-format off +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, 0x24, 0x24, 0x1C, 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, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, + 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, + 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, + 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, + 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, 0x80, + 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, + 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, + 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, + 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, + 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, + 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, + 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, + 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, + 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, + 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 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, 0x3C, 0x7F, + 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, + 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, + 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, + 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x03, 0x03, 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, +}; +// clang-format on diff --git a/keyboards/yowkees/keyball/lib/keyball/README.md b/keyboards/yowkees/keyball/lib/keyball/README.md new file mode 100644 index 00000000000..ba60d0e92c0 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/keyball/README.md @@ -0,0 +1,128 @@ +# Keyball Core Function Library + +## Scroll snap mode + +When scrolling with the trackball, the scroll direction is restricted. +This restriction is called "scroll snap". + +The direction of restriction can be changed using [special key codes](keycodes.md#english). +You can also release this restriction. +It is called as "scroll snap mode" +The current mode is displayed on the OLED. + +There are 3 modes for scroll snap. + +1. Vertical (default): key code is `SSNP_VRT`, indicated as `VT`. +2. Horizontal: key code is `SSNP_HOR`, indicated as `HO`. +3. Free: key code is `SSNP_FRE`, indicated as `SCR`. + +The scroll snap mode at startup is vertical, +but you can change it by saving the current mode with `KBC_SAVE` + +## MEMO + +This section contains notes regarding the specifications of this library. +Since the purpose is to keep a record in whatever form it takes, +a lot of Japanese is included. +If you would like to read it in English, please request a translation via issue or discussion. +Of course you can translate it for us. If you translate it, +please make pull requests to share it us. + +### Scroll Snap Spec + +この機能は config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 0` を書き加えることで無効化できる。 + +トラックボールによるスクロールの方向を制限するのがスクロールスナップ。 +現在のスクロールスナップには3つのモードがある。 + +* 垂直方向にスナップ (デフォルト) +* 水平方向にスナップ +* スナップしない自由スクロール + +以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の[独自キーコード](keycodes.md#japanese)を用いて手動で切り替える。 + +#### up to 1.3.2 + +初期状態でトラックボールによるスクロールを垂直方向に制限(スナップ)している。 +この振る舞いは config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 1` を書き加えることで有効化できる。 + +この機能はスナップモードとフリーモードから構成される。 +初期状態はスナップモードで、このモードではスクロール方向は垂直に制限される。 +スナップモードで水平の一定方向に一定カウント(デフォルトは12)以上スクロールするとフリーモードに遷移する。 +なおこのカウントはスクロール除数適用後のカウントである。 +フリーモードでは制限が取り払われ、水平と垂直どちらにも自由にスクロールできる。 +フリーモードで一定時間(デフォルトは 100 ミリ秒)、スクロール操作を行わないとスナップモードに遷移する。 + +フリーモードに遷移するためのカウント数を変更するには `KEYBALL_SCROLLSNAP_TENSION_THRESHOLD` を、 +スナップモードに遷移するためのインターバル(ミリ秒)を変更するには `KEYBALL_SCROLLSNAP_RESET_TIMER` を、それぞれ config.h で設定できる。 + +以下はカウント数を 5 に、インターバルを 200 ミリ秒に変更する例: + +```c +#define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 5 +#define KEYBALL_SCROLLSNAP_RESET_TIMER 200 +``` + +#### History of Scroll Snap + +もともとは自由にスクロールできるようにしていた。 +しかし思ったよりもボールの感度が高く一定方向だけに動かすのが難しく、 +誤操作を誘発していた。 +そのためなんらかのスナップ機能が必要だと判断した。 + +最初のスナップ機能は垂直・水平のどちらかの軸から一定角度以内で収まってるうちはそちらへスナップするとした。 +しかし回転開始初期にはその移動量が極小かつセンサーの感度が高いので、 +垂直に動かしたい時に水平にも極小量の移動が発生しておりスナップ方向が定まらない、 +という問題が発生した。 +人間は自分が思うほどには指を正確に動かせていなかった。 + +そこで一定方向に一定以上のカウントを検出するまでは一切スクロールしないようにした。 +これは回転開始初期のスクロール量を読み捨てるに等しい。 + +しかしWebブラウザを思い浮かべてもらえればすぐにわかるように、 +一般のユースケースでは垂直方向のスクロールを頻繁に利用する。 +先の読み捨てにより、垂直方向のスクロールがワンテンポ遅れ、体験を大幅に損なうことが明らかになった。 +この解決のためモード: 初期は垂直のみ、後に自由スクロールする、を導入した。 + +### Scroll Divider / スクロール除数 + +Keyballのセンサーは感度がとても高い。 +そのため生の値をスクロール量としてしまうとスクロール操作がとても難しくなった。 +そこで生の値をある数で割ってスクロールに適用する方式を採用した。 +この時の割る数をスクロール除数と言っている。 + +スクロール除数は、体感として小さく制御する意味がなかったので、 +1, 2, 4, 8, 16, 32, 64 というように2の乗数とした。 +2の乗数であるのならば値の表現として $2 ^ n$ の $n$ で表せる。 +またEEPROMに設定値を保存できるようにするために、 +ビット数を節約する目的で $n$ が取りうる値は 1~7 の範囲とした。 +結果実際の割る数は以下の式で計算できる。 + +$$ 2 ^ {(n - 1)} $$ + +$n$ の初期値は 4 で 1/8 になることを意味する。 +この値は config.h で `KEYBALL_SCROLL_DIV_DEFAULT` マクロを定義することで変更できる。 +これを0にすることは考慮していないので設定しないこと。 + +### Scroll Inhivitor + +トラックボールの移動量をポインタに適用するかスクロールに適用するか、 +Keyballは内部にスクロールモードという名のモードで管理している。 +スクロールモードはキーコードやAPI呼び出しの任意のタイミングで切り替えられる。 +デフォルトのキーマップでは特定のレイヤーの状態を +スクロールモードのオンオフに適用している。 + +当初はスクロールモードの切り替え直後に、 +トラックボールの移動が意図しない適用先に適用されることが頻発した。 +ポインタをブラウザまで動かした後にスクロールモードに変更すると、 +意図していない方向にスクロールするといった体験になる。 + +そこでスクロールモード切替直後の一定時間は +一切のトラックボール操作を読み捨てることにした。 +この読み捨てる時間のことを Scroll Inhivitor と名付けた。 +この Scroll Inhivitor のデフォルト値は 50 ミリ秒である。 +短い時間ではあるが結構効いている。 + +Scroll Inhivitor は config.h で `KEYBALL_SCROLLBALL_INHIVITOR` マクロを定義することで変更できる。 +無効化したい場合は値として `0` を設定する。 +興味があれば無効にしてみるのも面白いかもしれない。 diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.c b/keyboards/yowkees/keyball/lib/keyball/keyball.c new file mode 100644 index 00000000000..97874adcccd --- /dev/null +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.c @@ -0,0 +1,841 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "quantum.h" +#ifdef SPLIT_KEYBOARD +# include "transactions.h" +#endif + +#include "keyball.h" +//#include "drivers/pmw3360/pmw3360.h" + +#include + +#ifdef POINTING_DEVICE_ENABLE + +const uint16_t CPI_STEP = PMW33XX_CPI_STEP; + +#endif + +const uint16_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT; +const uint8_t SCROLL_DIV_MAX = 7; + + +const uint16_t AML_TIMEOUT_MIN = 100; +const uint16_t AML_TIMEOUT_MAX = 1000; +const uint16_t AML_TIMEOUT_QU = 50; // Quantization Unit + +static const char BL = '\xB0'; // Blank indicator character +#ifdef OLED_ENABLE + static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; + static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; +#endif + +keyball_t keyball = { + .this_have_ball = false, + .that_enable = false, + .that_have_ball = false, + + .this_motion = {0}, + .that_motion = {0}, + + .cpi_value = 0, + .cpi_changed = false, + + .scroll_mode = false, + .scroll_div = 0, + + .pressing_keys = { BL, BL, BL, BL, BL, BL, 0 }, +}; + +////////////////////////////////////////////////////////////////////////////// +// Hook points + +__attribute__((weak)) void keyball_on_adjust_layout(keyball_adjust_t v) {} + +////////////////////////////////////////////////////////////////////////////// +// Static utilities + +#ifdef POINTING_DEVICE_ENABLE + +// add16 adds two int16_t with clipping. +static int16_t add16(int16_t a, int16_t b) { + int16_t r = a + b; + if (a >= 0 && b >= 0 && r < 0) { + r = 32767; + } else if (a < 0 && b < 0 && r >= 0) { + r = -32768; + } + return r; +} + + +// divmod16 divides *v by div, returns the quotient, and assigns the remainder +// to *v. +static int16_t divmod16(int16_t *v, int16_t div) { + int16_t r = *v / div; + *v -= r * div; + return r; +} +#endif +// clip2int8 clips an integer fit into int8_t. +static inline int8_t clip2int8(int16_t v) { + return (v) < -127 ? -127 : (v) > 127 ? 127 : (int8_t)v; +} + +#ifdef OLED_ENABLE +static const char *format_4d(int8_t d) { + static char buf[5] = {0}; // max width (4) + NUL (1) + char lead = ' '; + if (d < 0) { + d = -d; + lead = '-'; + } + buf[3] = (d % 10) + '0'; + d /= 10; + if (d == 0) { + buf[2] = lead; + lead = ' '; + } else { + buf[2] = (d % 10) + '0'; + d /= 10; + } + if (d == 0) { + buf[1] = lead; + lead = ' '; + } else { + buf[1] = (d % 10) + '0'; + d /= 10; + } + buf[0] = lead; + return buf; +} + +static char to_1x(uint8_t x) { + x &= 0x0f; + return x < 10 ? x + '0' : x + 'a' - 10; +} +#endif + +#ifdef POINTING_DEVICE_ENABLE + +static void add_cpi(uint16_t delta) { + int16_t v = keyball_get_cpi() + delta; + keyball_set_cpi(v < 1 ? 1 : v); +} +#endif + +static void add_scroll_div(int8_t delta) { + int8_t v = keyball_get_scroll_div() + delta; + keyball_set_scroll_div(v < 1 ? 1 : v); +} + +////////////////////////////////////////////////////////////////////////////// +// Pointing device driver + +#if KEYBALL_MODEL == 46 +void keyboard_pre_init_kb(void) { + keyball.this_have_ball = pmw3360_init(); + keyboard_pre_init_user(); +} +#endif + + +#ifdef POINTING_DEVICE_ENABLE + +void pointing_device_init_kb(void) { + keyball.this_have_ball = pmw33xx_init(0); + pointing_device_init_user(); +} + + +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { +#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 + r->x = clip2int8(m->y); + r->y = clip2int8(m->x); + if (is_left) { + r->x = -r->x; + r->y = -r->y; + } +#elif KEYBALL_MODEL == 46 + r->x = clip2int8(m->x); + r->y = -clip2int8(m->y); +#else +# error("unknown Keyball model") +#endif + // clear motion + m->x = 0; + m->y = 0; +} + +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left) { + // consume motion of trackball. + int16_t div = 1 << (keyball_get_scroll_div() - 1); + int16_t x = divmod16(&m->x, div); + int16_t y = divmod16(&m->y, div); + + // apply to mouse report. +#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 + r->h = clip2int8(y); + r->v = -clip2int8(x); + if (is_left) { + r->h = -r->h; + r->v = -r->v; + } +#elif KEYBALL_MODEL == 46 + r->h = clip2int8(x); + r->v = clip2int8(y); +#else +# error("unknown Keyball model") +#endif + + // Scroll snapping +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + // Old behavior up to 1.3.2) + uint32_t now = timer_read32(); + if (r->h != 0 || r->v != 0) { + keyball.scroll_snap_last = now; + } else if (TIMER_DIFF_32(now, keyball.scroll_snap_last) >= KEYBALL_SCROLLSNAP_RESET_TIMER) { + keyball.scroll_snap_tension_h = 0; + } + if (abs(keyball.scroll_snap_tension_h) < KEYBALL_SCROLLSNAP_TENSION_THRESHOLD) { + keyball.scroll_snap_tension_h += y; + r->h = 0; + } +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + // New behavior + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + r->h = 0; + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + r->v = 0; + break; + default: + // pass by without doing anything + break; + } +#endif +} + + static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { + if (as_scroll) { + keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); + } else { + keyball_on_apply_motion_to_mouse_move(m, r, is_left); + } +} + + +static inline bool should_report(void) { + uint32_t now = timer_read32(); +#if defined(KEYBALL_REPORTMOUSE_INTERVAL) && KEYBALL_REPORTMOUSE_INTERVAL > 0 + // throttling mouse report rate. + static uint32_t last = 0; + if (TIMER_DIFF_32(now, last) < KEYBALL_REPORTMOUSE_INTERVAL) { + return false; + } + last = now; +#endif +#if defined(KEYBALL_SCROLLBALL_INHIVITOR) && KEYBALL_SCROLLBALL_INHIVITOR > 0 + if (TIMER_DIFF_32(now, keyball.scroll_mode_changed) < KEYBALL_SCROLLBALL_INHIVITOR) { + keyball.this_motion.x = 0; + keyball.this_motion.y = 0; + keyball.that_motion.x = 0; + keyball.that_motion.y = 0; + } +#endif + return true; +} + +/////////// new code + +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + // if (is_keyboard_master()) return mouse_report; + + if (keyball.this_have_ball) { + pmw33xx_report_t report = pmw33xx_read_burst(0); + //if (pmw3360_motion_burst(&d)) { + ATOMIC_BLOCK_FORCEON { + keyball.this_motion.x = add16(keyball.this_motion.x, report.delta_x); + keyball.this_motion.y = add16(keyball.this_motion.y, report.delta_y); + } + //} + } + else { + // report mouse event, if keyboard is primary. + if (is_keyboard_master() && should_report()) { + // modify mouse report by PMW3360 motion. + motion_to_mouse(&keyball.this_motion, &mouse_report, is_keyboard_left(), keyball.scroll_mode); + motion_to_mouse(&keyball.that_motion, &mouse_report, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); + //store mouse report for OLED. + keyball.last_mouse = mouse_report; + } + } + return mouse_report; + +} + + + +#endif + +////// end new code + + +/* +report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { + // fetch from optical sensor. + if (keyball.this_have_ball) { + pmw3360_motion_t d = {0}; + if (pmw3360_motion_burst(&d)) { + ATOMIC_BLOCK_FORCEON { + keyball.this_motion.x = add16(keyball.this_motion.x, d.x); + keyball.this_motion.y = add16(keyball.this_motion.y, d.y); + } + } + } + // report mouse event, if keyboard is primary. + if (is_keyboard_master() && should_report()) { + // modify mouse report by PMW3360 motion. + motion_to_mouse(&keyball.this_motion, &rep, is_keyboard_left(), keyball.scroll_mode); + motion_to_mouse(&keyball.that_motion, &rep, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); + // store mouse report for OLED. + keyball.last_mouse = rep; + } + return rep; +} +*/ + +////////////////////////////////////////////////////////////////////////////// +// Split RPC + +#ifdef SPLIT_KEYBOARD + #ifdef POINTING_DEVICE_ENABLE + +static void rpc_get_info_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + keyball_info_t info = { + .ballcnt = keyball.this_have_ball ? 1 : 0, + }; + *(keyball_info_t *)out_data = info; + keyball_on_adjust_layout(KEYBALL_ADJUST_SECONDARY); +} + +static void rpc_get_info_invoke(void) { + static bool negotiated = false; + static uint32_t last_sync = 0; + static int round = 0; + uint32_t now = timer_read32(); + if (negotiated || TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETINFO_INTERVAL) { + return; + } + last_sync = now; + round++; + keyball_info_t recv = {0}; + if (!transaction_rpc_exec(KEYBALL_GET_INFO, 0, NULL, sizeof(recv), &recv)) { + if (round < KEYBALL_TX_GETINFO_MAXTRY) { + dprintf("keyball:rpc_get_info_invoke: missed #%d\n", round); + return; + } + } + negotiated = true; + keyball.that_enable = true; + keyball.that_have_ball = recv.ballcnt > 0; + dprintf("keyball:rpc_get_info_invoke: negotiated #%d %d\n", round, keyball.that_have_ball); + + // split keyboard negotiation completed. + +# ifdef VIA_ENABLE + // adjust VIA layout options according to current combination. + uint8_t layouts = (keyball.this_have_ball ? (is_keyboard_left() ? 0x02 : 0x01) : 0x00) | (keyball.that_have_ball ? (is_keyboard_left() ? 0x01 : 0x02) : 0x00); + uint32_t curr = via_get_layout_options(); + uint32_t next = (curr & ~0x3) | layouts; + if (next != curr) { + via_set_layout_options(next); + } +# endif + + keyball_on_adjust_layout(KEYBALL_ADJUST_PRIMARY); +} + +static void rpc_get_motion_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + *(keyball_motion_t *)out_data = keyball.this_motion; + // clear motion + keyball.this_motion.x = 0; + keyball.this_motion.y = 0; +} + +static void rpc_get_motion_invoke(void) { + static uint32_t last_sync = 0; + uint32_t now = timer_read32(); + if (TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETMOTION_INTERVAL) { + return; + } + keyball_motion_t recv = {0}; + if (transaction_rpc_exec(KEYBALL_GET_MOTION, 0, NULL, sizeof(recv), &recv)) { + keyball.that_motion.x = add16(keyball.that_motion.x, recv.x); + keyball.that_motion.y = add16(keyball.that_motion.y, recv.y); + + dprintf("rcv x: %d, %d ", recv.x, recv.y); + dprintf("mot x: %d, %d \n", keyball.that_motion.x, keyball.that_motion.y); + + } + last_sync = now; + return; +} + +static void rpc_set_cpi_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { + keyball_set_cpi(*(keyball_cpi_t *)in_data); +} + +static void rpc_set_cpi_invoke(void) { + if (!keyball.cpi_changed) { + return; + } + keyball_cpi_t req = keyball.cpi_value; + if (!transaction_rpc_send(KEYBALL_SET_CPI, sizeof(req), &req)) { + return; + } + keyball.cpi_changed = false; +} + +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +// OLED utility + +#ifdef OLED_ENABLE +// clang-format off +const char PROGMEM code_to_name[] = { + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', + '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', + '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', + ',', '.', '/', +}; +// clang-format on +#endif + +void keyball_oled_render_ballinfo(void) { +#ifdef OLED_ENABLE + // Format: `Ball:{mouse x}{mouse y}{mouse h}{mouse v}` + // + // Output example: + // + // Ball: -12 34 0 0 + + // 1st line, "Ball" label, mouse x, y, h, and v. + oled_write_P(PSTR("Ball\xB1"), false); + oled_write(format_4d(keyball.last_mouse.x), false); + oled_write(format_4d(keyball.last_mouse.y), false); + oled_write(format_4d(keyball.last_mouse.h), false); + oled_write(format_4d(keyball.last_mouse.v), false); + + // 2nd line, empty label and CPI + #ifdef POINTING_DEVICE_ENABLE + oled_write_P(PSTR(" \xB1\xBC\xBD"), false); + oled_write(format_4d((keyball_get_cpi()+1)/100), false); + oled_write_P(PSTR("00 "), false); +#endif + // indicate scroll snap mode: "VT" (vertical), "HN" (horiozntal), and "SCR" (free) +#if 1 && KEYBALL_SCROLLSNAP_ENABLE == 2 + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + oled_write_P(PSTR("VT"), false); + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + oled_write_P(PSTR("HO"), false); + break; + default: + oled_write_P(PSTR("\xBE\xBF"), false); + break; + } +#else + oled_write_P(PSTR("\xBE\xBF"), false); +#endif + // indicate scroll mode: on/off + if (keyball.scroll_mode) { + oled_write_P(LFSTR_ON, false); + } else { + oled_write_P(LFSTR_OFF, false); + } + + // indicate scroll divider: + oled_write_P(PSTR(" \xC0\xC1"), false); + oled_write_char('0' + keyball_get_scroll_div(), false); +#endif +} + +void keyball_oled_render_ballsubinfo(void) { +#ifdef OLED_ENABLE +#endif +} + +void keyball_oled_render_keyinfo(void) { +#ifdef OLED_ENABLE + // Format: `Key : R{row} C{col} K{kc} {name}{name}{name}` + // + // Where `kc` is lower 8 bit of keycode. + // Where `name`s are readable labels for pressing keys, valid between 4 and 56. + // + // `row`, `col`, and `kc` indicates the last processed key, + // but `name`s indicate unreleased keys in best effort. + // + // It is aligned to fit with output of keyball_oled_render_ballinfo(). + // For example: + // + // Key : R2 C3 K06 abc + // Ball: 0 0 0 0 + + // "Key" Label + oled_write_P(PSTR("Key \xB1"), false); + + // Row and column + oled_write_char('\xB8', false); + oled_write_char(to_1x(keyball.last_pos.row), false); + oled_write_char('\xB9', false); + oled_write_char(to_1x(keyball.last_pos.col), false); + + // Keycode + oled_write_P(PSTR("\xBA\xBB"), false); + oled_write_char(to_1x(keyball.last_kc >> 4), false); + oled_write_char(to_1x(keyball.last_kc), false); + + // Pressing keys + oled_write_P(PSTR(" "), false); + oled_write(keyball.pressing_keys, false); +#endif +} + +void keyball_oled_render_layerinfo(void) { +#ifdef OLED_ENABLE + // Format: `Layer:{layer state}` + // + // Output example: + // + // Layer:-23------------ + // + oled_write_P(PSTR("L\xB6\xB7r\xB1"), false); + for (uint8_t i = 1; i < 8; i++) { + oled_write_char((layer_state_is(i) ? to_1x(i) : BL), false); + } + oled_write_char(' ', false); + +# ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + oled_write_P(PSTR("\xC2\xC3"), false); + if (get_auto_mouse_enable()) { + oled_write_P(LFSTR_ON, false); + } else { + oled_write_P(LFSTR_OFF, false); + } + + oled_write(format_4d(get_auto_mouse_timeout() / 10) + 1, false); + oled_write_char('0', false); +# else + oled_write_P(PSTR("\xC2\xC3\xB4\xB5 ---"), false); +# endif +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// Public API functions + +bool keyball_get_scroll_mode(void) { + return keyball.scroll_mode; +} + +void keyball_set_scroll_mode(bool mode) { + if (mode != keyball.scroll_mode) { + keyball.scroll_mode_changed = timer_read32(); + } + keyball.scroll_mode = mode; +} + +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + return keyball.scrollsnap_mode; +#else + return 0; +#endif +} + +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball.scrollsnap_mode = mode; +#endif +} + +uint8_t keyball_get_scroll_div(void) { + return keyball.scroll_div == 0 ? KEYBALL_SCROLL_DIV_DEFAULT : keyball.scroll_div; +} + +void keyball_set_scroll_div(uint8_t div) { + keyball.scroll_div = div > SCROLL_DIV_MAX ? SCROLL_DIV_MAX : div; +} + +#ifdef POINTING_DEVICE_ENABLE + +uint16_t keyball_get_cpi(void) { + return keyball.cpi_value == 0 ? CPI_DEFAULT : keyball.cpi_value; +} + +void keyball_set_cpi(uint16_t cpi) { + keyball.cpi_value = cpi; + keyball.cpi_changed = true; + if (keyball.this_have_ball) { + pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT : cpi); + keyball.cpi_value = pmw33xx_get_cpi_wrapper(); + } +} + +#endif + +////////////////////////////////////////////////////////////////////////////// +// Keyboard hooks + +void keyboard_post_init_kb(void) { +#ifdef POINTING_DEVICE_ENABLE + #ifdef SPLIT_KEYBOARD + // register transaction handlers on secondary. + if (!is_keyboard_master()) { + transaction_register_rpc(KEYBALL_GET_INFO, rpc_get_info_handler); + transaction_register_rpc(KEYBALL_GET_MOTION, rpc_get_motion_handler); + transaction_register_rpc(KEYBALL_SET_CPI, rpc_set_cpi_handler); + } + #endif + + // read keyball configuration from EEPROM + if (eeconfig_is_enabled()) { + keyball_config_t c = {.raw = eeconfig_read_kb()}; + keyball_set_cpi(c.cpi); + keyball_set_scroll_div(c.sdiv); + #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(c.amle); + set_auto_mouse_timeout(c.amlto == 0 ? AUTO_MOUSE_TIME : (c.amlto + 1) * AML_TIMEOUT_QU); + #endif + #if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball_set_scrollsnap_mode(c.ssnap); + #endif + } +#endif + + keyball_on_adjust_layout(KEYBALL_ADJUST_PENDING); + keyboard_post_init_user(); +} + +#if SPLIT_KEYBOARD + #ifdef POINTING_DEVICE_ENABLE + +void housekeeping_task_kb(void) { + if (is_keyboard_master() && 1 ==2) { + rpc_get_info_invoke(); + if (keyball.that_have_ball) { + rpc_get_motion_invoke(); + rpc_set_cpi_invoke(); + } + } +} +#endif +#endif + +static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { + +#ifdef OLED_ENABLE + // Process only valid keycodes. + if (keycode >= 4 && keycode < 57) { + char value = pgm_read_byte(code_to_name + keycode - 4); + char where = BL; + if (!record->event.pressed) { + // Swap `value` and `where` when releasing. + where = value; + value = BL; + } + // Rewrite the last `where` of pressing_keys to `value` . + for (int i = 0; i < KEYBALL_OLED_MAX_PRESSING_KEYCODES; i++) { + if (keyball.pressing_keys[i] == where) { + keyball.pressing_keys[i] = value; + break; + } + } + } +#endif +} + + #ifdef POINTING_DEVICE_ENABLE + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE +bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case SCRL_MO: + return true; + } + return is_mouse_record_user(keycode, record); +} +#endif +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // store last keycode, row, and col for OLED + keyball.last_kc = keycode; + keyball.last_pos = record->event.key; + + pressing_keys_update(keycode, record); + + if (!process_record_user(keycode, record)) { + return false; + } + + // strip QK_MODS part. + if (keycode >= QK_MODS && keycode <= QK_MODS_MAX) { + keycode &= 0xff; + } + + switch (keycode) { +#ifndef MOUSEKEY_ENABLE + // process KC_MS_BTN1~8 by myself + // See process_action() in quantum/action.c for details. + case KC_MS_BTN1 ... KC_MS_BTN8: { + extern void register_mouse(uint8_t mouse_keycode, bool pressed); + register_mouse(keycode, record->event.pressed); + // to apply QK_MODS actions, allow to process others. + return true; + } +#endif + + case SCRL_MO: + keyball_set_scroll_mode(record->event.pressed); + // process_auto_mouse may use this in future, if changed order of + // processes. + return true; + } + + // process events which works on pressed only. + if (record->event.pressed) { + switch (keycode) { +#ifdef POINTING_DEVICE_ENABLE + + case KBC_RST: + keyball_set_cpi(0); + keyball_set_scroll_div(0); +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(false); + set_auto_mouse_timeout(AUTO_MOUSE_TIME); +#endif + break; + case KBC_SAVE: { + keyball_config_t c = { + .cpi = keyball.cpi_value, + .sdiv = keyball.scroll_div, +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + .amle = get_auto_mouse_enable(), + .amlto = (get_auto_mouse_timeout() / AML_TIMEOUT_QU) - 1, +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + .ssnap = keyball_get_scrollsnap_mode(), +#endif + }; + eeconfig_update_kb(c.raw); + } break; + +//#ifdef POINTING_DEVICE_ENABLE + + case CPI_I100: + add_cpi(CPI_STEP); + break; + case CPI_D100: + add_cpi(-CPI_STEP); + break; + case CPI_I1K: + add_cpi(CPI_STEP*10); + break; + case CPI_D1K: + add_cpi(-CPI_STEP*10); + break; +#endif + + case SCRL_TO: + keyball_set_scroll_mode(!keyball.scroll_mode); + break; + case SCRL_DVI: + add_scroll_div(1); + break; + case SCRL_DVD: + add_scroll_div(-1); + break; + +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + case SSNP_HOR: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_HORIZONTAL); + break; + case SSNP_VRT: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_VERTICAL); + break; + case SSNP_FRE: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_FREE); + break; +#endif + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + case AML_TO: + set_auto_mouse_enable(!get_auto_mouse_enable()); + break; + case AML_I50: + { + uint16_t v = get_auto_mouse_timeout() + 50; + set_auto_mouse_timeout(MIN(v, AML_TIMEOUT_MAX)); + } + break; + case AML_D50: + { + uint16_t v = get_auto_mouse_timeout() - 50; + set_auto_mouse_timeout(MAX(v, AML_TIMEOUT_MIN)); + } + break; +#endif + + default: + return true; + } + return false; + } + + return true; +} + +// Disable functions keycode_config() and mod_config() in keycode_config.c to +// reduce size. These functions are provided for customizing magic keycode. +// These two functions are mostly unnecessary if `MAGIC_KEYCODE_ENABLE = no` is +// set. +// +// If `MAGIC_KEYCODE_ENABLE = no` and you want to keep these two functions as +// they are, define the macro KEYBALL_KEEP_MAGIC_FUNCTIONS. +// +// See: https://docs.qmk.fm/#/squeezing_avr?id=magic-functions +// +#if !defined(MAGIC_KEYCODE_ENABLE) && !defined(KEYBALL_KEEP_MAGIC_FUNCTIONS) + +uint16_t keycode_config(uint16_t keycode) { + return keycode; +} + +uint8_t mod_config(uint8_t mod) { + return mod; +} + +#endif diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.h b/keyboards/yowkees/keyball/lib/keyball/keyball.h new file mode 100644 index 00000000000..6affec228c4 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.h @@ -0,0 +1,276 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +////////////////////////////////////////////////////////////////////////////// +// Configurations + +#ifndef POINTING_DEVICE_ENABLE + #undef POINTING_DEVICE_AUTO_MOUSE_ENABLE +#endif + +#ifndef KEYBALL_CPI_DEFAULT +# define KEYBALL_CPI_DEFAULT 500 +#endif + +#ifndef KEYBALL_SCROLL_DIV_DEFAULT +# define KEYBALL_SCROLL_DIV_DEFAULT 4 // 4: 1/8 (1/2^(n-1)) +#endif + +#ifndef KEYBALL_REPORTMOUSE_INTERVAL +# define KEYBALL_REPORTMOUSE_INTERVAL 8 // mouse report rate: 125Hz +#endif + +#ifndef KEYBALL_SCROLLBALL_INHIVITOR +# define KEYBALL_SCROLLBALL_INHIVITOR 50 +#endif + +/// To disable scroll snap feature, define 0 in your config.h +#ifndef KEYBALL_SCROLLSNAP_ENABLE +# define KEYBALL_SCROLLSNAP_ENABLE 2 +#endif + +#ifndef KEYBALL_SCROLLSNAP_RESET_TIMER +# define KEYBALL_SCROLLSNAP_RESET_TIMER 100 +#endif + +#ifndef KEYBALL_SCROLLSNAP_TENSION_THRESHOLD +# define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 12 +#endif + +/// Specify SROM ID to be uploaded PMW3360DW (optical sensor). It will be +/// enabled high CPI setting or so. Valid valus are 0x04 or 0x81. Define this +/// in your config.h to be enable. Please note that using this option will +/// increase the firmware size by more than 4KB. +//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x04 +//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x81 + +/// Defining this macro keeps two functions intact: keycode_config() and +/// mod_config() in keycode_config.c. +/// +/// These functions customize the magic key code and are useless if the magic +/// key code is disabled. Therefore, Keyball automatically disables it. +/// However, there may be cases where you still need these functions even after +/// disabling the magic key code. In that case, define this macro. +//#define KEYBALL_KEEP_MAGIC_FUNCTIONS + +////////////////////////////////////////////////////////////////////////////// +// Constants + +#define KEYBALL_TX_GETINFO_INTERVAL 500 +#define KEYBALL_TX_GETINFO_MAXTRY 10 +#define KEYBALL_TX_GETMOTION_INTERVAL 4 + +#if (PRODUCT_ID & 0xff00) == 0x0000 +# define KEYBALL_MODEL 46 +#elif (PRODUCT_ID & 0xff00) == 0x0100 +# define KEYBALL_MODEL 61 +#elif (PRODUCT_ID & 0xff00) == 0x0200 +# define KEYBALL_MODEL 39 +#elif (PRODUCT_ID & 0xff00) == 0x0300 +# define KEYBALL_MODEL 147 +#elif (PRODUCT_ID & 0xff00) == 0x0400 +# define KEYBALL_MODEL 44 +#endif + +#define KEYBALL_OLED_MAX_PRESSING_KEYCODES 6 + +////////////////////////////////////////////////////////////////////////////// +// Types + +enum keyball_keycodes { + KBC_RST = QK_KB_0, // Keyball configuration: reset to default + KBC_SAVE = QK_KB_1, // Keyball configuration: save to EEPROM + + CPI_I100 = QK_KB_2, // CPI +100 CPI + CPI_D100 = QK_KB_3, // CPI -100 CPI + CPI_I1K = QK_KB_4, // CPI +1000 CPI + CPI_D1K = QK_KB_5, // CPI -1000 CPI + + // In scroll mode, motion from primary trackball is treated as scroll + // wheel. + SCRL_TO = QK_KB_6, // Toggle scroll mode + SCRL_MO = QK_KB_7, // Momentary scroll mode + SCRL_DVI = QK_KB_8, // Increment scroll divider + SCRL_DVD = QK_KB_9, // Decrement scroll divider + + SSNP_VRT = QK_KB_13, // Set scroll snap mode as vertical + SSNP_HOR = QK_KB_14, // Set scroll snap mode as horizontal + SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) + + // Auto mouse layer control keycodes. + // Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined. + AML_TO = QK_KB_10, // Toggle automatic mouse layer + AML_I50 = QK_KB_11, // Increment automatic mouse layer timeout + AML_D50 = QK_KB_12, // Decrement automatic mouse layer timeout + + // User customizable 32 keycodes. + KEYBALL_SAFE_RANGE = QK_USER_0, +}; + +typedef union { + uint32_t raw; + struct { + uint8_t cpi : 7; + uint8_t sdiv : 3; // scroll divider +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + uint8_t amle : 1; // automatic mouse layer enabled + uint16_t amlto : 5; // automatic mouse layer timeout +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + uint8_t ssnap : 2; // scroll snap mode +#endif + }; +} keyball_config_t; + +typedef struct { + uint8_t ballcnt; // count of balls: support only 0 or 1, for now +} keyball_info_t; + +typedef struct { + int16_t x; + int16_t y; +} keyball_motion_t; + +typedef uint8_t keyball_cpi_t; + +typedef enum { + KEYBALL_SCROLLSNAP_MODE_VERTICAL = 0, + KEYBALL_SCROLLSNAP_MODE_HORIZONTAL = 1, + KEYBALL_SCROLLSNAP_MODE_FREE = 2, +} keyball_scrollsnap_mode_t; + +typedef struct { + bool this_have_ball; + bool that_enable; + bool that_have_ball; + + keyball_motion_t this_motion; + keyball_motion_t that_motion; + + uint8_t cpi_value; + bool cpi_changed; + + bool scroll_mode; + uint32_t scroll_mode_changed; + uint8_t scroll_div; + +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + uint32_t scroll_snap_last; + int8_t scroll_snap_tension_h; +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball_scrollsnap_mode_t scrollsnap_mode; +#endif + + uint16_t last_kc; + keypos_t last_pos; + report_mouse_t last_mouse; + + // Buffer to indicate pressing keys. + char pressing_keys[KEYBALL_OLED_MAX_PRESSING_KEYCODES + 1]; +} keyball_t; + +typedef enum { + KEYBALL_ADJUST_PENDING = 0, + KEYBALL_ADJUST_PRIMARY = 1, + KEYBALL_ADJUST_SECONDARY = 2, +} keyball_adjust_t; + +////////////////////////////////////////////////////////////////////////////// +// Exported values (touch carefully) + +extern keyball_t keyball; + +////////////////////////////////////////////////////////////////////////////// +// Hook points + +/// keyball_on_adjust_layout is called when the keyboard layout adjustted +void keyball_on_adjust_layout(keyball_adjust_t v); + +/// keyball_on_apply_motion_to_mouse_move applies trackball's motion m to r as +/// mouse movement. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left); + +/// keyball_on_apply_motion_to_mouse_scroll applies trackball's motion m to r +/// as mouse scroll. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left); + +////////////////////////////////////////////////////////////////////////////// +// Public API functions + +/// keyball_oled_render_ballinfo renders ball information to OLED. +/// It uses just 21 columns to show the info. +void keyball_oled_render_ballinfo(void); + +/// keyball_oled_render_keyinfo renders last processed key information to OLED. +/// It shows column, row, key code, and key name (if available). +void keyball_oled_render_keyinfo(void); + +/// keyball_oled_render_layerinfo renders current layer status information to +/// OLED. It shows layer mask with number (1~f) for active layers and '_' for +/// inactive layers. +void keyball_oled_render_layerinfo(void); + +/// keyball_get_scroll_mode gets current scroll mode. +bool keyball_get_scroll_mode(void); + +/// keyball_set_scroll_mode modify scroll mode. +void keyball_set_scroll_mode(bool mode); + +/// keyball_get_scrollsnap_mode gets current scroll snap mode. +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void); + +/// keyball_set_scrollsnap_mode change scroll snap mode. +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); + +/// keyball_get_scroll_div gets current scroll divider. +/// See also keyball_set_scroll_div for the scroll divider's detail. +uint8_t keyball_get_scroll_div(void); + +/// keyball_set_scroll_div changes scroll divider. +/// +/// The scroll divider is the number that divides the raw value when applying +/// trackball motion to scrolling. The CPI value of the trackball is very +/// high, so if you apply it to scrolling as is, it will scroll too much. +/// In order to adjust the scroll amount to be appropriate, it is applied after +/// dividing it by a scroll divider. The actual denominator is determined by +/// the following formula: +/// +/// denominator = 2 ^ (div - 1) ^2 +/// +/// Valid values are between 1 and 7, KEYBALL_SCROLL_DIV_DEFAULT is used when 0 +/// is specified. +void keyball_set_scroll_div(uint8_t div); + +/// keyball_get_cpi gets current CPI of trackball. +/// The actual CPI value is the returned value +1 and multiplied by 100: +/// +/// CPI = (v + 1) * 100 +uint16_t keyball_get_cpi(void); + +/// keyball_set_cpi changes CPI of trackball. +/// Valid values are between 0 to 119, and the actual CPI value is the set +/// value +1 and multiplied by 100: +/// +/// CPI = (v + 1) * 100 +/// +/// In addition, if you do not upload SROM, the maximum value will be limited +/// to 34 (3500CPI). +void keyball_set_cpi(uint16_t cpi); diff --git a/keyboards/yowkees/keyball/lib/keyball/keycodes.md b/keyboards/yowkees/keyball/lib/keyball/keycodes.md new file mode 100644 index 00000000000..ed1d15c33d1 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/keyball/keycodes.md @@ -0,0 +1,52 @@ +# Keyball: Special Keycodes + +* [English/英語](#english) +* [日本語/Japanese](#japanese) + + +## Special Keycodes + +| Keycode | Value on Remap | Hex | Description | +|:-----------|:----------------|:---------|:------------------------------------------------------------------| +| `KBC_RST` | `Kb 0` | `0x7e00` | Reset Keyball configuration[^1] | +| `KBC_SAVE` | `Kb 1` | `0x7e01` | Persist Keyball configuration[^1] to EEPROM | +| `CPI_I100` | `Kb 2` | `0x7e02` | Increase 100 CPI (max 12000) | +| `CPI_D100` | `Kb 3` | `0x7e03` | Decrease 100 CPI (min 100) | +| `CPI_I1K` | `Kb 4` | `0x7e04` | Increase 1000 CPI (max 12000) | +| `CPI_D1K` | `Kb 5` | `0x7e05` | Decrease 1000 CPI (min 100) | +| `SCRL_TO` | `Kb 6` | `0x7e06` | Toggle scroll mode | +| `SCRL_MO` | `Kb 7` | `0x7e07` | Enable scroll mode when pressing | +| `SCRL_DVI` | `Kb 8` | `0x7e08` | Increase scroll divider (max D7 = 1/128) <- Most Scroll slow | +| `SCRL_DVD` | `Kb 9` | `0x7e09` | Decrease scroll divider (min 0 = 1/1) <- Most Scroll fast | +| `AML_TO` | `Kb 10` | `0x7e0a` | Toggle automatic mouse layer | +| `AML_I50` | `Kb 11` | `0x7e0b` | Increase 50ms automatic mouse layer timeout (max 1000ms) | +| `AML_D50` | `Kb 12` | `0x7e0c` | Decrease 50ms automatic mouse layer timeout (min 100ms) | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | Set scroll snap mode as horizontal | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | Set scroll snap mode as disable (free scroll) | + +[^1]: CPI, scroll divider, automatic mouse layer's enable/disable, and automatic mouse layer's timeout. + + +## 特殊キーコード + +| キーコード | Remap上での表記 | 値 | 説明 | +|:-----------|:----------------|:---------|:------------------------------------------------------------------| +| `KBC_RST` | `Kb 0` | `0x7e00` | Keyball設定[^2]のリセット | +| `KBC_SAVE` | `Kb 1` | `0x7e01` | 現在のKeyball設定[^2]をEEPROMに保存します | +| `CPI_I100` | `Kb 2` | `0x7e02` | CPIを100増加させます(最大:12000) | +| `CPI_D100` | `Kb 3` | `0x7e03` | CPIを100減少させます(最小:100) | +| `CPI_I1K` | `Kb 4` | `0x7e04` | CPIを1000増加させます(最大:12000) | +| `CPI_D1K` | `Kb 5` | `0x7e05` | CPIを1000減少させます(最小:100) | +| `SCRL_TO` | `Kb 6` | `0x7e06` | タップごとにスクロールモードのON/OFFを切り替えます | +| `SCRL_MO` | `Kb 7` | `0x7e07` | キーを押している間、スクロールモードになります | +| `SCRL_DVI` | `Kb 8` | `0x7e08` | スクロール除数を1つ上げます(max D7 = 1/128)←最もスクロール遅い | +| `SCRL_DVD` | `Kb 9` | `0x7e09` | スクロール除数を1つ下げます(min D0 = 1/1)←最もスクロール速い | +| `AML_TO` | `Kb 10` | `0x7e0a` | 自動マウスレイヤーをトグルします。 | +| `AML_I50` | `Kb 11` | `0x7e0b` | 自動マウスレイヤーのタイムアウトを50msec増やします (max 1000ms) | +| `AML_D50` | `Kb 12` | `0x7e0c` | 自動マウスレイヤーのタイムアウトを50msec減らします (min 100ms) | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | スクロールスナップモードを水平にする | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | スクロールスナップモードを無効にする(自由スクロール) | + +[^2]: CPI、スクロール除数、自動マウスレイヤーのON/OFF状態、及び自動マウスレイヤのタイムアウト diff --git a/keyboards/yowkees/keyball/lib/logofont/font.md b/keyboards/yowkees/keyball/lib/logofont/font.md new file mode 100644 index 00000000000..5c963c75ca6 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/logofont/font.md @@ -0,0 +1,212 @@ +# Special character patterns + +## blank + +``` +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +``` + +## blank indicator + +``` +00000000 +00010000 +00010000 +00010000 +00000000 +00000000 +00000000 +``` + +## vertical label separator + +``` +00000000 +00000000 +01010101 +00000000 +00000000 +00000000 +``` + +## "ON" in 2 chars with light background + +``` +00111110 +01100011 +01011101 +01011101 +01100011 +01111111 +01000001 +01111011 +01110111 +01000001 +00111110 +00000000 +``` + +## "OFF" in 2 chars + +``` +00000000 +00011100 +00100010 +00100010 +00011100 +00000000 +00111110 +00001010 +00000000 +00111110 +00001010 +00000000 +``` + +## "aye" in 2 chars for "Layer" + +``` +00110010 +00101010 +00111100 +00000000 +00100110 +00101000 +00011110 +00000000 +00011100 +00101010 +00101100 +00000000 +``` + +## right half 'R' + +``` +00000000 +00000000 +00111111 +00001001 +00110110 +00000000 +``` + +## right half 'C' + +``` +00000000 +00000000 +00011110 +00100001 +00100001 +00000000 +``` + +## "KC" in 2 chars, indicate "keycode" + +``` +00000000 +00000000 +00000000 +00000000 +00111111 +00001000 +00110111 +00000000 +00011110 +00100001 +00100001 +00000000 +``` + +## "CPI" in 2 chars + +``` +00011110 +00100001 +00100001 +00000000 +00111111 +00001001 +00000110 +00000000 +00100001 +00111111 +00100001 +00000000 +``` + +## "SCR" in 2 chars + +``` +00100010 +00100101 +00011001 +00000000 +00011110 +00100001 +00100001 +00000000 +00111111 +00001001 +00110110 +00000000 +``` + +## "DIV" in 2 chars + +``` +00111111 +00100001 +00011110 +00000000 +00100001 +00111111 +00100001 +00000000 +00001111 +00110000 +00001111 +00000000 +``` + +## "AML" in 2 chars + +``` +00111110 +00001001 +00111110 +00000000 +00111111 +00000110 +00111111 +00000000 +00111111 +00100000 +00100000 +00000000 +``` + +## inactive "ON" in 2 chars + +(not use) + +``` +00000000 +00011100 +00100010 +00100010 +00011100 +00000000 +00111110 +00000100 +00001000 +00111110 +00000000 +00000000 +``` diff --git a/keyboards/yowkees/keyball/lib/logofont/logofont.c b/keyboards/yowkees/keyball/lib/logofont/logofont.c new file mode 100644 index 00000000000..29ce4888891 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/logofont/logofont.c @@ -0,0 +1,199 @@ +// Copyright 2021 @Yowkees: Keyball logo +// +// - Keyball logo (0x80 ~ 0xAF) +// +// Copyright 2024 MURAOKA Taro (aka KoRoN, @kaoriya): Other glyphs +// +// - ASCII characters (0x20 ~ 0x7E) +// - Special characters (0xB0 ~ 0xC3) + +#include "progmem.h" + +// clang-format off +const unsigned char font[] PROGMEM = { + + /////////////////////////////////////////////////////////////////////////// + // Standard ASCII characters, most of which fit within 5x6 area. + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 ' ' + 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, // 0x21 '!' + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 '"' + 0x12, 0x3F, 0x12, 0x3F, 0x12, 0x00, // 0x23 '#' + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, // 0x24 '$' + 0x36, 0x09, 0x1E, 0x24, 0x1B, 0x00, // 0x25 '%' + 0x18, 0x26, 0x29, 0x12, 0x28, 0x00, // 0x26 '&' + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // 0x27 ''' + 0x00, 0x1E, 0x21, 0x40, 0x00, 0x00, // 0x28 '(' + 0x00, 0x40, 0x21, 0x1E, 0x00, 0x00, // 0x29 ')' + 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00, // 0x2A '*' + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, // 0x2B '+' + 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, // 0x2C ',' + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 0x2D '-' + 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, // 0x2E '.' + 0x20, 0x10, 0x0C, 0x02, 0x01, 0x00, // 0x2F '/' + 0x1E, 0x29, 0x25, 0x23, 0x1E, 0x00, // 0x30 '0' + 0x00, 0x22, 0x3F, 0x20, 0x00, 0x00, // 0x31 '1' + 0x22, 0x31, 0x29, 0x29, 0x26, 0x00, // 0x32 '2' + 0x12, 0x21, 0x25, 0x25, 0x1A, 0x00, // 0x33 '3' + 0x18, 0x14, 0x12, 0x3F, 0x10, 0x00, // 0x34 '4' + 0x17, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x35 '5' + 0x1E, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x36 '6' + 0x01, 0x31, 0x09, 0x05, 0x03, 0x00, // 0x37 '7' + 0x1A, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x38 '8' + 0x06, 0x29, 0x29, 0x29, 0x1E, 0x00, // 0x39 '9' + 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, // 0x3A ':' + 0x00, 0x00, 0x33, 0x73, 0x00, 0x00, // 0x3B ';' + 0x08, 0x14, 0x14, 0x22, 0x22, 0x00, // 0x3C '<' + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // 0x3D '=' + 0x22, 0x22, 0x14, 0x14, 0x08, 0x00, // 0x3E '>' + 0x02, 0x01, 0x29, 0x05, 0x02, 0x00, // 0x3F '?' + 0x3E, 0x59, 0x55, 0x5D, 0x3E, 0x00, // 0x40 '@' + 0x38, 0x16, 0x11, 0x16, 0x38, 0x00, // 0x41 'A' + 0x3F, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x42 'B' + 0x1E, 0x21, 0x21, 0x21, 0x12, 0x00, // 0x43 'C' + 0x3F, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x44 'D' + 0x3F, 0x25, 0x25, 0x25, 0x21, 0x00, // 0x45 'E' + 0x3F, 0x09, 0x09, 0x09, 0x01, 0x00, // 0x46 'F' + 0x1E, 0x21, 0x21, 0x29, 0x1A, 0x00, // 0x47 'G' + 0x3F, 0x04, 0x04, 0x04, 0x3F, 0x00, // 0x48 'H' + 0x00, 0x21, 0x3F, 0x21, 0x00, 0x00, // 0x49 'I' + 0x10, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x4A 'J' + 0x3F, 0x04, 0x0C, 0x12, 0x21, 0x00, // 0x4B 'K' + 0x3F, 0x20, 0x20, 0x20, 0x20, 0x00, // 0x4C 'L' + 0x3F, 0x02, 0x04, 0x02, 0x3F, 0x00, // 0x4D 'M' + 0x3F, 0x02, 0x0C, 0x10, 0x3F, 0x00, // 0x4E 'N' + 0x1E, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x4F 'O' + 0x3F, 0x09, 0x09, 0x09, 0x06, 0x00, // 0x50 'P' + 0x1E, 0x21, 0x29, 0x11, 0x2E, 0x00, // 0x51 'Q' + 0x3F, 0x09, 0x09, 0x19, 0x26, 0x00, // 0x52 'R' + 0x12, 0x25, 0x25, 0x29, 0x12, 0x00, // 0x53 'S' + 0x01, 0x01, 0x3F, 0x01, 0x01, 0x00, // 0x54 'T' + 0x1F, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x55 'U' + 0x07, 0x18, 0x20, 0x18, 0x07, 0x00, // 0x56 'V' + 0x0F, 0x30, 0x0C, 0x30, 0x0F, 0x00, // 0x57 'W' + 0x21, 0x12, 0x0C, 0x12, 0x21, 0x00, // 0x58 'X' + 0x03, 0x04, 0x38, 0x04, 0x03, 0x00, // 0x59 'Y' + 0x31, 0x29, 0x25, 0x23, 0x21, 0x00, // 0x5A 'Z' + 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, // 0x5B '[' + 0x01, 0x02, 0x0C, 0x10, 0x20, 0x00, // 0x5C '\' + 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, // 0x5D ']' + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, // 0x5E '^' + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x5F '_' + 0x00, 0x01, 0x03, 0x04, 0x00, 0x00, // 0x60 '`' + 0x10, 0x2A, 0x2A, 0x2A, 0x3C, 0x00, // 0x61 'a' + 0x3F, 0x24, 0x22, 0x22, 0x1C, 0x00, // 0x62 'b' + 0x1C, 0x22, 0x22, 0x22, 0x24, 0x00, // 0x63 'c' + 0x1C, 0x22, 0x22, 0x24, 0x3F, 0x00, // 0x64 'd' + 0x1C, 0x2A, 0x2A, 0x2A, 0x0C, 0x00, // 0x65 'e' + 0x00, 0x04, 0x3E, 0x05, 0x05, 0x00, // 0x66 'f' + 0x0C, 0x52, 0x52, 0x54, 0x3E, 0x00, // 0x67 'g' + 0x3F, 0x08, 0x04, 0x04, 0x38, 0x00, // 0x68 'h' + 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, // 0x69 'i' + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, // 0x6A 'j' + 0x3F, 0x08, 0x08, 0x14, 0x22, 0x00, // 0x6B 'k' + 0x00, 0x01, 0x3F, 0x20, 0x00, 0x00, // 0x6C 'l' + 0x3E, 0x02, 0x3C, 0x02, 0x3C, 0x00, // 0x6D 'm' + 0x3E, 0x04, 0x02, 0x02, 0x3C, 0x00, // 0x6E 'n' + 0x1C, 0x22, 0x22, 0x22, 0x1C, 0x00, // 0x6F 'o' + 0x7E, 0x14, 0x22, 0x22, 0x1C, 0x00, // 0x70 'p' + 0x1C, 0x22, 0x22, 0x14, 0x7E, 0x00, // 0x71 'q' + 0x3E, 0x04, 0x02, 0x02, 0x04, 0x00, // 0x72 'r' + 0x24, 0x2A, 0x2A, 0x2A, 0x12, 0x00, // 0x73 's' + 0x00, 0x02, 0x1F, 0x22, 0x00, 0x00, // 0x74 't' + 0x1E, 0x20, 0x20, 0x10, 0x3E, 0x00, // 0x75 'u' + 0x06, 0x18, 0x20, 0x18, 0x06, 0x00, // 0x76 'v' + 0x0E, 0x30, 0x0C, 0x30, 0x0E, 0x00, // 0x77 'w' + 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, // 0x78 'x' + 0x0E, 0x50, 0x50, 0x48, 0x3E, 0x00, // 0x79 'y' + 0x22, 0x32, 0x2A, 0x26, 0x22, 0x00, // 0x7A 'z' + 0x08, 0x08, 0x77, 0x41, 0x41, 0x00, // 0x7B '{' + 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, // 0x7C '|' + 0x41, 0x41, 0x77, 0x08, 0x08, 0x00, // 0x7D '}' + 0x18, 0x04, 0x08, 0x10, 0x0C, 0x00, // 0x7E '~' + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x7F + + /////////////////////////////////////////////////////////////////////////// + // Keyball logo + + // Logo 1/3 (0x80 ~ 0x8F) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, + 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, + 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, + 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, + + // Logo 2/3 (0x90 ~ 0x9F) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, + 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, + 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, + 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, + 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, + 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, + 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, + 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, + 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, + 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + + // Logo 3/3 (0xA0 ~ 0xAF) + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x7F, + 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, + 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, + 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, + 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, + 0x03, 0x00, 0x00, 0x03, 0x03, 0x03, + + /////////////////////////////////////////////////////////////////////////// + // Special characters for Keyball + + // 0xB0 + 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, // B0: blank indicator (BL) + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, // B1: vertical label separator + 0x3E, 0x63, 0x5D, 0x5D, 0x63, 0x7F, // B2, B3: + 0x41, 0x7B, 0x77, 0x41, 0x3E, 0x00, // "ON" in 2 chars with light bg. + 0x00, 0x1C, 0x22, 0x22, 0x1C, 0x00, // B4, B5: + 0x3E, 0x0A, 0x00, 0x3E, 0x0A, 0x00, // "OFF" in 2 chars + 0x32, 0x2A, 0x3C, 0x00, 0x26, 0x28, // B6, B7: + 0x1E, 0x00, 0x1C, 0x2A, 0x2C, 0x00, // "aye" in 2 chars + 0x00, 0x00, 0x3F, 0x09, 0x36, 0x00, // B8: right half "R" indicate "row" + 0x00, 0x00, 0x1E, 0x21, 0x21, 0x00, // B9: right halc "C" indicate "column" + 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, // BA, BB: + 0x37, 0x00, 0x1E, 0x21, 0x21, 0x00, // "KC" in 2 chars right aligned + 0x1E, 0x21, 0x21, 0x00, 0x3F, 0x09, // BC, BD: + 0x06, 0x00, 0x21, 0x3F, 0x21, 0x00, // "CPI" in 2 chars + 0x22, 0x25, 0x19, 0x00, 0x1E, 0x21, // BE, BF: + 0x21, 0x00, 0x3F, 0x09, 0x36, 0x00, // "SCR" in 2 chars indicate "scroll" + + // 0xC0 + 0x3F, 0x21, 0x1E, 0x00, 0x21, 0x3F, // C0, C1: + 0x21, 0x00, 0x0F, 0x30, 0x0F, 0x00, // "DIV" in 2 chars indicate "divider" + 0x3E, 0x09, 0x3E, 0x00, 0x3F, 0x06, // C2, C3: + 0x3F, 0x00, 0x3F, 0x20, 0x20, 0x00, // "AML" in 2 chars +}; +// clang-format on diff --git a/keyboards/yowkees/keyball/lib/oledkit/oledkit.c b/keyboards/yowkees/keyball/lib/oledkit/oledkit.c new file mode 100644 index 00000000000..04e67517a9e --- /dev/null +++ b/keyboards/yowkees/keyball/lib/oledkit/oledkit.c @@ -0,0 +1,61 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include "quantum.h" + +#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) + +__attribute__((weak)) void oledkit_render_logo_user(void) { + // Require `OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c"` + char ch = 0x80; + for (int y = 0; y < 3; y++) { + oled_write_P(PSTR(" "), false); + for (int x = 0; x < 16; x++) { + oled_write_char(ch++, false); + } + oled_advance_page(false); + } +} + +__attribute__((weak)) void oledkit_render_info_user(void) { + oledkit_render_logo_user(); +} + +__attribute__((weak)) bool oled_task_user(void) { + if (is_keyboard_master()) { + oledkit_render_info_user(); + } else { + oledkit_render_logo_user(); + } + return true; +} + +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { + // Logo needs to be rotated 180 degrees. + // + // A typical OLED has a narrow margin on the left side near the origin, and + // a wide margin on the right side. The Keyball logo consists of three + // lines. If the logo is displayed on an OLED consisting of four lines, the + // margin on the right side will be too large and the balance is not good. + // + // Additionally, by rotating it, the left side of the logo will be above + // the OLED screen, giving it a natural look. + return !is_keyboard_master() ? OLED_ROTATION_180 : rotation; +} + +#endif // OLED_ENABLE diff --git a/keyboards/yowkees/keyball/lib/oledkit/oledkit.h b/keyboards/yowkees/keyball/lib/oledkit/oledkit.h new file mode 100644 index 00000000000..c8865eb4525 --- /dev/null +++ b/keyboards/yowkees/keyball/lib/oledkit/oledkit.h @@ -0,0 +1,34 @@ +/* +Copyright 2021 @Yowkees +Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) + +// oledkit_render_info_user renders keyboard's internal state information to +// primary board. A keymap can override this by defining a function with same +// signature. +// +// It render a logo as default. +void oledkit_render_info_user(void); + +// oledkit_render_logo_user renders a logo of keyboard to secondary board. +// A keymap can override this by defining a function with same signature. +void oledkit_render_logo_user(void); + +#endif // OLED_ENABLE diff --git a/keyboards/yowkees/keyball/one47/.noci b/keyboards/yowkees/keyball/one47/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/yowkees/keyball/one47/config.h b/keyboards/yowkees/keyball/one47/config.h new file mode 100644 index 00000000000..696ed8cafee --- /dev/null +++ b/keyboards/yowkees/keyball/one47/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +// Key matrix parameters (KeyballONE46 is duplex matrix) +#define MATRIX_ROWS (4) // split keyboard +#define MATRIX_COLS (6 * 2) // duplex matrix +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D2, D4, C6, D7, E6, B4 } +#define MATRIX_MASKED +#define DEBOUNCE 5 + +// RGB LED settings +#define WS2812_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 20 +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 255 // limitated for power consumption +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 17 +# endif +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 17 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +#endif + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" +# define OLED_FONT_START 32 +# define OLED_FONT_END 195 +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_8BIT +#endif + +// To squeeze firmware size +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/one47/info.json b/keyboards/yowkees/keyball/one47/info.json new file mode 100644 index 00000000000..2dc4e864733 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/info.json @@ -0,0 +1,68 @@ +{ + "usb": { + "vid": "0x5957", + "pid": "0x0300", + "device_version": "0.1.0" + }, + "manufacturer": "Yowkees", + "keyboard_name": "KeyballONE47", + "rgblight": { + "driver": "ws2812" + }, + "layouts": { + "LAYOUT_right_ball": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 8, "y": 0 }, + { "label": "K07", "x": 9, "y": 0 }, + { "label": "K08", "x":10, "y": 0 }, + { "label": "K09", "x":11, "y": 0 }, + { "label": "K0A", "x":12, "y": 0 }, + { "label": "K0B", "x":13, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1 }, + { "label": "K11", "x": 1, "y": 1 }, + { "label": "K12", "x": 2, "y": 1 }, + { "label": "K13", "x": 3, "y": 1 }, + { "label": "K14", "x": 4, "y": 1 }, + { "label": "K15", "x": 5, "y": 1 }, + { "label": "K16", "x": 8, "y": 1 }, + { "label": "K17", "x": 9, "y": 1 }, + { "label": "K18", "x":10, "y": 1 }, + { "label": "K19", "x":11, "y": 1 }, + { "label": "K1A", "x":12, "y": 1 }, + { "label": "K1B", "x":13, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2 }, + { "label": "K21", "x": 1, "y": 2 }, + { "label": "K22", "x": 2, "y": 2 }, + { "label": "K23", "x": 3, "y": 2 }, + { "label": "K24", "x": 4, "y": 2 }, + { "label": "K25", "x": 5, "y": 2 }, + { "label": "K35", "x": 6, "y": 2 }, + { "label": "K38", "x": 7, "y": 2 }, + { "label": "K26", "x": 8, "y": 2 }, + { "label": "K27", "x": 9, "y": 2 }, + { "label": "K28", "x":10, "y": 2 }, + { "label": "K29", "x":11, "y": 2 }, + { "label": "K2A", "x":12, "y": 2 }, + { "label": "K2B", "x":13, "y": 2 }, + + { "label": "K30", "x": 1, "y": 3 }, + { "label": "K31", "x": 2, "y": 3 }, + { "label": "K32", "x": 3, "y": 3 }, + { "label": "K33", "x": 4, "y": 3 }, + { "label": "K34", "x": 5, "y": 3 }, + { "label": "K36", "x": 6, "y": 3 }, + { "label": "K37", "x": 7, "y": 3 }, + { "label": "K39", "x": 8, "y": 3 }, + { "label": "K3A", "x":12, "y": 3 } + ] + } + } +} diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/config.h b/keyboards/yowkees/keyball/one47/keymaps/default/config.h new file mode 100644 index 00000000000..a05a1cc5b9d --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/default/config.h @@ -0,0 +1,36 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 + +#define TAP_CODE_DELAY 5 diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c new file mode 100644 index 00000000000..94102e524af --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c @@ -0,0 +1,70 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_right_ball( + KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , + MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , + KC_LCTL , KC_LALT ,KC_LGUI ,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC, KC_ENT , KC_RALT + ), + + [1] = LAYOUT_right_ball( + S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), + S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , + _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS),S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), + S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , S(KC_RALT) + ), + + [2] = LAYOUT_right_ball( + SSNP_FRE , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , + SSNP_VRT , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + SSNP_HOR , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ + ), + + [3] = LAYOUT_right_ball( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , QK_BOOT , EE_CLR , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + // Auto enable scroll mode when the highest layer is 3 + keyball_set_scroll_mode(get_highest_layer(state) == 3); + return state; +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/config.h b/keyboards/yowkees/keyball/one47/keymaps/develop/config.h new file mode 100644 index 00000000000..7c18d0969f7 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/develop/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# 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 diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c new file mode 100644 index 00000000000..d3759ee75c1 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // keymap for development + [0] = LAYOUT_right_ball( + KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_TAB , KC_BSPC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_MS_BTN2, KC_ESC , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RGUI + ), + + [1] = LAYOUT_right_ball( + RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , + RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , QK_BOOT , EE_CLR , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), +}; +// clang-format on + +void keyboard_post_init_user(void) { +#ifdef CONSOLE_ENABLE + debug_enable = true; +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk new file mode 100644 index 00000000000..98615de5f51 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes + +# for debug +#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/config.h b/keyboards/yowkees/keyball/one47/keymaps/test/config.h new file mode 100644 index 00000000000..8aa86c31c1c --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/test/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test +# undef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 63 +#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c new file mode 100644 index 00000000000..965dd0a1441 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "quantum.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_right_ball( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , + KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_EQL , KC_BSLS , KC_GRV , KC_LALT , KC_BSPC , KC_LGUI , KC_APP , KC_SPC , KC_ESC + ), +}; +// clang-format on + +void keyboard_post_init_user() { +#ifdef RGBLIGHT_ENABLE + // Force RGB lights to show test animation without writing EEPROM. + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +#endif +} + +#ifdef OLED_ENABLE + +# include "lib/oledkit/oledkit.h" + +void oledkit_render_info_user(void) { + keyball_oled_render_keyinfo(); + keyball_oled_render_ballinfo(); + keyball_oled_render_layerinfo(); +} +#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk new file mode 100644 index 00000000000..5746ccd2854 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes + +OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/one47.c b/keyboards/yowkees/keyball/one47/one47.c new file mode 100644 index 00000000000..ee028c45d4a --- /dev/null +++ b/keyboards/yowkees/keyball/one47/one47.c @@ -0,0 +1,97 @@ +/* +Copyright 2022 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "lib/keyball/keyball.h" +#include "lib/duplexmatrix/duplexmatrix.h" + +////////////////////////////////////////////////////////////////////////////// + +// clang-format off + +const matrix_row_t matrix_mask[MATRIX_ROWS] = { + 0b111111111111, + 0b111111111111, + 0b111111111111, + 0b011111111111, +}; + +const uint8_t row3_order_data[] = { + 0, 1, 2, 3, 9, 8, 7, 6, 5, 4, 10 +}; + +////////////////////////////////////////////////////////////////////////////// + +static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { + extern void matrix_io_delay(void); + setPinInputHigh(in_pin); + setPinOutput(out_pin); + writePinLow(out_pin); + wait_us(1); + uint8_t pin_state = readPin(in_pin); + setPinInputHigh(out_pin); + matrix_io_delay(); + return pin_state; +} + +static uint16_t bitrev12(uint16_t bits) { + return bitrev16(bits) >> 4; +} + +static uint16_t row3_order(uint16_t bits) { + uint16_t r = 0; + for (int i = 0; i < sizeof(row3_order_data) / sizeof(row3_order_data[0]); i++) { + uint8_t shift = row3_order_data[i]; + r |= ((bits & (1 << shift)) >> shift) << i; + } + return r; +} + +static bool isLeftBall = false; + +////////////////////////////////////////////////////////////////////////////// + +// the ball on left side. +bool is_keyboard_left(void) { + return isLeftBall; +} + +void keyboard_pre_init_kb(void) { + isLeftBall = !peek_matrix_intersection(B4, F7); + keyboard_pre_init_user(); +} + +void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) { + if (isLeftBall) { + out_matrix[0] = bitrev12(out_matrix[0]); + out_matrix[1] = bitrev12(out_matrix[1]); + out_matrix[2] = bitrev12(out_matrix[2]); + out_matrix[3] = row3_order(out_matrix[3]); + } +} + +void keyball_on_adjust_layout(keyball_adjust_t v) { +#ifdef VIA_ENABLE + uint32_t curr = via_get_layout_options(); + uint32_t next = (curr & ~0x01) | (isLeftBall ? 0x01 : 0x00); + if (next != curr) { + via_set_layout_options(next); + } +#endif +} diff --git a/keyboards/yowkees/keyball/one47/one47.h b/keyboards/yowkees/keyball/one47/one47.h new file mode 100644 index 00000000000..e1480a864af --- /dev/null +++ b/keyboards/yowkees/keyball/one47/one47.h @@ -0,0 +1,54 @@ +/* +Copyright 2021 @Yowkees +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "lib/keyball/keyball.h" + +// clang-format off + +#define LAYOUT_right_ball( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K35, K38, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K36, K37, K39, K3A \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO } \ + } + +#define LAYOUT_left_ball( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K35, K38, K26, K27, K28, K29, K2A, K2B, \ + K3A, K34, K36, K37, K39, K33, K32, K31, K30 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO } \ + } + +// clang-format on + +#define LAYOUT LAYOUT_right_ball diff --git a/keyboards/yowkees/keyball/one47/readme.md b/keyboards/yowkees/keyball/one47/readme.md new file mode 100644 index 00000000000..4626c81cb50 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/readme.md @@ -0,0 +1,20 @@ +# KeyballONE47 + +![KeyballONE47]() + +A split keyboard with 47 vertically staggered keys and 34mm track ball. + +* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: KeyballONE47 PCB, ProMicro +* Hardware Availability: + Unavailable + +Make example for this keyboard (after setting up your build environment): + + make keyball/one47:test + +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). + +## Special keycodes + +See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/one47/rules.mk b/keyboards/yowkees/keyball/one47/rules.mk new file mode 100644 index 00000000000..bea0565dcc1 --- /dev/null +++ b/keyboards/yowkees/keyball/one47/rules.mk @@ -0,0 +1,53 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Link Time Optimization required for size. +LTO_ENABLE = yes + +# Build Options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output + +# Duplex matrix. +CUSTOM_MATRIX = lite +SRC += lib/duplexmatrix/duplexmatrix.c + +# One47 is non-split keyboard. +SPLIT_KEYBOARD = no + +# Optical sensor driver for trackball. +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += drivers/pmw3360/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate + +# This is unnecessary for processing KC_MS_BTN*. +MOUSEKEY_ENABLE = no + +# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. +RGBLIGHT_ENABLE = no # Enable RGBLIGHT +RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) +RGB_MATRIX_DRIVER = ws2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# To support OLED +OLED_ENABLE = no # Please Enable this in each keymaps. +SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. + +# Include common library +SRC += lib/keyball/keyball.c + +# Disable other features to squeeze firmware size +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/readme.md b/keyboards/yowkees/keyball/readme.md new file mode 100644 index 00000000000..3027c69d05f --- /dev/null +++ b/keyboards/yowkees/keyball/readme.md @@ -0,0 +1,84 @@ +# Keyball series + +This directory includes source code of Keyball keyboard series: + +| Name | Description +|---------------|------------------------------------------------------------- +|[Keyball46](./keyball46)|A split keyboard with 46 vertically staggered keys and 34mm track ball. +|[Keyball61](./keyball61)|A split keyboard with 61 vertically staggered keys and 34mm track ball. +|[Keyball39](./keyball39)|A split keyboard with 39 vertically staggered keys and 34mm track ball. +|[ONE47](./one47)|A keyboard with 47 vertically keys and 34mm trackball. It will support BLE Micro Pro. +|[Keyball44](./keyball44)|A split keyboard with 44 vertically staggered keys and 34mm track ball. + +* Keyboard Designer: [@Yowkees](https://twitter.com/Yowkees) +* Hardware Supported: ProMicro like footprint +* Hardware Availability: See [Where to Buy](../../../README.md#where-to-buy) + +See each directories for each keyboards in a table above. + +## How to build + +1. Check out this repository. + + ```console + $ git clone https://github.com/Yowkees/keyball.git keyball + ``` + +2. Check out [qmk/qmk_firmware](https://github.com/qmk/qmk_firmware/) repository in another place. + + ```console + $ git clone https://github.com/qmk/qmk_firmware.git --depth 1 --recurse-submodules --shallow-submodules -b 0.22.14 qmk + ``` + + Currently Keyball firmwares are verified to compile with QMK 0.22.14 + +3. Create a symbolic link to this `keyball/` directory from [qmk/qmk_firmware]'s `keyboards/` directory. + + ```console + $ ls + keyball/ qmk/ + + $ cd qmk/keyboards + $ ln -s ../../keyball/qmk_firmware/keyboards/keyball keyball + $ ls keyball/ + drivers/ keyball39/ keyball44/ keyball46/ keyball61/ lib/ one47/ readme.md + $ cd .. + ``` + +4. `make` your Keyball firmware. + + ```console + # Build Keyball39 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball39:default + + # Build Keyball44 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball44:default + + # Build Keyball61 firmware with "default" keymap + $ make SKIP_GIT=yes keyball/keyball61:default + ``` + +There are three keymaps provided at least: + +* `via` - Standard version with [Remap](https://remap-keys.app/) or VIA to change keymap +* `test` - Easy-to-use version for checking operation at build time +* `default` - Base version for creating your own customized firmware + +## How to create your keymap + +1. Fork this Yowkees/keyball repository +2. Checkout forked repository +3. (OPTIONAL) Create a new branch +4. Add a your keymap, or make some changes +5. Commit changes and push it to your forked repository +6. Open your forked repository with web browser +7. Click and open "Actions" tab +8. Click "Build a firmware on demand" in Workflows on left panel +9. Press "Run workflow" button on right side, then you will see forms +10. (OPTIONAL) Select a your working branch +11. Select a "Keyboard" from drop-down list +12. Enter the "keymap" you want to build +13. Click "Run workflow" +14. Wait a minute until the firmware build is finished +15. Click a latest workflow run and open details +16. Download built firmware in "Artifacts" section From 023eb002ac34539933d82231a99cb64843e1cf13 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Mon, 26 May 2025 21:41:10 +0200 Subject: [PATCH 08/22] halves communicate now, also keyball communicates thru SPLIT_POINTING_ENABLE. need removing RPC code (keyball, CPI etc. related) --- keyboards/yowkees/keyball/keyball61/config.h | 3 + keyboards/yowkees/keyball/keyball61/rules.mk | 2 +- .../keyball/lib/duplexmatrix/duplexmatrix.c | 177 ------------------ .../keyball/lib/duplexmatrix/duplexmatrix.h | 20 -- .../yowkees/keyball/lib/keyball/keyball.c | 5 +- keyboards/yowkees/keyball/lib/matrix.c | 82 ++++++++ 6 files changed, 87 insertions(+), 202 deletions(-) delete mode 100644 keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c delete mode 100644 keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h create mode 100644 keyboards/yowkees/keyball/lib/matrix.c diff --git a/keyboards/yowkees/keyball/keyball61/config.h b/keyboards/yowkees/keyball/keyball61/config.h index 47d92432208..a99895954c4 100644 --- a/keyboards/yowkees/keyball/keyball61/config.h +++ b/keyboards/yowkees/keyball/keyball61/config.h @@ -87,5 +87,8 @@ along with this program. If not, see . #define SPI_MOSI_PIN B2 #define SPI_MISO_PIN B3 +#define SPLIT_POINTING_ENABLE +#define POINTING_DEVICE_LEFT + #define POINTING_DEVICE_ROTATION_90 #define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/yowkees/keyball/keyball61/rules.mk b/keyboards/yowkees/keyball/keyball61/rules.mk index d363d22f540..1e7dc313083 100644 --- a/keyboards/yowkees/keyball/keyball61/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/rules.mk @@ -18,7 +18,7 @@ AUDIO_ENABLE = no # Audio output # Duplex matrix. CUSTOM_MATRIX = lite -SRC += lib/duplexmatrix/duplexmatrix.c +SRC += lib/matrix.c # Keyball61 is split keyboard. SPLIT_KEYBOARD = yes diff --git a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c deleted file mode 100644 index 97fa4217532..00000000000 --- a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include -#include "quantum.h" -#include "matrix.h" -#include "debounce.h" - -#ifdef SPLIT_KEYBOARD -# include "split_common/split_util.h" -# include "split_common/transactions.h" -#endif - -#ifdef SPLIT_KEYBOARD -# define PINNUM_ROW (MATRIX_ROWS / 2) -# define ROWS_PER_HAND (MATRIX_ROWS / 2) -#else -# define PINNUM_ROW (MATRIX_ROWS) -# define ROWS_PER_HAND (MATRIX_ROWS) -#endif -#define PINNUM_COL (MATRIX_COLS / 2) - -#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) - -static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; -static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; - -static inline void set_pin_input(pin_t pin) { - setPinInputHigh(pin); -} - -static void set_pins_input(pin_t* pins, uint8_t n) { - for (uint8_t i = 0; i < n; i++) { - set_pin_input(pins[i]); - } -} - -static inline void set_pin_output(pin_t pin) { - setPinOutput(pin); - writePinLow(pin); -} - -static inline bool get_pin(pin_t pin) { - return readPin(pin); -} - -__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} - -static void duplex_scan_raw(matrix_row_t out_matrix[]) { - // scan column to row - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - set_pin_output(row_pins[row]); - matrix_output_select_delay(); - for (uint8_t col = 0; col < PINNUM_COL; col++) { - if (!get_pin(col_pins[col])) { - out_matrix[row] |= 1 << col; - } - } - set_pin_input(row_pins[row]); - matrix_output_unselect_delay(row, false); - } - - // scan row to column. - for (uint8_t col = 0; col < PINNUM_COL; col++) { - set_pin_output(col_pins[col]); - matrix_output_select_delay(); - matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (!get_pin(row_pins[row])) { - out_matrix[row] |= shifter; - } - } - set_pin_input(col_pins[col]); - matrix_output_unselect_delay(col, false); - } - - duplex_scan_raw_post_kb(out_matrix); -} - -static bool duplex_scan(matrix_row_t current_matrix[]) { - bool changed = false; - matrix_row_t tmp[MATRIX_ROWS] = {0}; - - duplex_scan_raw(tmp); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (tmp[row] != current_matrix[row]) { - changed = true; - current_matrix[row] = tmp[row]; - } - } - return changed; -} - -#ifdef SPLIT_KEYBOARD -static uint8_t thisHand, thatHand; -#else -# define thisHand 0 -#endif - -void matrix_init_custom(void) { -#ifdef SPLIT_KEYBOARD - split_pre_init(); -#endif - - set_pins_input(col_pins, PINNUM_COL); - set_pins_input(row_pins, PINNUM_ROW); - -#ifdef SPLIT_KEYBOARD - thisHand = isLeftHand ? 0 : ROWS_PER_HAND; - thatHand = ROWS_PER_HAND - thisHand; - - split_post_init(); -#endif -} - -#ifdef SPLIT_KEYBOARD - -// user-defined overridable functions -__attribute__((weak)) void matrix_slave_scan_kb(void) { - matrix_slave_scan_user(); -} - -__attribute__((weak)) void matrix_slave_scan_user(void) {} - -#endif - -// declare matrix buffers which defined in quantum/matrix_common.c -extern matrix_row_t raw_matrix[MATRIX_ROWS]; -extern matrix_row_t matrix[MATRIX_ROWS]; - -uint8_t matrix_scan(void) { - bool changed = duplex_scan(raw_matrix); - - debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - -#ifdef SPLIT_KEYBOARD - if (!is_keyboard_master()) { - // send to primary. - transport_slave(matrix + thatHand, matrix + thisHand); - matrix_slave_scan_kb(); - return changed; - } - - // receive from secondary. - static bool last_connected = false; - matrix_row_t* that_raw = raw_matrix + ROWS_PER_HAND; - memset(that_raw, 0, MATRIXSIZE_PER_HAND); - if (transport_master_if_connected(matrix + thisHand, that_raw)) { - last_connected = true; - if (memcmp(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND) != 0) { - memcpy(matrix + thatHand, that_raw, MATRIXSIZE_PER_HAND); - changed = true; - } - } else if (last_connected) { - last_connected = false; - memset(matrix + thatHand, 0, MATRIXSIZE_PER_HAND); - changed = true; - } -#endif - - matrix_scan_kb(); - return changed; -} diff --git a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h b/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h deleted file mode 100644 index 44f57c629aa..00000000000 --- a/keyboards/yowkees/keyball/lib/duplexmatrix/duplexmatrix.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]); diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.c b/keyboards/yowkees/keyball/lib/keyball/keyball.c index 97874adcccd..90f100ef8e5 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.c +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.c @@ -19,10 +19,7 @@ along with this program. If not, see . #ifdef SPLIT_KEYBOARD # include "transactions.h" #endif - #include "keyball.h" -//#include "drivers/pmw3360/pmw3360.h" - #include #ifdef POINTING_DEVICE_ENABLE @@ -643,7 +640,7 @@ void keyboard_post_init_kb(void) { #ifdef POINTING_DEVICE_ENABLE void housekeeping_task_kb(void) { - if (is_keyboard_master() && 1 ==2) { + if (is_keyboard_master() && 1 == 2) { rpc_get_info_invoke(); if (keyball.that_have_ball) { rpc_get_motion_invoke(); diff --git a/keyboards/yowkees/keyball/lib/matrix.c b/keyboards/yowkees/keyball/lib/matrix.c new file mode 100644 index 00000000000..f0625c40a4e --- /dev/null +++ b/keyboards/yowkees/keyball/lib/matrix.c @@ -0,0 +1,82 @@ +#include "quantum.h" +#include "matrix.h" +#include "debounce.h" + +#ifdef SPLIT_KEYBOARD +# define PINNUM_ROW (MATRIX_ROWS / 2) +# define ROWS_PER_HAND (MATRIX_ROWS / 2) +#else +# define PINNUM_ROW (MATRIX_ROWS) +# define ROWS_PER_HAND (MATRIX_ROWS) +#endif +#define PINNUM_COL (MATRIX_COLS / 2) + +#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) + +static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; +static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; + +static void set_pins_input(pin_t* pins, uint8_t n) { + for (uint8_t i = 0; i < n; i++) { + gpio_set_pin_input_high(pins[i]); + } +} + +static inline void set_pin_output(pin_t pin) { + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); +} + +static inline bool get_pin(pin_t pin) { + return gpio_read_pin(pin); +} + +void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} + +static void duplex_scan_raw(matrix_row_t out_matrix[]) { + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + set_pin_output(row_pins[row]); + matrix_output_select_delay(); + for (uint8_t col = 0; col < PINNUM_COL; col++) { + if (!get_pin(col_pins[col])) { + out_matrix[row] |= 1 << col; + } + } + gpio_set_pin_input_high(row_pins[row]); + matrix_output_unselect_delay(row, false); + } + + for (uint8_t col = 0; col < PINNUM_COL; col++) { + set_pin_output(col_pins[col]); + matrix_output_select_delay(); + matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (!get_pin(row_pins[row])) { + out_matrix[row] |= shifter; + } + } + gpio_set_pin_input_high(col_pins[col]); + matrix_output_unselect_delay(col, false); + } + + duplex_scan_raw_post_kb(out_matrix); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + matrix_row_t tmp[MATRIX_ROWS] = {0}; + + duplex_scan_raw(tmp); + for (uint8_t row = 0; row < PINNUM_ROW; row++) { + if (tmp[row] != current_matrix[row]) { + changed = true; + current_matrix[row] = tmp[row]; + } + } + return changed; +} + +void matrix_init_custom(void) { + set_pins_input(col_pins, PINNUM_COL); + set_pins_input(row_pins, PINNUM_ROW); +} From 7dad4848393a1d7eb006f9443bcbda416e875847 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Mon, 26 May 2025 22:15:58 +0200 Subject: [PATCH 09/22] keyboard.json, a bit of cleaning --- keyboards/yowkees/keyball/keyball61/config.h | 6 - keyboards/yowkees/keyball/keyball61/info.json | 86 ----- .../yowkees/keyball/keyball61/keyball61.h | 84 ----- .../yowkees/keyball/keyball61/keyboard.json | 300 ++++++++++++++++++ .../keyball61/keymaps/default/keymap.c | 2 +- .../keyball61/keymaps/default/rules.mk | 4 +- keyboards/yowkees/keyball/keyball61/rules.mk | 16 +- 7 files changed, 304 insertions(+), 194 deletions(-) delete mode 100644 keyboards/yowkees/keyball/keyball61/info.json create mode 100644 keyboards/yowkees/keyball/keyball61/keyboard.json diff --git a/keyboards/yowkees/keyball/keyball61/config.h b/keyboards/yowkees/keyball/keyball61/config.h index a99895954c4..dfb7901e5c3 100644 --- a/keyboards/yowkees/keyball/keyball61/config.h +++ b/keyboards/yowkees/keyball/keyball61/config.h @@ -44,13 +44,7 @@ along with this program. If not, see . #define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI // RGB LED settings -#define WS2812_DI_PIN D3 #ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_LED_COUNT 74 -# define RGBLED_SPLIT { 37, 37 } -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 120 // limitated for power consumption -# endif # ifndef RGBLIGHT_VAL_STEP # define RGBLIGHT_VAL_STEP 12 # endif diff --git a/keyboards/yowkees/keyball/keyball61/info.json b/keyboards/yowkees/keyball/keyball61/info.json deleted file mode 100644 index c4a6f6f2796..00000000000 --- a/keyboards/yowkees/keyball/keyball61/info.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0100", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball61", - "rgblight": { - "driver": "ws2812" - }, - "layouts": { - "LAYOUT_no_ball": { - "layout": [ - { "label": "L00", "x": 0, "y": 0 }, - { "label": "L01", "x": 1, "y": 0 }, - { "label": "L02", "x": 2, "y": 0 }, - { "label": "L03", "x": 3, "y": 0 }, - { "label": "L04", "x": 4, "y": 0 }, - { "label": "L05", "x": 5, "y": 0 }, - { "label": "R05", "x": 8, "y": 0 }, - { "label": "R04", "x": 9, "y": 0 }, - { "label": "R03", "x":10, "y": 0 }, - { "label": "R02", "x":11, "y": 0 }, - { "label": "R01", "x":12, "y": 0 }, - { "label": "R00", "x":13, "y": 0 }, - - { "label": "L10", "x": 0, "y": 1 }, - { "label": "L11", "x": 1, "y": 1 }, - { "label": "L12", "x": 2, "y": 1 }, - { "label": "L13", "x": 3, "y": 1 }, - { "label": "L14", "x": 4, "y": 1 }, - { "label": "L15", "x": 5, "y": 1 }, - { "label": "R15", "x": 8, "y": 1 }, - { "label": "R14", "x": 9, "y": 1 }, - { "label": "R13", "x":10, "y": 1 }, - { "label": "R12", "x":11, "y": 1 }, - { "label": "R11", "x":12, "y": 1 }, - { "label": "R10", "x":13, "y": 1 }, - - { "label": "L20", "x": 0, "y": 2 }, - { "label": "L21", "x": 1, "y": 2 }, - { "label": "L22", "x": 2, "y": 2 }, - { "label": "L23", "x": 3, "y": 2 }, - { "label": "L24", "x": 4, "y": 2 }, - { "label": "L25", "x": 5, "y": 2 }, - { "label": "R25", "x": 8, "y": 2 }, - { "label": "R24", "x": 9, "y": 2 }, - { "label": "R23", "x":10, "y": 2 }, - { "label": "R22", "x":11, "y": 2 }, - { "label": "R21", "x":12, "y": 2 }, - { "label": "R20", "x":13, "y": 2 }, - - { "label": "L30", "x": 0, "y": 3 }, - { "label": "L31", "x": 1, "y": 3 }, - { "label": "L32", "x": 2, "y": 3 }, - { "label": "L33", "x": 3, "y": 3 }, - { "label": "L34", "x": 4, "y": 3 }, - { "label": "L35", "x": 5, "y": 3 }, - { "label": "L36", "x": 6, "y": 3 }, - { "label": "R36", "x": 7, "y": 3 }, - { "label": "R35", "x": 8, "y": 3 }, - { "label": "R34", "x": 9, "y": 3 }, - { "label": "R33", "x":10, "y": 3 }, - { "label": "R32", "x":11, "y": 3 }, - { "label": "R31", "x":12, "y": 3 }, - { "label": "R30", "x":13, "y": 3 }, - - { "label": "L40", "x": 0, "y": 4 }, - { "label": "L41", "x": 1, "y": 4 }, - { "label": "L42", "x": 2, "y": 4 }, - { "label": "L43", "x": 3, "y": 4 }, - { "label": "L44", "x": 4, "y": 4 }, - { "label": "L45", "x": 5, "y": 4 }, - { "label": "L46", "x": 6, "y": 4 }, - { "label": "R46", "x": 7, "y": 4 }, - { "label": "R45", "x": 8, "y": 4 }, - { "label": "R44", "x": 9, "y": 4 }, - { "label": "R43", "x":10, "y": 4 }, - { "label": "R42", "x":11, "y": 4 }, - { "label": "R41", "x":12, "y": 4 }, - { "label": "R40", "x":13, "y": 4 } - ] - } - } -} diff --git a/keyboards/yowkees/keyball/keyball61/keyball61.h b/keyboards/yowkees/keyball/keyball61/keyball61.h index 857d83fda8c..ffdf1dc9f75 100644 --- a/keyboards/yowkees/keyball/keyball61/keyball61.h +++ b/keyboards/yowkees/keyball/keyball61/keyball61.h @@ -23,87 +23,3 @@ along with this program. If not, see . // clang-format off -#define LAYOUT_right_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, L45, L46, R46, R45, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ - } - -#define LAYOUT_left_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ - } - -#define LAYOUT_dual_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L45, L46, R46, R45, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, KC_NO, KC_NO, KC_NO, KC_NO, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, KC_NO, KC_NO, KC_NO, KC_NO, R45, R46 } \ - } - -#define LAYOUT_no_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ - ) \ - { \ - { L00, L01, L02, KC_NO, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, KC_NO, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, KC_NO, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, KC_NO, L33, L34, L35, L36 }, \ - { L40, L41, L42, KC_NO, L43, L44, L45, L46 }, \ - { R00, R01, R02, KC_NO, R03, R04, R05, KC_NO }, \ - { R10, R11, R12, KC_NO, R13, R14, R15, KC_NO }, \ - { R20, R21, R22, KC_NO, R23, R24, R25, KC_NO }, \ - { R30, R31, R32, KC_NO, R33, R34, R35, R36 }, \ - { R40, R41, R42, KC_NO, R43, R44, R45, R46 } \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball -#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball61/keyboard.json b/keyboards/yowkees/keyball/keyball61/keyboard.json new file mode 100644 index 00000000000..4e8f532aa43 --- /dev/null +++ b/keyboards/yowkees/keyball/keyball61/keyboard.json @@ -0,0 +1,300 @@ +{ + "manufacturer": "Yowkees", + "keyboard_name": "Keyball61", + "development_board": "promicro", + "usb": { + "vid": "0x5957", + "pid": "0x0100", + "device_version": "1.0.0" + }, + "features": { + "pointing_device": true, + "bootmagic": false, + "extrakey": true, + "oled": true, + "rgblight": true + }, + + "rgblight": { + "driver": "ws2812", + "led_count": 74, + "split_count": [37, 37], + "max_brightness": 120 + }, + "ws2812": { + "driver": "vendor", + "pin": "D3" + }, + "split": { + "enabled": true, + "serial": { + "driver": "vendor" + } + }, + "layout_aliases": { + "LAYOUT": "LAYOUT_right_ball", + "LAYOUT_universal": "LAYOUT_no_ball" + }, + "layouts": { + "LAYOUT_dual_ball": { + "layout": [ + { "label": "L00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "L01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "L02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "L03", "matrix": [0, 4], "x": 3, "y": 0 }, + { "label": "L04", "matrix": [0, 5], "x": 4, "y": 0 }, + { "label": "L05", "matrix": [0, 6], "x": 5, "y": 0 }, + { "label": "R05", "matrix": [5, 6], "x": 6, "y": 0 }, + { "label": "R04", "matrix": [5, 5], "x": 7, "y": 0 }, + { "label": "R03", "matrix": [5, 4], "x": 8, "y": 0 }, + { "label": "R02", "matrix": [5, 2], "x": 9, "y": 0 }, + { "label": "R01", "matrix": [5, 1], "x": 10, "y": 0 }, + { "label": "R00", "matrix": [5, 0], "x": 11, "y": 0 }, + { "label": "L10", "matrix": [1, 0], "x": 12, "y": 0 }, + { "label": "L11", "matrix": [1, 1], "x": 13, "y": 0 }, + { "label": "L12", "matrix": [1, 2], "x": 14, "y": 0 }, + { "label": "L13", "matrix": [1, 4], "x": 15, "y": 0 }, + { "label": "L14", "matrix": [1, 5], "x": 16, "y": 0 }, + { "label": "L15", "matrix": [1, 6], "x": 17, "y": 0 }, + { "label": "R15", "matrix": [6, 6], "x": 18, "y": 0 }, + { "label": "R14", "matrix": [6, 5], "x": 19, "y": 0 }, + { "label": "R13", "matrix": [6, 4], "x": 20, "y": 0 }, + { "label": "R12", "matrix": [6, 2], "x": 21, "y": 0 }, + { "label": "R11", "matrix": [6, 1], "x": 22, "y": 0 }, + { "label": "R10", "matrix": [6, 0], "x": 23, "y": 0 }, + { "label": "L20", "matrix": [2, 0], "x": 24, "y": 0 }, + { "label": "L21", "matrix": [2, 1], "x": 25, "y": 0 }, + { "label": "L22", "matrix": [2, 2], "x": 26, "y": 0 }, + { "label": "L23", "matrix": [2, 4], "x": 27, "y": 0 }, + { "label": "L24", "matrix": [2, 5], "x": 28, "y": 0 }, + { "label": "L25", "matrix": [2, 6], "x": 29, "y": 0 }, + { "label": "R25", "matrix": [7, 6], "x": 30, "y": 0 }, + { "label": "R24", "matrix": [7, 5], "x": 31, "y": 0 }, + { "label": "R23", "matrix": [7, 4], "x": 32, "y": 0 }, + { "label": "R22", "matrix": [7, 2], "x": 33, "y": 0 }, + { "label": "R21", "matrix": [7, 1], "x": 34, "y": 0 }, + { "label": "R20", "matrix": [7, 0], "x": 35, "y": 0 }, + { "label": "L30", "matrix": [3, 0], "x": 36, "y": 0 }, + { "label": "L31", "matrix": [3, 1], "x": 37, "y": 0 }, + { "label": "L32", "matrix": [3, 2], "x": 38, "y": 0 }, + { "label": "L33", "matrix": [3, 4], "x": 39, "y": 0 }, + { "label": "L34", "matrix": [3, 5], "x": 40, "y": 0 }, + { "label": "L35", "matrix": [3, 6], "x": 41, "y": 0 }, + { "label": "L36", "matrix": [3, 7], "x": 42, "y": 0 }, + { "label": "R36", "matrix": [8, 7], "x": 43, "y": 0 }, + { "label": "R35", "matrix": [8, 6], "x": 44, "y": 0 }, + { "label": "R34", "matrix": [8, 5], "x": 45, "y": 0 }, + { "label": "R33", "matrix": [8, 4], "x": 46, "y": 0 }, + { "label": "R32", "matrix": [8, 2], "x": 47, "y": 0 }, + { "label": "R31", "matrix": [8, 1], "x": 48, "y": 0 }, + { "label": "R30", "matrix": [8, 0], "x": 49, "y": 0 }, + { "label": "L40", "matrix": [4, 0], "x": 50, "y": 0 }, + { "label": "L41", "matrix": [4, 1], "x": 51, "y": 0 }, + { "label": "L45", "matrix": [4, 6], "x": 52, "y": 0 }, + { "label": "L46", "matrix": [4, 7], "x": 53, "y": 0 }, + { "label": "R46", "matrix": [9, 7], "x": 54, "y": 0 }, + { "label": "R45", "matrix": [9, 6], "x": 55, "y": 0 }, + { "label": "R41", "matrix": [9, 1], "x": 56, "y": 0 }, + { "label": "R40", "matrix": [9, 0], "x": 57, "y": 0 } + ] + }, + "LAYOUT_left_ball": { + "layout": [ + { "label": "L00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "L01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "L02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "L03", "matrix": [0, 4], "x": 3, "y": 0 }, + { "label": "L04", "matrix": [0, 5], "x": 4, "y": 0 }, + { "label": "L05", "matrix": [0, 6], "x": 5, "y": 0 }, + { "label": "R05", "matrix": [5, 6], "x": 6, "y": 0 }, + { "label": "R04", "matrix": [5, 5], "x": 7, "y": 0 }, + { "label": "R03", "matrix": [5, 4], "x": 8, "y": 0 }, + { "label": "R02", "matrix": [5, 2], "x": 9, "y": 0 }, + { "label": "R01", "matrix": [5, 1], "x": 10, "y": 0 }, + { "label": "R00", "matrix": [5, 0], "x": 11, "y": 0 }, + { "label": "L10", "matrix": [1, 0], "x": 12, "y": 0 }, + { "label": "L11", "matrix": [1, 1], "x": 13, "y": 0 }, + { "label": "L12", "matrix": [1, 2], "x": 14, "y": 0 }, + { "label": "L13", "matrix": [1, 4], "x": 15, "y": 0 }, + { "label": "L14", "matrix": [1, 5], "x": 16, "y": 0 }, + { "label": "L15", "matrix": [1, 6], "x": 17, "y": 0 }, + { "label": "R15", "matrix": [6, 6], "x": 18, "y": 0 }, + { "label": "R14", "matrix": [6, 5], "x": 19, "y": 0 }, + { "label": "R13", "matrix": [6, 4], "x": 20, "y": 0 }, + { "label": "R12", "matrix": [6, 2], "x": 21, "y": 0 }, + { "label": "R11", "matrix": [6, 1], "x": 22, "y": 0 }, + { "label": "R10", "matrix": [6, 0], "x": 23, "y": 0 }, + { "label": "L20", "matrix": [2, 0], "x": 24, "y": 0 }, + { "label": "L21", "matrix": [2, 1], "x": 25, "y": 0 }, + { "label": "L22", "matrix": [2, 2], "x": 26, "y": 0 }, + { "label": "L23", "matrix": [2, 4], "x": 27, "y": 0 }, + { "label": "L24", "matrix": [2, 5], "x": 28, "y": 0 }, + { "label": "L25", "matrix": [2, 6], "x": 29, "y": 0 }, + { "label": "R25", "matrix": [7, 6], "x": 30, "y": 0 }, + { "label": "R24", "matrix": [7, 5], "x": 31, "y": 0 }, + { "label": "R23", "matrix": [7, 4], "x": 32, "y": 0 }, + { "label": "R22", "matrix": [7, 2], "x": 33, "y": 0 }, + { "label": "R21", "matrix": [7, 1], "x": 34, "y": 0 }, + { "label": "R20", "matrix": [7, 0], "x": 35, "y": 0 }, + { "label": "L30", "matrix": [3, 0], "x": 36, "y": 0 }, + { "label": "L31", "matrix": [3, 1], "x": 37, "y": 0 }, + { "label": "L32", "matrix": [3, 2], "x": 38, "y": 0 }, + { "label": "L33", "matrix": [3, 4], "x": 39, "y": 0 }, + { "label": "L34", "matrix": [3, 5], "x": 40, "y": 0 }, + { "label": "L35", "matrix": [3, 6], "x": 41, "y": 0 }, + { "label": "L36", "matrix": [3, 7], "x": 42, "y": 0 }, + { "label": "R36", "matrix": [8, 7], "x": 43, "y": 0 }, + { "label": "R35", "matrix": [8, 6], "x": 44, "y": 0 }, + { "label": "R34", "matrix": [8, 5], "x": 45, "y": 0 }, + { "label": "R33", "matrix": [8, 4], "x": 46, "y": 0 }, + { "label": "R32", "matrix": [8, 2], "x": 47, "y": 0 }, + { "label": "R31", "matrix": [8, 1], "x": 48, "y": 0 }, + { "label": "R30", "matrix": [8, 0], "x": 49, "y": 0 }, + { "label": "L40", "matrix": [4, 0], "x": 50, "y": 0 }, + { "label": "L41", "matrix": [4, 1], "x": 51, "y": 0 }, + { "label": "L45", "matrix": [4, 6], "x": 52, "y": 0 }, + { "label": "L46", "matrix": [4, 7], "x": 53, "y": 0 }, + { "label": "R46", "matrix": [9, 7], "x": 54, "y": 0 }, + { "label": "R45", "matrix": [9, 6], "x": 55, "y": 0 }, + { "label": "R44", "matrix": [9, 5], "x": 56, "y": 0 }, + { "label": "R43", "matrix": [9, 4], "x": 57, "y": 0 }, + { "label": "R42", "matrix": [9, 2], "x": 58, "y": 0 }, + { "label": "R41", "matrix": [9, 1], "x": 59, "y": 0 }, + { "label": "R40", "matrix": [9, 0], "x": 60, "y": 0 } + ] + }, + "LAYOUT_no_ball": { + "layout": [ + { "label": "L00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "L01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "L02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "L03", "matrix": [0, 4], "x": 3, "y": 0 }, + { "label": "L04", "matrix": [0, 5], "x": 4, "y": 0 }, + { "label": "L05", "matrix": [0, 6], "x": 5, "y": 0 }, + { "label": "R05", "matrix": [5, 6], "x": 8, "y": 0 }, + { "label": "R04", "matrix": [5, 5], "x": 9, "y": 0 }, + { "label": "R03", "matrix": [5, 4], "x": 10, "y": 0 }, + { "label": "R02", "matrix": [5, 2], "x": 11, "y": 0 }, + { "label": "R01", "matrix": [5, 1], "x": 12, "y": 0 }, + { "label": "R00", "matrix": [5, 0], "x": 13, "y": 0 }, + { "label": "L10", "matrix": [1, 0], "x": 0, "y": 1 }, + { "label": "L11", "matrix": [1, 1], "x": 1, "y": 1 }, + { "label": "L12", "matrix": [1, 2], "x": 2, "y": 1 }, + { "label": "L13", "matrix": [1, 4], "x": 3, "y": 1 }, + { "label": "L14", "matrix": [1, 5], "x": 4, "y": 1 }, + { "label": "L15", "matrix": [1, 6], "x": 5, "y": 1 }, + { "label": "R15", "matrix": [6, 6], "x": 8, "y": 1 }, + { "label": "R14", "matrix": [6, 5], "x": 9, "y": 1 }, + { "label": "R13", "matrix": [6, 4], "x": 10, "y": 1 }, + { "label": "R12", "matrix": [6, 2], "x": 11, "y": 1 }, + { "label": "R11", "matrix": [6, 1], "x": 12, "y": 1 }, + { "label": "R10", "matrix": [6, 0], "x": 13, "y": 1 }, + { "label": "L20", "matrix": [2, 0], "x": 0, "y": 2 }, + { "label": "L21", "matrix": [2, 1], "x": 1, "y": 2 }, + { "label": "L22", "matrix": [2, 2], "x": 2, "y": 2 }, + { "label": "L23", "matrix": [2, 4], "x": 3, "y": 2 }, + { "label": "L24", "matrix": [2, 5], "x": 4, "y": 2 }, + { "label": "L25", "matrix": [2, 6], "x": 5, "y": 2 }, + { "label": "R25", "matrix": [7, 6], "x": 8, "y": 2 }, + { "label": "R24", "matrix": [7, 5], "x": 9, "y": 2 }, + { "label": "R23", "matrix": [7, 4], "x": 10, "y": 2 }, + { "label": "R22", "matrix": [7, 2], "x": 11, "y": 2 }, + { "label": "R21", "matrix": [7, 1], "x": 12, "y": 2 }, + { "label": "R20", "matrix": [7, 0], "x": 13, "y": 2 }, + { "label": "L30", "matrix": [3, 0], "x": 0, "y": 3 }, + { "label": "L31", "matrix": [3, 1], "x": 1, "y": 3 }, + { "label": "L32", "matrix": [3, 2], "x": 2, "y": 3 }, + { "label": "L33", "matrix": [3, 4], "x": 3, "y": 3 }, + { "label": "L34", "matrix": [3, 5], "x": 4, "y": 3 }, + { "label": "L35", "matrix": [3, 6], "x": 5, "y": 3 }, + { "label": "L36", "matrix": [3, 7], "x": 6, "y": 3 }, + { "label": "R36", "matrix": [8, 7], "x": 7, "y": 3 }, + { "label": "R35", "matrix": [8, 6], "x": 8, "y": 3 }, + { "label": "R34", "matrix": [8, 5], "x": 9, "y": 3 }, + { "label": "R33", "matrix": [8, 4], "x": 10, "y": 3 }, + { "label": "R32", "matrix": [8, 2], "x": 11, "y": 3 }, + { "label": "R31", "matrix": [8, 1], "x": 12, "y": 3 }, + { "label": "R30", "matrix": [8, 0], "x": 13, "y": 3 }, + { "label": "L40", "matrix": [4, 0], "x": 0, "y": 4 }, + { "label": "L41", "matrix": [4, 1], "x": 1, "y": 4 }, + { "label": "L42", "matrix": [4, 2], "x": 2, "y": 4 }, + { "label": "L43", "matrix": [4, 4], "x": 3, "y": 4 }, + { "label": "L44", "matrix": [4, 5], "x": 4, "y": 4 }, + { "label": "L45", "matrix": [4, 6], "x": 5, "y": 4 }, + { "label": "L46", "matrix": [4, 7], "x": 6, "y": 4 }, + { "label": "R46", "matrix": [9, 7], "x": 7, "y": 4 }, + { "label": "R45", "matrix": [9, 6], "x": 8, "y": 4 }, + { "label": "R44", "matrix": [9, 5], "x": 9, "y": 4 }, + { "label": "R43", "matrix": [9, 4], "x": 10, "y": 4 }, + { "label": "R42", "matrix": [9, 2], "x": 11, "y": 4 }, + { "label": "R41", "matrix": [9, 1], "x": 12, "y": 4 }, + { "label": "R40", "matrix": [9, 0], "x": 13, "y": 4 } + ] + }, + "LAYOUT_right_ball": { + "layout": [ + { "label": "L00", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "L01", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "L02", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "L03", "matrix": [0, 4], "x": 3, "y": 0 }, + { "label": "L04", "matrix": [0, 5], "x": 4, "y": 0 }, + { "label": "L05", "matrix": [0, 6], "x": 5, "y": 0 }, + { "label": "R05", "matrix": [5, 6], "x": 6, "y": 0 }, + { "label": "R04", "matrix": [5, 5], "x": 7, "y": 0 }, + { "label": "R03", "matrix": [5, 4], "x": 8, "y": 0 }, + { "label": "R02", "matrix": [5, 2], "x": 9, "y": 0 }, + { "label": "R01", "matrix": [5, 1], "x": 10, "y": 0 }, + { "label": "R00", "matrix": [5, 0], "x": 11, "y": 0 }, + { "label": "L10", "matrix": [1, 0], "x": 12, "y": 0 }, + { "label": "L11", "matrix": [1, 1], "x": 13, "y": 0 }, + { "label": "L12", "matrix": [1, 2], "x": 14, "y": 0 }, + { "label": "L13", "matrix": [1, 4], "x": 15, "y": 0 }, + { "label": "L14", "matrix": [1, 5], "x": 16, "y": 0 }, + { "label": "L15", "matrix": [1, 6], "x": 17, "y": 0 }, + { "label": "R15", "matrix": [6, 6], "x": 18, "y": 0 }, + { "label": "R14", "matrix": [6, 5], "x": 19, "y": 0 }, + { "label": "R13", "matrix": [6, 4], "x": 20, "y": 0 }, + { "label": "R12", "matrix": [6, 2], "x": 21, "y": 0 }, + { "label": "R11", "matrix": [6, 1], "x": 22, "y": 0 }, + { "label": "R10", "matrix": [6, 0], "x": 23, "y": 0 }, + { "label": "L20", "matrix": [2, 0], "x": 24, "y": 0 }, + { "label": "L21", "matrix": [2, 1], "x": 25, "y": 0 }, + { "label": "L22", "matrix": [2, 2], "x": 26, "y": 0 }, + { "label": "L23", "matrix": [2, 4], "x": 27, "y": 0 }, + { "label": "L24", "matrix": [2, 5], "x": 28, "y": 0 }, + { "label": "L25", "matrix": [2, 6], "x": 29, "y": 0 }, + { "label": "R25", "matrix": [7, 6], "x": 30, "y": 0 }, + { "label": "R24", "matrix": [7, 5], "x": 31, "y": 0 }, + { "label": "R23", "matrix": [7, 4], "x": 32, "y": 0 }, + { "label": "R22", "matrix": [7, 2], "x": 33, "y": 0 }, + { "label": "R21", "matrix": [7, 1], "x": 34, "y": 0 }, + { "label": "R20", "matrix": [7, 0], "x": 35, "y": 0 }, + { "label": "L30", "matrix": [3, 0], "x": 36, "y": 0 }, + { "label": "L31", "matrix": [3, 1], "x": 37, "y": 0 }, + { "label": "L32", "matrix": [3, 2], "x": 38, "y": 0 }, + { "label": "L33", "matrix": [3, 4], "x": 39, "y": 0 }, + { "label": "L34", "matrix": [3, 5], "x": 40, "y": 0 }, + { "label": "L35", "matrix": [3, 6], "x": 41, "y": 0 }, + { "label": "L36", "matrix": [3, 7], "x": 42, "y": 0 }, + { "label": "R36", "matrix": [8, 7], "x": 43, "y": 0 }, + { "label": "R35", "matrix": [8, 6], "x": 44, "y": 0 }, + { "label": "R34", "matrix": [8, 5], "x": 45, "y": 0 }, + { "label": "R33", "matrix": [8, 4], "x": 46, "y": 0 }, + { "label": "R32", "matrix": [8, 2], "x": 47, "y": 0 }, + { "label": "R31", "matrix": [8, 1], "x": 48, "y": 0 }, + { "label": "R30", "matrix": [8, 0], "x": 49, "y": 0 }, + { "label": "L40", "matrix": [4, 0], "x": 50, "y": 0 }, + { "label": "L41", "matrix": [4, 1], "x": 51, "y": 0 }, + { "label": "L42", "matrix": [4, 2], "x": 52, "y": 0 }, + { "label": "L43", "matrix": [4, 4], "x": 53, "y": 0 }, + { "label": "L44", "matrix": [4, 5], "x": 54, "y": 0 }, + { "label": "L45", "matrix": [4, 6], "x": 55, "y": 0 }, + { "label": "L46", "matrix": [4, 7], "x": 56, "y": 0 }, + { "label": "R46", "matrix": [9, 7], "x": 57, "y": 0 }, + { "label": "R45", "matrix": [9, 6], "x": 58, "y": 0 }, + { "label": "R41", "matrix": [9, 1], "x": 59, "y": 0 }, + { "label": "R40", "matrix": [9, 0], "x": 60, "y": 0 } + ] + } + } +} diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c index 9ab8d17b8ff..e5e2fa28745 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR + KC_LCTL , KC_LALT, KC_LGUI,_______, LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_DEL), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_RCTL ), [1] = LAYOUT_universal( diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk index 51604795596..d4f94399b8a 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk @@ -1,7 +1,5 @@ -RGBLIGHT_ENABLE = no - +RGBLIGHT_ENABLE = yes OLED_ENABLE = yes - POINTING_DEVICE_ENABLE = yes CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball61/rules.mk b/keyboards/yowkees/keyball/keyball61/rules.mk index 1e7dc313083..2e93ee90ce6 100644 --- a/keyboards/yowkees/keyball/keyball61/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/rules.mk @@ -1,15 +1,12 @@ # MCU name -MCU = atmega32u4 - +# MCU = atmega32u4 # Bootloader selection -BOOTLOADER = caterina +#BOOTLOADER = caterina # Link Time Optimization required for size. LTO_ENABLE = yes # Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 @@ -20,26 +17,17 @@ AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = lite SRC += lib/matrix.c -# Keyball61 is split keyboard. -SPLIT_KEYBOARD = yes - # Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes POINTING_DEVICE_DRIVER = pmw3360 # This is unnecessary for processing KC_MS_BTN*. MOUSEKEY_ENABLE = no -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. # Include common library From 2e19b2f33a6370b946595a39af14d5ebccab4787 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Mon, 26 May 2025 23:10:54 +0200 Subject: [PATCH 10/22] corrected config for promicro, still 314 bytes left --- keyboards/yowkees/keyball/keyball61/keyboard.json | 10 ++++------ keyboards/yowkees/keyball/keyball61/rules.mk | 7 ------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/keyboards/yowkees/keyball/keyball61/keyboard.json b/keyboards/yowkees/keyball/keyball61/keyboard.json index 4e8f532aa43..ea22db48962 100644 --- a/keyboards/yowkees/keyball/keyball61/keyboard.json +++ b/keyboards/yowkees/keyball/keyball61/keyboard.json @@ -14,7 +14,9 @@ "oled": true, "rgblight": true }, - + "build": { + "lto": true + }, "rgblight": { "driver": "ws2812", "led_count": 74, @@ -22,14 +24,10 @@ "max_brightness": 120 }, "ws2812": { - "driver": "vendor", "pin": "D3" }, "split": { - "enabled": true, - "serial": { - "driver": "vendor" - } + "enabled": true }, "layout_aliases": { "LAYOUT": "LAYOUT_right_ball", diff --git a/keyboards/yowkees/keyball/keyball61/rules.mk b/keyboards/yowkees/keyball/keyball61/rules.mk index 2e93ee90ce6..35e78743425 100644 --- a/keyboards/yowkees/keyball/keyball61/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/rules.mk @@ -1,10 +1,3 @@ -# MCU name -# MCU = atmega32u4 -# Bootloader selection -#BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes # Build Options CONSOLE_ENABLE = no # Console for debug From 832b9d7c8be4f55ac07077849fba750b150dc8b5 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Wed, 28 May 2025 01:36:01 +0200 Subject: [PATCH 11/22] using core SPLIT_POINTING_ENABLE, RPC disabled needs cleaning --- keyboards/yowkees/keyball/keyball61/config.h | 3 +- .../keyball61/keymaps/default/config.h | 2 + .../keyball61/keymaps/default/rules.mk | 2 +- .../yowkees/keyball/lib/keyball/keyball.c | 75 ++++++++++++------- .../yowkees/keyball/lib/keyball/keyball.h | 4 +- 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/keyboards/yowkees/keyball/keyball61/config.h b/keyboards/yowkees/keyball/keyball61/config.h index dfb7901e5c3..aeed1e66482 100644 --- a/keyboards/yowkees/keyball/keyball61/config.h +++ b/keyboards/yowkees/keyball/keyball61/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . // it has been reported to work well in such cases. //#define SPLIT_WATCHDOG_ENABLE -#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI +//#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI // RGB LED settings #ifdef RGBLIGHT_ENABLE @@ -82,7 +82,6 @@ along with this program. If not, see . #define SPI_MISO_PIN B3 #define SPLIT_POINTING_ENABLE -#define POINTING_DEVICE_LEFT #define POINTING_DEVICE_ROTATION_90 #define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h index 71e24111855..a9613b551ef 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h @@ -37,3 +37,5 @@ along with this program. If not, see . #define POINTING_DEVICE_AUTO_MOUSE_ENABLE #define AUTO_MOUSE_DEFAULT_LAYER 2 + +#define POINTING_DEVICE_LEFT diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk index d4f94399b8a..af6f4d6f5d3 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk @@ -2,5 +2,5 @@ RGBLIGHT_ENABLE = yes OLED_ENABLE = yes POINTING_DEVICE_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.c b/keyboards/yowkees/keyball/lib/keyball/keyball.c index 90f100ef8e5..64a10c38399 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.c +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.c @@ -25,6 +25,8 @@ along with this program. If not, see . #ifdef POINTING_DEVICE_ENABLE const uint16_t CPI_STEP = PMW33XX_CPI_STEP; +const uint16_t CPI_MIN = PMW33XX_CPI_MIN; +const uint16_t CPI_MAX = PMW33XX_CPI_MAX; #endif @@ -51,7 +53,7 @@ keyball_t keyball = { .that_motion = {0}, .cpi_value = 0, - .cpi_changed = false, + // .cpi_changed = false, .scroll_mode = false, .scroll_div = 0, @@ -321,6 +323,8 @@ report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { ////////////////////////////////////////////////////////////////////////////// // Split RPC + + /* #ifdef SPLIT_KEYBOARD #ifdef POINTING_DEVICE_ENABLE @@ -412,6 +416,7 @@ static void rpc_set_cpi_invoke(void) { #endif #endif +*/ ////////////////////////////////////////////////////////////////////////////// // OLED utility @@ -593,12 +598,24 @@ uint16_t keyball_get_cpi(void) { } void keyball_set_cpi(uint16_t cpi) { - keyball.cpi_value = cpi; - keyball.cpi_changed = true; - if (keyball.this_have_ball) { - pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT : cpi); - keyball.cpi_value = pmw33xx_get_cpi_wrapper(); + if (cpi < CPI_MIN) { + cpi = CPI_MIN; + } + else if (cpi > CPI_MAX) { + cpi = CPI_MAX; } + dprintf("1 pointing_device_get_cpi: %d\n", pointing_device_get_cpi()); + + dprintf("2 set_spi: %d\n", cpi); + // keyball.cpi_changed = true; + pointing_device_set_cpi(cpi); + keyball.cpi_value = pointing_device_get_cpi(); + dprintf("3 pointing_device_get_cpi: %d\n", keyball.cpi_value); + + // if (keyball.this_have_ball) { + // pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT : cpi); + // keyball.cpi_value = pmw33xx_get_cpi_wrapper(); + // } } #endif @@ -608,19 +625,19 @@ void keyball_set_cpi(uint16_t cpi) { void keyboard_post_init_kb(void) { #ifdef POINTING_DEVICE_ENABLE - #ifdef SPLIT_KEYBOARD - // register transaction handlers on secondary. - if (!is_keyboard_master()) { - transaction_register_rpc(KEYBALL_GET_INFO, rpc_get_info_handler); - transaction_register_rpc(KEYBALL_GET_MOTION, rpc_get_motion_handler); - transaction_register_rpc(KEYBALL_SET_CPI, rpc_set_cpi_handler); - } - #endif + // #ifdef SPLIT_KEYBOARD + // // register transaction handlers on secondary. + // if (!is_keyboard_master()) { + // transaction_register_rpc(KEYBALL_GET_INFO, rpc_get_info_handler); + // transaction_register_rpc(KEYBALL_GET_MOTION, rpc_get_motion_handler); + // transaction_register_rpc(KEYBALL_SET_CPI, rpc_set_cpi_handler); + // } + // #endif // read keyball configuration from EEPROM if (eeconfig_is_enabled()) { keyball_config_t c = {.raw = eeconfig_read_kb()}; - keyball_set_cpi(c.cpi); + keyball_set_cpi(c.cpi*100); keyball_set_scroll_div(c.sdiv); #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE set_auto_mouse_enable(c.amle); @@ -636,20 +653,20 @@ void keyboard_post_init_kb(void) { keyboard_post_init_user(); } -#if SPLIT_KEYBOARD - #ifdef POINTING_DEVICE_ENABLE +// #if SPLIT_KEYBOARD +// #ifdef POINTING_DEVICE_ENABLE -void housekeeping_task_kb(void) { - if (is_keyboard_master() && 1 == 2) { - rpc_get_info_invoke(); - if (keyball.that_have_ball) { - rpc_get_motion_invoke(); - rpc_set_cpi_invoke(); - } - } -} -#endif -#endif +// void housekeeping_task_kb(void) { +// if (is_keyboard_master() && 1 == 2) { +// rpc_get_info_invoke(); +// if (keyball.that_have_ball) { +// rpc_get_motion_invoke(); +// rpc_set_cpi_invoke(); +// } +// } +// } +// #endif +// #endif static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { @@ -737,7 +754,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { break; case KBC_SAVE: { keyball_config_t c = { - .cpi = keyball.cpi_value, + .cpi = (keyball.cpi_value+1)/100, .sdiv = keyball.scroll_div, #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE .amle = get_auto_mouse_enable(), diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.h b/keyboards/yowkees/keyball/lib/keyball/keyball.h index 6affec228c4..8c6b95fb506 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.h +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.h @@ -163,8 +163,8 @@ typedef struct { keyball_motion_t this_motion; keyball_motion_t that_motion; - uint8_t cpi_value; - bool cpi_changed; + uint16_t cpi_value; +// bool cpi_changed; bool scroll_mode; uint32_t scroll_mode_changed; From 56d8722cac7759dd13cbc50cd7b80c8de0d700d5 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Wed, 28 May 2025 23:11:18 +0200 Subject: [PATCH 12/22] cleaning keymap --- .../keyball61/keymaps/default/keymap.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c index e5e2fa28745..5cee91adc31 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c @@ -24,34 +24,34 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_universal( 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_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , + KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , _______ , KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_LCTL , KC_LALT, KC_LGUI,_______, LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_DEL), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_RCTL + KC_LCTL , KC_LALT, XXXXXXX ,XXXXXXX , XXXXXXX, LT(2,KC_SPC),LT(3,KC_DEL), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),_______ , KC_RALT, KC_RGUI , KC_RCTL ), [1] = LAYOUT_universal( - S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), - S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), - S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , - _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), - _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ + S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), + S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), + S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT ,S(KC_2) , + _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT), S(KC_SLSH) ,S(KC_RSFT), + _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,_______, S(KC_RALT), S(KC_RGUI) ,S(KC_RCTL) ), [2] = LAYOUT_universal( - SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , - SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , - _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ + _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7, KC_F8, KC_F9 , KC_F10, KC_F11, + _______ , _______ , KC_7 , KC_8 , KC_9 , _______ , KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, KC_F12, + _______ , _______ , KC_BTN4 , KC_5 , KC_BTN5 ,S(KC_SCLN), KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______ , _______ , KC_BTN1 , KC_BTN3 , KC_BTN2 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , C(KC_LEFT), _______ , C(KC_RGHT), _______, _______, + _______ , SCRL_MO , _______ , _______ , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______, _______ ), [3] = LAYOUT_universal( RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , - QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT + _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , + QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT ), }; // clang-format on From f8e02c9da19350e564ccd7ec546ca06e6846d31a Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 09:58:16 +0200 Subject: [PATCH 13/22] cleaning, ball and free_scroll, auto mouse layer work --- .vscode/settings.json | 4 +- keyboards/yowkees/keyball/keyball61/config.h | 4 +- .../yowkees/keyball/keyball61/keyboard.json | 2 +- .../keyball61/keymaps/default/config.h | 2 + .../keyball61/keymaps/default/keymap.c | 6 ++ .../keyball61/keymaps/default/rules.mk | 2 +- .../yowkees/keyball/lib/keyball/keyball.c | 63 ++++++++++++++++--- .../yowkees/keyball/lib/keyball/keyball.h | 15 +---- keyboards/yowkees/keyball/lib/matrix.c | 17 +++++ 9 files changed, 88 insertions(+), 27 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ea7ca608bc7..5f6794a0eef 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,7 +19,9 @@ "type_traits": "c", "utility": "c", "ranges": "c", - "cstdint": "c" + "cstdint": "c", + "chrono": "c", + "span": "c" }, "[markdown]": { "editor.trimAutoWhitespace": false, diff --git a/keyboards/yowkees/keyball/keyball61/config.h b/keyboards/yowkees/keyball/keyball61/config.h index aeed1e66482..f8f8ad13e81 100644 --- a/keyboards/yowkees/keyball/keyball61/config.h +++ b/keyboards/yowkees/keyball/keyball61/config.h @@ -82,6 +82,4 @@ along with this program. If not, see . #define SPI_MISO_PIN B3 #define SPLIT_POINTING_ENABLE - -#define POINTING_DEVICE_ROTATION_90 -#define POINTING_DEVICE_INVERT_Y +//#define MOUSE_EXTENDED_REPORT diff --git a/keyboards/yowkees/keyball/keyball61/keyboard.json b/keyboards/yowkees/keyball/keyball61/keyboard.json index ea22db48962..f2d4373ecb2 100644 --- a/keyboards/yowkees/keyball/keyball61/keyboard.json +++ b/keyboards/yowkees/keyball/keyball61/keyboard.json @@ -30,7 +30,7 @@ "enabled": true }, "layout_aliases": { - "LAYOUT": "LAYOUT_right_ball", + "LAYOUT": "LAYOUT_left_ball", "LAYOUT_universal": "LAYOUT_no_ball" }, "layouts": { diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h index a9613b551ef..4554e8ca652 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/config.h @@ -39,3 +39,5 @@ along with this program. If not, see . #define AUTO_MOUSE_DEFAULT_LAYER 2 #define POINTING_DEVICE_LEFT +#define POINTING_DEVICE_ROTATION_90 +#define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c index 5cee91adc31..01bd0aa07e9 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/keymap.c @@ -82,3 +82,9 @@ void keyboard_post_init_user(void) { } + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + void pointing_device_init_user(void) { + set_auto_mouse_enable(true); // always required before the auto mouse feature will work + } +#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk index af6f4d6f5d3..d4f94399b8a 100644 --- a/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk +++ b/keyboards/yowkees/keyball/keyball61/keymaps/default/rules.mk @@ -2,5 +2,5 @@ RGBLIGHT_ENABLE = yes OLED_ENABLE = yes POINTING_DEVICE_ENABLE = yes -CONSOLE_ENABLE = no +CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.c b/keyboards/yowkees/keyball/lib/keyball/keyball.c index 64a10c38399..707d9777e25 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.c +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.c @@ -53,7 +53,6 @@ keyball_t keyball = { .that_motion = {0}, .cpi_value = 0, - // .cpi_changed = false, .scroll_mode = false, .scroll_div = 0, @@ -71,6 +70,7 @@ __attribute__((weak)) void keyball_on_adjust_layout(keyball_adjust_t v) {} #ifdef POINTING_DEVICE_ENABLE +/* // add16 adds two int16_t with clipping. static int16_t add16(int16_t a, int16_t b) { int16_t r = a + b; @@ -82,7 +82,7 @@ static int16_t add16(int16_t a, int16_t b) { return r; } - +*/ // divmod16 divides *v by div, returns the quotient, and assigns the remainder // to *v. static int16_t divmod16(int16_t *v, int16_t div) { @@ -90,6 +90,8 @@ static int16_t divmod16(int16_t *v, int16_t div) { *v -= r * div; return r; } + + #endif // clip2int8 clips an integer fit into int8_t. static inline int8_t clip2int8(int16_t v) { @@ -146,16 +148,10 @@ static void add_scroll_div(int8_t delta) { ////////////////////////////////////////////////////////////////////////////// // Pointing device driver -#if KEYBALL_MODEL == 46 -void keyboard_pre_init_kb(void) { - keyball.this_have_ball = pmw3360_init(); - keyboard_pre_init_user(); -} -#endif - #ifdef POINTING_DEVICE_ENABLE +/* void pointing_device_init_kb(void) { keyball.this_have_ball = pmw33xx_init(0); pointing_device_init_user(); @@ -261,6 +257,7 @@ static inline bool should_report(void) { return true; } + /////////// new code report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { @@ -289,7 +286,55 @@ report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { } +*/ +static inline bool should_report(void) { + uint32_t now = timer_read32(); +#if defined(KEYBALL_REPORTMOUSE_INTERVAL) && KEYBALL_REPORTMOUSE_INTERVAL > 0 + // throttling mouse report rate. + static uint32_t last = 0; + if (TIMER_DIFF_32(now, last) < KEYBALL_REPORTMOUSE_INTERVAL) { + return false; + } + last = now; +#endif +// #if defined(KEYBALL_SCROLLBALL_INHIVITOR) && KEYBALL_SCROLLBALL_INHIVITOR > 0 +// if (TIMER_DIFF_32(now, keyball.scroll_mode_changed) < KEYBALL_SCROLLBALL_INHIVITOR) { +// keyball.this_motion.x = 0; +// keyball.this_motion.y = 0; +// keyball.that_motion.x = 0; +// keyball.that_motion.y = 0; +// } +// #endif + return true; +} + + +int16_t scroll_accumulated_h = 0; +int16_t scroll_accumulated_v = 0; + +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + + + // if (is_keyboard_master() && should_report()) + { + + if (keyball.scroll_mode) { + int16_t div = 1 << (keyball_get_scroll_div() - 1); + scroll_accumulated_h += mouse_report.x; + scroll_accumulated_v += mouse_report.y; + + mouse_report.h = divmod16(&scroll_accumulated_h, div); + mouse_report.v = -divmod16(&scroll_accumulated_v, div); + mouse_report.x = 0; + mouse_report.y = 0; + } + //store mouse report for OLED. + keyball.last_mouse = mouse_report; + } + return mouse_report; + +} #endif diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.h b/keyboards/yowkees/keyball/lib/keyball/keyball.h index 8c6b95fb506..61fa7fb192b 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.h +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.h @@ -126,7 +126,7 @@ enum keyball_keycodes { typedef union { uint32_t raw; struct { - uint8_t cpi : 7; + uint8_t cpi : 7; // CPI divided by 100 uint8_t sdiv : 3; // scroll divider #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE uint8_t amle : 1; // automatic mouse layer enabled @@ -164,7 +164,6 @@ typedef struct { keyball_motion_t that_motion; uint16_t cpi_value; -// bool cpi_changed; bool scroll_mode; uint32_t scroll_mode_changed; @@ -260,17 +259,9 @@ uint8_t keyball_get_scroll_div(void); void keyball_set_scroll_div(uint8_t div); /// keyball_get_cpi gets current CPI of trackball. -/// The actual CPI value is the returned value +1 and multiplied by 100: -/// -/// CPI = (v + 1) * 100 uint16_t keyball_get_cpi(void); /// keyball_set_cpi changes CPI of trackball. -/// Valid values are between 0 to 119, and the actual CPI value is the set -/// value +1 and multiplied by 100: -/// -/// CPI = (v + 1) * 100 -/// -/// In addition, if you do not upload SROM, the maximum value will be limited -/// to 34 (3500CPI). +/// Valid values are between 100 to 12500. +/// In addition, if you do not upload SROM, the maximum value will be limited 3500CPI. void keyball_set_cpi(uint16_t cpi); diff --git a/keyboards/yowkees/keyball/lib/matrix.c b/keyboards/yowkees/keyball/lib/matrix.c index f0625c40a4e..34fb76ae99b 100644 --- a/keyboards/yowkees/keyball/lib/matrix.c +++ b/keyboards/yowkees/keyball/lib/matrix.c @@ -1,3 +1,20 @@ +/* +Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) + +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 . +*/ + #include "quantum.h" #include "matrix.h" #include "debounce.h" From 158138789b5d5e018e5565a220d4ec270e20fbf9 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:12:05 +0200 Subject: [PATCH 14/22] remove keyball from the branch --- keyboards/keyball/keyball61/config.h | 88 -- keyboards/keyball/keyball61/halconf.h | 25 - keyboards/keyball/keyball61/keyball61.c | 48 - keyboards/keyball/keyball61/keyball61.h | 22 - keyboards/keyball/keyball61/keyboard.json | 286 ------ .../keyball61/keymaps/default/config.h | 39 - .../keyball61/keymaps/default/keymap.c | 85 -- .../keyball61/keymaps/default/rules.mk | 5 - .../keyball61/keymaps/develop/config.h | 33 - .../keyball61/keymaps/develop/keymap.c | 59 -- .../keyball61/keymaps/develop/rules.mk | 6 - .../keyball61/keymaps/graphite/config.h | 63 -- .../keyball61/keymaps/graphite/keymap.c | 127 --- .../keyball61/keymaps/graphite/rules.mk | 11 - .../keyball/keyball61/keymaps/test/config.h | 25 - .../keyball/keyball61/keymaps/test/keymap.c | 52 -- .../keyball/keyball61/keymaps/test/rules.mk | 2 - keyboards/keyball/keyball61/mcuconf.h | 23 - keyboards/keyball/keyball61/readme.md | 21 - keyboards/keyball/keyball61/rules.mk | 40 - .../keyball/lib/duplexmatrix/duplexmatrix.c | 106 --- .../keyball/lib/duplexmatrix/duplexmatrix.h | 20 - ...ix.sync-conflict-20240505-122328-VL7CYNH.c | 119 --- keyboards/keyball/lib/glcdfont.c | 234 ----- keyboards/keyball/lib/keyball/README.md | 128 --- keyboards/keyball/lib/keyball/keyball.c | 836 ------------------ keyboards/keyball/lib/keyball/keyball.h | 272 ------ keyboards/keyball/lib/keyball/keycodes.md | 52 -- keyboards/keyball/lib/logofont/font.md | 212 ----- keyboards/keyball/lib/logofont/logofont.c | 199 ----- keyboards/keyball/lib/oledkit/oledkit.c | 61 -- keyboards/keyball/lib/oledkit/oledkit.h | 34 - keyboards/keyball/readme.md | 84 -- 33 files changed, 3417 deletions(-) delete mode 100644 keyboards/keyball/keyball61/config.h delete mode 100644 keyboards/keyball/keyball61/halconf.h delete mode 100644 keyboards/keyball/keyball61/keyball61.c delete mode 100644 keyboards/keyball/keyball61/keyball61.h delete mode 100644 keyboards/keyball/keyball61/keyboard.json delete mode 100644 keyboards/keyball/keyball61/keymaps/default/config.h delete mode 100644 keyboards/keyball/keyball61/keymaps/default/keymap.c delete mode 100644 keyboards/keyball/keyball61/keymaps/default/rules.mk delete mode 100644 keyboards/keyball/keyball61/keymaps/develop/config.h delete mode 100644 keyboards/keyball/keyball61/keymaps/develop/keymap.c delete mode 100644 keyboards/keyball/keyball61/keymaps/develop/rules.mk delete mode 100644 keyboards/keyball/keyball61/keymaps/graphite/config.h delete mode 100644 keyboards/keyball/keyball61/keymaps/graphite/keymap.c delete mode 100644 keyboards/keyball/keyball61/keymaps/graphite/rules.mk delete mode 100644 keyboards/keyball/keyball61/keymaps/test/config.h delete mode 100644 keyboards/keyball/keyball61/keymaps/test/keymap.c delete mode 100644 keyboards/keyball/keyball61/keymaps/test/rules.mk delete mode 100644 keyboards/keyball/keyball61/mcuconf.h delete mode 100644 keyboards/keyball/keyball61/readme.md delete mode 100644 keyboards/keyball/keyball61/rules.mk delete mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.c delete mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.h delete mode 100644 keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c delete mode 100644 keyboards/keyball/lib/glcdfont.c delete mode 100644 keyboards/keyball/lib/keyball/README.md delete mode 100644 keyboards/keyball/lib/keyball/keyball.c delete mode 100644 keyboards/keyball/lib/keyball/keyball.h delete mode 100644 keyboards/keyball/lib/keyball/keycodes.md delete mode 100644 keyboards/keyball/lib/logofont/font.md delete mode 100644 keyboards/keyball/lib/logofont/logofont.c delete mode 100644 keyboards/keyball/lib/oledkit/oledkit.c delete mode 100644 keyboards/keyball/lib/oledkit/oledkit.h delete mode 100644 keyboards/keyball/readme.md diff --git a/keyboards/keyball/keyball61/config.h b/keyboards/keyball/keyball61/config.h deleted file mode 100644 index 22e563b87b2..00000000000 --- a/keyboards/keyball/keyball61/config.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -// Key matrix parameters (Keyball61 is duplex matrix) -#define MATRIX_ROWS (5 * 2) // split keyboard -#define MATRIX_COLS (4 * 2) // duplex matrix -#define MATRIX_ROW_PINS { GP4, GP5, GP6, GP7, GP8 } -#define MATRIX_COL_PINS { GP29, GP28, GP27, GP26 } -#define MATRIX_MASKED -#define DEBOUNCE 5 - -// Split parameters -#define SERIAL_USART_TX_PIN GP1 -#define SPLIT_HAND_MATRIX_GRID GP26, GP6 -#define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT -// #define SPLIT_USB_DETECT -// #define SPLIT_USB_TIMEOUT 500 - -// If your PC does not recognize Keyball, try setting this macro. This macro -// increases the firmware size by 200 bytes, so it is disabled by default, but -// it has been reported to work well in such cases. -//#define SPLIT_WATCHDOG_ENABLE - -#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI - -// RGB LED settings -#define WS2812_DI_PIN GP0 -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_LED_COUNT 74 -# define RGBLED_SPLIT { 37, 37 } -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 120 // limitated for power consumption -# endif -# ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 12 -# endif -# ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 17 -# endif -# ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -# endif -# define RGBLIGHT_DEFAULT_MODE 6 // set the rainbow mode -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_SPLIT { 37, 37 } -#endif - -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" -# define OLED_FONT_START 32 -# define OLED_FONT_END 195 -#endif - -#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) -# define LAYER_STATE_8BIT -#endif - -#define SPI_DRIVER SPID0 -#define SPI_SCK_PIN GP22 -#define SPI_MISO_PIN GP20 -#define SPI_MOSI_PIN GP23 - -#define PMW33XX_CS_PIN GP21 - -#define POINTING_DEVICE_ROTATION_90 -#define POINTING_DEVICE_INVERT_Y - -// To squeeze firmware size -// #undef LOCKING_SUPPORT_ENABLE -// #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/keyball/keyball61/halconf.h b/keyboards/keyball/keyball61/halconf.h deleted file mode 100644 index c09623ebfa4..00000000000 --- a/keyboards/keyball/keyball61/halconf.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2022 Charly Delay (@0xcharly) - * - * 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 . - */ - -#pragma once - -#define HAL_USE_I2C TRUE -#define HAL_USE_SPI TRUE -#define SPI_USE_WAIT TRUE -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD - -#include_next diff --git a/keyboards/keyball/keyball61/keyball61.c b/keyboards/keyball/keyball61/keyball61.c deleted file mode 100644 index 1c90f5945f1..00000000000 --- a/keyboards/keyball/keyball61/keyball61.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "lib/keyball/keyball.h" - -////////////////////////////////////////////////////////////////////////////// - -// clang-format off -matrix_row_t matrix_mask[MATRIX_ROWS] = { - 0b01110111, - 0b01110111, - 0b01110111, - 0b11110111, - 0b11110111, - 0b01110111, - 0b01110111, - 0b01110111, - 0b11110111, - 0b11110111, -}; -// clang-format on - -void keyball_on_adjust_layout(keyball_adjust_t v) { -#ifdef RGBLIGHT_ENABLE - // adjust RGBLIGHT's clipping and effect ranges - uint8_t lednum_this = keyball.this_have_ball ? 34 : 37; - uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 34 : 37; - rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); - rgblight_set_effect_range(0, lednum_this + lednum_that); -#endif -} diff --git a/keyboards/keyball/keyball61/keyball61.h b/keyboards/keyball/keyball61/keyball61.h deleted file mode 100644 index 9a958197a84..00000000000 --- a/keyboards/keyball/keyball61/keyball61.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include "quantum.h" -#include "lib/keyball/keyball.h" diff --git a/keyboards/keyball/keyball61/keyboard.json b/keyboards/keyball/keyball61/keyboard.json deleted file mode 100644 index 128b089b795..00000000000 --- a/keyboards/keyball/keyball61/keyboard.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "processor": "RP2040", - "bootloader": "rp2040", - "usb": { - "vid": "0x5957", - "pid": "0x0100", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball61", - "rgblight": { - "driver": "ws2812" - }, - "ws2812": { - "driver": "vendor" - }, - "split": { - "enabled": true - }, - "layout_aliases": { - "LAYOUT": "LAYOUT_left_ball", - "LAYOUT_universal": "LAYOUT_no_ball" - }, - "layouts": { - "LAYOUT_dual_ball": { - "layout": [ - {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, - {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, - {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, - {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, - {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, - {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, - {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, - {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, - {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, - {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, - {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, - {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, - {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, - {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, - {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, - {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, - {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, - {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, - {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, - {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, - {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, - {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, - {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, - {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, - {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, - {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, - {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, - {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, - {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, - {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, - {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, - {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, - {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, - {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, - {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, - {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, - {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, - {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, - {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, - {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, - {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, - {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, - {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, - {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, - {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, - {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, - {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, - {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, - {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, - {"label": "L45", "matrix": [4, 6], "x": 52, "y": 0}, - {"label": "L46", "matrix": [4, 7], "x": 53, "y": 0}, - {"label": "R46", "matrix": [9, 7], "x": 54, "y": 0}, - {"label": "R45", "matrix": [9, 6], "x": 55, "y": 0}, - {"label": "R41", "matrix": [9, 1], "x": 56, "y": 0}, - {"label": "R40", "matrix": [9, 0], "x": 57, "y": 0} - ] - }, - "LAYOUT_left_ball": { - "layout": [ - {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, - {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, - {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, - {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, - {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, - {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, - {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, - {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, - {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, - {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, - {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, - {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, - {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, - {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, - {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, - {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, - {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, - {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, - {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, - {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, - {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, - {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, - {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, - {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, - {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, - {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, - {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, - {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, - {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, - {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, - {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, - {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, - {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, - {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, - {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, - {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, - {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, - {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, - {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, - {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, - {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, - {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, - {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, - {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, - {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, - {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, - {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, - {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, - {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, - {"label": "L45", "matrix": [4, 6], "x": 52, "y": 0}, - {"label": "L46", "matrix": [4, 7], "x": 53, "y": 0}, - {"label": "R46", "matrix": [9, 7], "x": 54, "y": 0}, - {"label": "R45", "matrix": [9, 6], "x": 55, "y": 0}, - {"label": "R44", "matrix": [9, 5], "x": 56, "y": 0}, - {"label": "R43", "matrix": [9, 4], "x": 57, "y": 0}, - {"label": "R42", "matrix": [9, 2], "x": 58, "y": 0}, - {"label": "R41", "matrix": [9, 1], "x": 59, "y": 0}, - {"label": "R40", "matrix": [9, 0], "x": 60, "y": 0} - ] - }, - "LAYOUT_no_ball": { - "layout": [ - {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, - {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, - {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, - {"label": "R05", "matrix": [5, 6], "x": 8, "y": 0}, - {"label": "R04", "matrix": [5, 5], "x": 9, "y": 0}, - {"label": "R03", "matrix": [5, 4], "x": 10, "y": 0}, - {"label": "R02", "matrix": [5, 2], "x": 11, "y": 0}, - {"label": "R01", "matrix": [5, 1], "x": 12, "y": 0}, - {"label": "R00", "matrix": [5, 0], "x": 13, "y": 0}, - {"label": "L10", "matrix": [1, 0], "x": 0, "y": 1}, - {"label": "L11", "matrix": [1, 1], "x": 1, "y": 1}, - {"label": "L12", "matrix": [1, 2], "x": 2, "y": 1}, - {"label": "L13", "matrix": [1, 4], "x": 3, "y": 1}, - {"label": "L14", "matrix": [1, 5], "x": 4, "y": 1}, - {"label": "L15", "matrix": [1, 6], "x": 5, "y": 1}, - {"label": "R15", "matrix": [6, 6], "x": 8, "y": 1}, - {"label": "R14", "matrix": [6, 5], "x": 9, "y": 1}, - {"label": "R13", "matrix": [6, 4], "x": 10, "y": 1}, - {"label": "R12", "matrix": [6, 2], "x": 11, "y": 1}, - {"label": "R11", "matrix": [6, 1], "x": 12, "y": 1}, - {"label": "R10", "matrix": [6, 0], "x": 13, "y": 1}, - {"label": "L20", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "L21", "matrix": [2, 1], "x": 1, "y": 2}, - {"label": "L22", "matrix": [2, 2], "x": 2, "y": 2}, - {"label": "L23", "matrix": [2, 4], "x": 3, "y": 2}, - {"label": "L24", "matrix": [2, 5], "x": 4, "y": 2}, - {"label": "L25", "matrix": [2, 6], "x": 5, "y": 2}, - {"label": "R25", "matrix": [7, 6], "x": 8, "y": 2}, - {"label": "R24", "matrix": [7, 5], "x": 9, "y": 2}, - {"label": "R23", "matrix": [7, 4], "x": 10, "y": 2}, - {"label": "R22", "matrix": [7, 2], "x": 11, "y": 2}, - {"label": "R21", "matrix": [7, 1], "x": 12, "y": 2}, - {"label": "R20", "matrix": [7, 0], "x": 13, "y": 2}, - {"label": "L30", "matrix": [3, 0], "x": 0, "y": 3}, - {"label": "L31", "matrix": [3, 1], "x": 1, "y": 3}, - {"label": "L32", "matrix": [3, 2], "x": 2, "y": 3}, - {"label": "L33", "matrix": [3, 4], "x": 3, "y": 3}, - {"label": "L34", "matrix": [3, 5], "x": 4, "y": 3}, - {"label": "L35", "matrix": [3, 6], "x": 5, "y": 3}, - {"label": "L36", "matrix": [3, 7], "x": 6, "y": 3}, - {"label": "R36", "matrix": [8, 7], "x": 7, "y": 3}, - {"label": "R35", "matrix": [8, 6], "x": 8, "y": 3}, - {"label": "R34", "matrix": [8, 5], "x": 9, "y": 3}, - {"label": "R33", "matrix": [8, 4], "x": 10, "y": 3}, - {"label": "R32", "matrix": [8, 2], "x": 11, "y": 3}, - {"label": "R31", "matrix": [8, 1], "x": 12, "y": 3}, - {"label": "R30", "matrix": [8, 0], "x": 13, "y": 3}, - {"label": "L40", "matrix": [4, 0], "x": 0, "y": 4}, - {"label": "L41", "matrix": [4, 1], "x": 1, "y": 4}, - {"label": "L42", "matrix": [4, 2], "x": 2, "y": 4}, - {"label": "L43", "matrix": [4, 4], "x": 3, "y": 4}, - {"label": "L44", "matrix": [4, 5], "x": 4, "y": 4}, - {"label": "L45", "matrix": [4, 6], "x": 5, "y": 4}, - {"label": "L46", "matrix": [4, 7], "x": 6, "y": 4}, - {"label": "R46", "matrix": [9, 7], "x": 7, "y": 4}, - {"label": "R45", "matrix": [9, 6], "x": 8, "y": 4}, - {"label": "R44", "matrix": [9, 5], "x": 9, "y": 4}, - {"label": "R43", "matrix": [9, 4], "x": 10, "y": 4}, - {"label": "R42", "matrix": [9, 2], "x": 11, "y": 4}, - {"label": "R41", "matrix": [9, 1], "x": 12, "y": 4}, - {"label": "R40", "matrix": [9, 0], "x": 13, "y": 4} - ] - }, - "LAYOUT_right_ball": { - "layout": [ - {"label": "L00", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "L01", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "L02", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "L03", "matrix": [0, 4], "x": 3, "y": 0}, - {"label": "L04", "matrix": [0, 5], "x": 4, "y": 0}, - {"label": "L05", "matrix": [0, 6], "x": 5, "y": 0}, - {"label": "R05", "matrix": [5, 6], "x": 6, "y": 0}, - {"label": "R04", "matrix": [5, 5], "x": 7, "y": 0}, - {"label": "R03", "matrix": [5, 4], "x": 8, "y": 0}, - {"label": "R02", "matrix": [5, 2], "x": 9, "y": 0}, - {"label": "R01", "matrix": [5, 1], "x": 10, "y": 0}, - {"label": "R00", "matrix": [5, 0], "x": 11, "y": 0}, - {"label": "L10", "matrix": [1, 0], "x": 12, "y": 0}, - {"label": "L11", "matrix": [1, 1], "x": 13, "y": 0}, - {"label": "L12", "matrix": [1, 2], "x": 14, "y": 0}, - {"label": "L13", "matrix": [1, 4], "x": 15, "y": 0}, - {"label": "L14", "matrix": [1, 5], "x": 16, "y": 0}, - {"label": "L15", "matrix": [1, 6], "x": 17, "y": 0}, - {"label": "R15", "matrix": [6, 6], "x": 18, "y": 0}, - {"label": "R14", "matrix": [6, 5], "x": 19, "y": 0}, - {"label": "R13", "matrix": [6, 4], "x": 20, "y": 0}, - {"label": "R12", "matrix": [6, 2], "x": 21, "y": 0}, - {"label": "R11", "matrix": [6, 1], "x": 22, "y": 0}, - {"label": "R10", "matrix": [6, 0], "x": 23, "y": 0}, - {"label": "L20", "matrix": [2, 0], "x": 24, "y": 0}, - {"label": "L21", "matrix": [2, 1], "x": 25, "y": 0}, - {"label": "L22", "matrix": [2, 2], "x": 26, "y": 0}, - {"label": "L23", "matrix": [2, 4], "x": 27, "y": 0}, - {"label": "L24", "matrix": [2, 5], "x": 28, "y": 0}, - {"label": "L25", "matrix": [2, 6], "x": 29, "y": 0}, - {"label": "R25", "matrix": [7, 6], "x": 30, "y": 0}, - {"label": "R24", "matrix": [7, 5], "x": 31, "y": 0}, - {"label": "R23", "matrix": [7, 4], "x": 32, "y": 0}, - {"label": "R22", "matrix": [7, 2], "x": 33, "y": 0}, - {"label": "R21", "matrix": [7, 1], "x": 34, "y": 0}, - {"label": "R20", "matrix": [7, 0], "x": 35, "y": 0}, - {"label": "L30", "matrix": [3, 0], "x": 36, "y": 0}, - {"label": "L31", "matrix": [3, 1], "x": 37, "y": 0}, - {"label": "L32", "matrix": [3, 2], "x": 38, "y": 0}, - {"label": "L33", "matrix": [3, 4], "x": 39, "y": 0}, - {"label": "L34", "matrix": [3, 5], "x": 40, "y": 0}, - {"label": "L35", "matrix": [3, 6], "x": 41, "y": 0}, - {"label": "L36", "matrix": [3, 7], "x": 42, "y": 0}, - {"label": "R36", "matrix": [8, 7], "x": 43, "y": 0}, - {"label": "R35", "matrix": [8, 6], "x": 44, "y": 0}, - {"label": "R34", "matrix": [8, 5], "x": 45, "y": 0}, - {"label": "R33", "matrix": [8, 4], "x": 46, "y": 0}, - {"label": "R32", "matrix": [8, 2], "x": 47, "y": 0}, - {"label": "R31", "matrix": [8, 1], "x": 48, "y": 0}, - {"label": "R30", "matrix": [8, 0], "x": 49, "y": 0}, - {"label": "L40", "matrix": [4, 0], "x": 50, "y": 0}, - {"label": "L41", "matrix": [4, 1], "x": 51, "y": 0}, - {"label": "L42", "matrix": [4, 2], "x": 52, "y": 0}, - {"label": "L43", "matrix": [4, 4], "x": 53, "y": 0}, - {"label": "L44", "matrix": [4, 5], "x": 54, "y": 0}, - {"label": "L45", "matrix": [4, 6], "x": 55, "y": 0}, - {"label": "L46", "matrix": [4, 7], "x": 56, "y": 0}, - {"label": "R46", "matrix": [9, 7], "x": 57, "y": 0}, - {"label": "R45", "matrix": [9, 6], "x": 58, "y": 0}, - {"label": "R41", "matrix": [9, 1], "x": 59, "y": 0}, - {"label": "R40", "matrix": [9, 0], "x": 60, "y": 0} - ] - } - } -} diff --git a/keyboards/keyball/keyball61/keymaps/default/config.h b/keyboards/keyball/keyball61/keymaps/default/config.h deleted file mode 100644 index 71e24111855..00000000000 --- a/keyboards/keyball/keyball61/keymaps/default/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 2 diff --git a/keyboards/keyball/keyball61/keymaps/default/keymap.c b/keyboards/keyball/keyball61/keymaps/default/keymap.c deleted file mode 100644 index 1d402f22c99..00000000000 --- a/keyboards/keyball/keyball61/keymaps/default/keymap.c +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - 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_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , - MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR - ), - - [1] = LAYOUT_universal( - S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) ,S(KC_INT1), - S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), - S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , - _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), - _______ ,S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), _______ , S(KC_RALT), _______ - ), - - [2] = LAYOUT_universal( - SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , - SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , - _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ - ), - - [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , - QK_BOOT , _______ , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , QK_BOOT - ), -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == 3); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif - - - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_keyboard=true; - debug_mouse=true; - - -} diff --git a/keyboards/keyball/keyball61/keymaps/default/rules.mk b/keyboards/keyball/keyball61/keymaps/default/rules.mk deleted file mode 100644 index 12c7160d862..00000000000 --- a/keyboards/keyball/keyball61/keymaps/default/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -CONSOLE_ENABLE = yes diff --git a/keyboards/keyball/keyball61/keymaps/develop/config.h b/keyboards/keyball/keyball61/keymaps/develop/config.h deleted file mode 100644 index 7c18d0969f7..00000000000 --- a/keyboards/keyball/keyball61/keymaps/develop/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 diff --git a/keyboards/keyball/keyball61/keymaps/develop/keymap.c b/keyboards/keyball/keyball61/keymaps/develop/keymap.c deleted file mode 100644 index 34e1400dcdb..00000000000 --- a/keyboards/keyball/keyball61/keymaps/develop/keymap.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_universal( - 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SCRL_TO , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , - KC_LGUI , KC_APP , KC_HOME , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI - ), - - [1] = LAYOUT_universal( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , - QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT - ), -}; -// clang-format on - -void keyboard_post_init_user(void) { -#ifdef CONSOLE_ENABLE - debug_enable = true; -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/keyball/keyball61/keymaps/develop/rules.mk b/keyboards/keyball/keyball61/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/keyball/keyball61/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/keyball/keyball61/keymaps/graphite/config.h b/keyboards/keyball/keyball61/keymaps/graphite/config.h deleted file mode 100644 index 1eef9cbdfe5..00000000000 --- a/keyboards/keyball/keyball61/keymaps/graphite/config.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - - -#ifdef RGB_MATRIX_ENABLE -// #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard - - // These modes also require the RGB_MATRIX_FRAMEBUFFER_EFFECTS define to be available. - #define ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - - #define RGB_MATRIX_VAL_STEP 4 - #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR - #define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set - #define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set - #define RGB_MATRIX_DEFAULT_VAL 60 // RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set - #define RGB_MATRIX_DEFAULT_SPD 60 // Sets the default animation speed, if none has been set -#endif - - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 2 - -#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD - - -#define MOUSE_EXTENDED_REPORT - -#define RGBLIGHT_SLEEP diff --git a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c b/keyboards/keyball/keyball61/keymaps/graphite/keymap.c deleted file mode 100644 index 1728080e7d0..00000000000 --- a/keyboards/keyball/keyball61/keymaps/graphite/keymap.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -/////////////////////////////////////////// tap-dance - -//Tap Dance declarations -enum { - TD_MINS_PLUS, -}; - -// Tap Dance definitions -tap_dance_action_t tap_dance_actions[] = { - // Tap once for MINUS, twice for PLUS - [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), -}; - -////////////////////////////////////////// combos - -// const uint16_t PROGMEM left_sqbracket[] = {KC_L, KC_D, COMBO_END}; -// const uint16_t PROGMEM right_sqbracket[] = {KC_D, KC_W, COMBO_END}; -// const uint16_t PROGMEM left_parenthesis[] = {KC_X, KC_M, COMBO_END}; -// const uint16_t PROGMEM right_parenthesis[] = {KC_M, KC_C, COMBO_END}; -// combo_t key_combos[] = { -// COMBO(left_sqbracket, KC_LEFT_BRACKET), -// COMBO(right_sqbracket, KC_RIGHT_BRACKET), -// COMBO(left_parenthesis, KC_LEFT_PAREN), -// COMBO(right_parenthesis, KC_RIGHT_PAREN) -// }; - - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), - KC_LSFT, KC_N, LALT_T(KC_R), LCTL_T(KC_T), LSFT_T(KC_S), KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), LALT_T(KC_E), KC_I, KC_SLSH, - MO(1) , KC_Q, KC_X, KC_M, KC_C, KC_V, KC_RBRC, KC_NUHS, KC_K , KC_P , KC_COMM , KC_DOT , KC_SCLN , KC_EQL, - KC_LCTL , KC_LGUI , _______ , _______ , _______ , MO(1), KC_SPC, KC_ENT, MO(2) , KC_BSPC , KC_DEL , KC_RALT , KC_RGUI , MO(3) - ), -// _______ , KC_LCTL , KC_LALT , KC_LGUI,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT),LT(1,KC_LNG2),KC_RGUI, _______ , KC_RALT , KC_PSCR - - [1] = LAYOUT_universal( - S(KC_ESC), S(KC_1) , KC_LBRC , S(KC_3) , S(KC_4) , S(KC_5) , KC_EQL , S(KC_6) ,S(KC_QUOT), S(KC_8) , S(KC_9) , S(KC_GRV), - S(KC_TAB), KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE , S(KC_QUOT),S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) , S(KC_MINS), - KC_LSFT, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_SLSH) , - _______ , KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD ,S(KC_RBRC), S(KC_NUHS), S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT), S(KC_SCLN), S(KC_EQL), - S(KC_LCTL),S(KC_LALT),_______, _______, _______ , _______ , _______ , _______ , _______ , _______ ,S(KC_RGUI), S(KC_RALT), S(KC_RGUI), _______ - ), - - [2] = LAYOUT_universal( - SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7, KC_F8, KC_F9 , KC_F10, KC_F11 , - SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, KC_F12, - SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, - _______ , _______ , KC_BTN1 , KC_BTN3 , KC_BTN2 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , KC_BTN1 , _______ , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ - ), - - [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ , _______ , - QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_BSPC , _______ , _______ , _______ , _______ , _______ - ), -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == 3); - return state; -} - - -#ifdef OLED_ENABLE -# include "lib/oledkit/oledkit.h" - - void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); - } -#endif - - -//#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - void pointing_device_init_user(void) { - set_auto_mouse_enable(true); // always required before the auto mouse feature will work - - set_auto_mouse_layer(2); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of - set_auto_mouse_enable(true); - } -// #endif - - - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_keyboard=true; - debug_mouse=true; - - set_auto_mouse_layer(2); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of - set_auto_mouse_enable(true); - -} - - diff --git a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk b/keyboards/keyball/keyball61/keymaps/graphite/rules.mk deleted file mode 100644 index 8f0d372d4a7..00000000000 --- a/keyboards/keyball/keyball61/keymaps/graphite/rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -RGBLIGHT_ENABLE = yes -RGB_MATRIX_ENABLE = no - -OLED_ENABLE = yes -TAP_DANCE_ENABLE = yes -CAPS_WORD_ENABLE = yes -COMBO_ENABLE = no - -CONSOLE_ENABLE = yes - -# COMBO_COUNT = 16 diff --git a/keyboards/keyball/keyball61/keymaps/test/config.h b/keyboards/keyball/keyball61/keymaps/test/config.h deleted file mode 100644 index 60cd183d54c..00000000000 --- a/keyboards/keyball/keyball61/keymaps/test/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif diff --git a/keyboards/keyball/keyball61/keymaps/test/keymap.c b/keyboards/keyball/keyball61/keymaps/test/keymap.c deleted file mode 100644 index 5f1f8c673a5..00000000000 --- a/keyboards/keyball/keyball61/keymaps/test/keymap.c +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_LGUI , KC_APP , KC_HOME , KC_END , KC_LALT , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/keyball/keyball61/keymaps/test/rules.mk b/keyboards/keyball/keyball61/keymaps/test/rules.mk deleted file mode 100644 index 74c5ce7e160..00000000000 --- a/keyboards/keyball/keyball61/keymaps/test/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -RGBLIGHT_ENABLE = yes # Enable RGBLIGHT -OLED_ENABLE = yes # Please Enable this in each keymaps. diff --git a/keyboards/keyball/keyball61/mcuconf.h b/keyboards/keyball/keyball61/mcuconf.h deleted file mode 100644 index 52b726a56d5..00000000000 --- a/keyboards/keyball/keyball61/mcuconf.h +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright 2022 Charly Delay (@0xcharly) - * - * 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 . - */ - -#pragma once - -#include_next - -#undef RP_SPI_USE_SPI0 -#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/keyball/keyball61/readme.md b/keyboards/keyball/keyball61/readme.md deleted file mode 100644 index 95fe4d42a3c..00000000000 --- a/keyboards/keyball/keyball61/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Keyball61 - -![Keyball61](../../../..//keyball61/doc/rev1/images/kb61_001.jpg) - -A split keyboard with 61 vertically staggered keys and 34mm track ball. - -* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: Keyball61 PCB, ProMicro -* Hardware Availability: - * - * - -Make example for this keyboard (after setting up your build environment): - - make keyball/keyball61:default - -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). - -## Special keycodes - -See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/keyball/keyball61/rules.mk b/keyboards/keyball/keyball61/rules.mk deleted file mode 100644 index e00c9cd4cdb..00000000000 --- a/keyboards/keyball/keyball61/rules.mk +++ /dev/null @@ -1,40 +0,0 @@ -# Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -AUDIO_ENABLE = no # Audio output - -# Duplex matrix. -CUSTOM_MATRIX = lite -SRC += lib/duplexmatrix/duplexmatrix.c - -# Split keyboard. -SERIAL_DRIVER = vendor - -# Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = pmw3360 - -# This is unnecessary for processing KC_MS_BTN*. -MOUSEKEY_ENABLE = no - -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. -SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. - -# Include common library -SRC += lib/keyball/keyball.c - -# Disable other features to squeeze firmware size -SPACE_CADET_ENABLE = no -MAGIC_ENABLE = no diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c deleted file mode 100644 index 0ae7995ebb5..00000000000 --- a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include -#include "quantum.h" -#include "matrix.h" -#include "debounce.h" - -#ifdef SPLIT_KEYBOARD -# include "split_common/split_util.h" -# include "split_common/transactions.h" -#endif - -#define PINNUM_ROW (MATRIX_ROWS / 2) -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define PINNUM_COL (MATRIX_COLS / 2) - -#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) - -static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; -static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; - -static inline void set_pin_input(pin_t pin) { - setPinInputHigh(pin); -} - -static void set_pins_input(pin_t* pins, uint8_t n) { - for (uint8_t i = 0; i < n; i++) { - set_pin_input(pins[i]); - } -} - -static inline void set_pin_output(pin_t pin) { - setPinOutput(pin); - writePinLow(pin); -} - -static inline bool get_pin(pin_t pin) { - return readPin(pin); -} - -__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} - -static void duplex_scan_raw(matrix_row_t out_matrix[]) { - // scan column to row - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - set_pin_output(row_pins[row]); - matrix_output_select_delay(); - for (uint8_t col = 0; col < PINNUM_COL; col++) { - if (!get_pin(col_pins[col])) { - out_matrix[row] |= 1 << col; - } - } - set_pin_input(row_pins[row]); - matrix_output_unselect_delay(row, false); - } - - // scan row to column. - for (uint8_t col = 0; col < PINNUM_COL; col++) { - set_pin_output(col_pins[col]); - matrix_output_select_delay(); - matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (!get_pin(row_pins[row])) { - out_matrix[row] |= shifter; - } - } - set_pin_input(col_pins[col]); - matrix_output_unselect_delay(col, false); - } - - duplex_scan_raw_post_kb(out_matrix); -} - -bool matrix_scan_custom(matrix_row_t current_matrix[]) { - bool changed = false; - matrix_row_t tmp[MATRIX_ROWS] = {0}; - - duplex_scan_raw(tmp); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (tmp[row] != current_matrix[row]) { - changed = true; - current_matrix[row] = tmp[row]; - } - } - return changed; -} - -void matrix_init_custom(void) { - set_pins_input(col_pins, PINNUM_COL); - set_pins_input(row_pins, PINNUM_ROW); -} diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h deleted file mode 100644 index 44f57c629aa..00000000000 --- a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]); diff --git a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c b/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c deleted file mode 100644 index 0fa65e81570..00000000000 --- a/keyboards/keyball/lib/duplexmatrix/duplexmatrix.sync-conflict-20240505-122328-VL7CYNH.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include -#include "quantum.h" -#include "matrix.h" -#include "debounce.h" - -#ifdef SPLIT_KEYBOARD -# include "split_common/split_util.h" -# include "split_common/transactions.h" -#endif - -#define PINNUM_ROW (MATRIX_ROWS / 2) -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define PINNUM_COL (MATRIX_COLS / 2) - -#define MATRIXSIZE_PER_HAND (ROWS_PER_HAND * sizeof(matrix_row_t)) - -static pin_t row_pins[PINNUM_ROW] = MATRIX_ROW_PINS; -static pin_t col_pins[PINNUM_COL] = MATRIX_COL_PINS; - -static inline void set_pin_input(pin_t pin) { - setPinInputHigh(pin); -} - -static void set_pins_input(pin_t* pins, uint8_t n) { - for (uint8_t i = 0; i < n; i++) { - set_pin_input(pins[i]); - } -} - -static inline void set_pin_output(pin_t pin) { - setPinOutput(pin); - writePinLow(pin); -} - -static inline bool get_pin(pin_t pin) { - return readPin(pin); -} - -__attribute__((weak)) void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) {} - -static void duplex_scan_raw(matrix_row_t out_matrix[]) { - // scan column to row - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - set_pin_output(row_pins[row]); - matrix_output_select_delay(); - for (uint8_t col = 0; col < PINNUM_COL; col++) { - if (!get_pin(col_pins[col])) { - out_matrix[row] |= 1 << col; - } - } - set_pin_input(row_pins[row]); - matrix_output_unselect_delay(row, false); - } - - // scan row to column. - for (uint8_t col = 0; col < PINNUM_COL; col++) { - set_pin_output(col_pins[col]); - matrix_output_select_delay(); - matrix_row_t shifter = ((matrix_row_t)1) << (col + PINNUM_COL); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (!get_pin(row_pins[row])) { - out_matrix[row] |= shifter; - } - } - set_pin_input(col_pins[col]); - matrix_output_unselect_delay(col, false); - } - - duplex_scan_raw_post_kb(out_matrix); -} - -static bool matrix_scan_custom(matrix_row_t current_matrix[]) { - bool changed = false; - matrix_row_t tmp[MATRIX_ROWS] = {0}; - - duplex_scan_raw(tmp); - for (uint8_t row = 0; row < PINNUM_ROW; row++) { - if (tmp[row] != current_matrix[row]) { - changed = true; - current_matrix[row] = tmp[row]; - } - } - return changed; -} - -void matrix_init_custom(void) { - set_pins_input(col_pins, PINNUM_COL); - set_pins_input(row_pins, PINNUM_ROW); -} - -// declare matrix buffers which defined in quantum/matrix_common.c -extern matrix_row_t raw_matrix[MATRIX_ROWS]; -extern matrix_row_t matrix[MATRIX_ROWS]; - -uint8_t matrix_scan(void) { - bool changed = duplex_scan(raw_matrix); - - debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - - matrix_scan_kb(); - return changed; -} diff --git a/keyboards/keyball/lib/glcdfont.c b/keyboards/keyball/lib/glcdfont.c deleted file mode 100644 index c634898aed1..00000000000 --- a/keyboards/keyball/lib/glcdfont.c +++ /dev/null @@ -1,234 +0,0 @@ -// 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 -// clang-format off -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, 0x24, 0x24, 0x1C, 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, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, - 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, - 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, - 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, - 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, - 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, - 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, 0x80, - 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, - 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, - 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, - 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, - 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, - 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, - 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, - 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, - 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, - 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, - 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 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, 0x3C, 0x7F, - 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, - 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, - 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, - 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x00, 0x00, 0x03, 0x03, 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, -}; -// clang-format on diff --git a/keyboards/keyball/lib/keyball/README.md b/keyboards/keyball/lib/keyball/README.md deleted file mode 100644 index 0c54427a9b5..00000000000 --- a/keyboards/keyball/lib/keyball/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Keyball Core Function Library - -## Scroll snap mode - -When scrolling with the trackball, the scroll direction is restricted. -This restriction is called "scroll snap". - -The direction of restriction can be changed using special key codes. -You can also release this restriction. -It is called as "scroll snap mode" -The current mode is displayed on the OLED. - -There are 3 modes for scroll snap. - -1. Vertical (default): key code is `SSNP_VRT`, indicated as `VT`. -2. Horizontal: key code is `SSNP_HOR`, indicated as `HO`. -3. Free: key code is `SSNP_FRE`, indicated as `SCR`. - -The scroll snap mode at startup is vertical, -but you can change it by saving the current mode with `KBC_SAVE` - -## MEMO - -This section contains notes regarding the specifications of this library. -Since the purpose is to keep a record in whatever form it takes, -a lot of Japanese is included. -If you would like to read it in English, please request a translation via issue or discussion. -Of course you can translate it for us. If you translate it, -please make pull requests to share it us. - -### Scroll Snap Spec - -この機能は config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 0` を書き加えることで無効化できる。 - -トラックボールによるスクロールの方向を制限するのがスクロールスナップ。 -現在のスクロールスナップには3つのモードがある。 - -* 垂直方向にスナップ (デフォルト) -* 水平方向にスナップ -* スナップしない自由スクロール - -以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 - -#### up to 1.3.2 - -初期状態でトラックボールによるスクロールを垂直方向に制限(スナップ)している。 -この振る舞いは config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 1` を書き加えることで有効化できる。 - -この機能はスナップモードとフリーモードから構成される。 -初期状態はスナップモードで、このモードではスクロール方向は垂直に制限される。 -スナップモードで水平の一定方向に一定カウント(デフォルトは12)以上スクロールするとフリーモードに遷移する。 -なおこのカウントはスクロール除数適用後のカウントである。 -フリーモードでは制限が取り払われ、水平と垂直どちらにも自由にスクロールできる。 -フリーモードで一定時間(デフォルトは 100 ミリ秒)、スクロール操作を行わないとスナップモードに遷移する。 - -フリーモードに遷移するためのカウント数を変更するには `KEYBALL_SCROLLSNAP_TENSION_THRESHOLD` を、 -スナップモードに遷移するためのインターバル(ミリ秒)を変更するには `KEYBALL_SCROLLSNAP_RESET_TIMER` を、それぞれ config.h で設定できる。 - -以下はカウント数を 5 に、インターバルを 200 ミリ秒に変更する例: - -```c -#define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 5 -#define KEYBALL_SCROLLSNAP_RESET_TIMER 200 -``` - -#### History of Scroll Snap - -もともとは自由にスクロールできるようにしていた。 -しかし思ったよりもボールの感度が高く一定方向だけに動かすのが難しく、 -誤操作を誘発していた。 -そのためなんらかのスナップ機能が必要だと判断した。 - -最初のスナップ機能は垂直・水平のどちらかの軸から一定角度以内で収まってるうちはそちらへスナップするとした。 -しかし回転開始初期にはその移動量が極小かつセンサーの感度が高いので、 -垂直に動かしたい時に水平にも極小量の移動が発生しておりスナップ方向が定まらない、 -という問題が発生した。 -人間は自分が思うほどには指を正確に動かせていなかった。 - -そこで一定方向に一定以上のカウントを検出するまでは一切スクロールしないようにした。 -これは回転開始初期のスクロール量を読み捨てるに等しい。 - -しかしWebブラウザを思い浮かべてもらえればすぐにわかるように、 -一般のユースケースでは垂直方向のスクロールを頻繁に利用する。 -先の読み捨てにより、垂直方向のスクロールがワンテンポ遅れ、体験を大幅に損なうことが明らかになった。 -この解決のためモード: 初期は垂直のみ、後に自由スクロールする、を導入した。 - -### Scroll Divider / スクロール除数 - -Keyballのセンサーは感度がとても高い。 -そのため生の値をスクロール量としてしまうとスクロール操作がとても難しくなった。 -そこで生の値をある数で割ってスクロールに適用する方式を採用した。 -この時の割る数をスクロール除数と言っている。 - -スクロール除数は、体感として小さく制御する意味がなかったので、 -1, 2, 4, 8, 16, 32, 64 というように2の乗数とした。 -2の乗数であるのならば値の表現として $2 ^ n$ の $n$ で表せる。 -またEEPROMに設定値を保存できるようにするために、 -ビット数を節約する目的で $n$ が取りうる値は 1~7 の範囲とした。 -結果実際の割る数は以下の式で計算できる。 - -$$ 2 ^ {(n - 1)} $$ - -$n$ の初期値は 4 で 1/8 になることを意味する。 -この値は config.h で `KEYBALL_SCROLL_DIV_DEFAULT` マクロを定義することで変更できる。 -これを0にすることは考慮していないので設定しないこと。 - -### Scroll Inhivitor - -トラックボールの移動量をポインタに適用するかスクロールに適用するか、 -Keyballは内部にスクロールモードという名のモードで管理している。 -スクロールモードはキーコードやAPI呼び出しの任意のタイミングで切り替えられる。 -デフォルトのキーマップでは特定のレイヤーの状態を -スクロールモードのオンオフに適用している。 - -当初はスクロールモードの切り替え直後に、 -トラックボールの移動が意図しない適用先に適用されることが頻発した。 -ポインタをブラウザまで動かした後にスクロールモードに変更すると、 -意図していない方向にスクロールするといった体験になる。 - -そこでスクロールモード切替直後の一定時間は -一切のトラックボール操作を読み捨てることにした。 -この読み捨てる時間のことを Scroll Inhivitor と名付けた。 -この Scroll Inhivitor のデフォルト値は 50 ミリ秒である。 -短い時間ではあるが結構効いている。 - -Scroll Inhivitor は config.h で `KEYBALL_SCROLLBALL_INHIVITOR` マクロを定義することで変更できる。 -無効化したい場合は値として `0` を設定する。 -興味があれば無効にしてみるのも面白いかもしれない。 diff --git a/keyboards/keyball/lib/keyball/keyball.c b/keyboards/keyball/lib/keyball/keyball.c deleted file mode 100644 index 7cfdd12bac6..00000000000 --- a/keyboards/keyball/lib/keyball/keyball.c +++ /dev/null @@ -1,836 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include "quantum.h" -#ifdef SPLIT_KEYBOARD -# include "transactions.h" -#endif - -#include "keyball.h" -//#include "drivers/pmw3360/pmw3360.h" - -#include - -const uint16_t CPI_STEP = PMW33XX_CPI_STEP; -const uint16_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT; -const uint8_t SCROLL_DIV_MAX = 7; - -const uint16_t AML_TIMEOUT_MIN = 100; -const uint16_t AML_TIMEOUT_MAX = 1000; -const uint16_t AML_TIMEOUT_QU = 50; // Quantization Unit - -static const char BL = '\xB0'; // Blank indicator character -#ifdef OLED_ENABLE - static const char LFSTR_ON[] PROGMEM = "\xB2\xB3"; - static const char LFSTR_OFF[] PROGMEM = "\xB4\xB5"; -#endif - -keyball_t keyball = { - .this_have_ball = false, - .that_enable = false, - .that_have_ball = false, - - .this_motion = {0}, - .that_motion = {0}, - - .cpi_value = 0, - .cpi_changed = false, - - .scroll_mode = false, - .scroll_div = 0, - - .pressing_keys = { BL, BL, BL, BL, BL, BL, 0 }, -}; - -////////////////////////////////////////////////////////////////////////////// -// Hook points - -__attribute__((weak)) void keyball_on_adjust_layout(keyball_adjust_t v) {} - -////////////////////////////////////////////////////////////////////////////// -// Static utilities - -// add16 adds two int16_t with clipping. -static int16_t add16(int16_t a, int16_t b) { - int16_t r = a + b; - if (a >= 0 && b >= 0 && r < 0) { - r = 32767; - } else if (a < 0 && b < 0 && r >= 0) { - r = -32768; - } - return r; -} - -// divmod16 divides *v by div, returns the quotient, and assigns the remainder -// to *v. -static int16_t divmod16(int16_t *v, int16_t div) { - int16_t r = *v / div; - *v -= r * div; - return r; -} - -// clip2int8 clips an integer fit into int8_t. -static inline int8_t clip2int8(int16_t v) { - return (v) < -127 ? -127 : (v) > 127 ? 127 : (int8_t)v; -} - -#ifdef OLED_ENABLE -static const char *format_4d(int8_t d) { - static char buf[5] = {0}; // max width (4) + NUL (1) - char lead = ' '; - if (d < 0) { - d = -d; - lead = '-'; - } - buf[3] = (d % 10) + '0'; - d /= 10; - if (d == 0) { - buf[2] = lead; - lead = ' '; - } else { - buf[2] = (d % 10) + '0'; - d /= 10; - } - if (d == 0) { - buf[1] = lead; - lead = ' '; - } else { - buf[1] = (d % 10) + '0'; - d /= 10; - } - buf[0] = lead; - return buf; -} - -static char to_1x(uint8_t x) { - x &= 0x0f; - return x < 10 ? x + '0' : x + 'a' - 10; -} -#endif - -static void add_cpi(uint16_t delta) { - int16_t v = keyball_get_cpi() + delta; - keyball_set_cpi(v < 1 ? 1 : v); -} - -static void add_scroll_div(int8_t delta) { - int8_t v = keyball_get_scroll_div() + delta; - keyball_set_scroll_div(v < 1 ? 1 : v); -} - -////////////////////////////////////////////////////////////////////////////// -// Pointing device driver - -#if KEYBALL_MODEL == 46 -void keyboard_pre_init_kb(void) { - keyball.this_have_ball = pmw3360_init(); - keyboard_pre_init_user(); -} -#endif - - -void pointing_device_init_kb(void) { - keyball.this_have_ball = pmw33xx_init(0); - pointing_device_init_user(); -} - -/* -void pointing_device_driver_init(void) { -#if KEYBALL_MODEL != 46 - keyball.this_have_ball = pmw3360_init(); -#endif - if (keyball.this_have_ball) { -#if defined(KEYBALL_PMW3360_UPLOAD_SROM_ID) -# if KEYBALL_PMW3360_UPLOAD_SROM_ID == 0x04 - pmw3360_srom_upload(pmw3360_srom_0x04); -# elif KEYBALL_PMW3360_UPLOAD_SROM_ID == 0x81 - pmw3360_srom_upload(pmw3360_srom_0x81); -# else -# error Invalid value for KEYBALL_PMW3360_UPLOAD_SROM_ID. Please choose 0x04 or 0x81 or disable it. -# endif -#endif - pmw3360_cpi_set(CPI_DEFAULT - 1); - } -} -*/ - -/* -uint16_t pointing_device_driver_get_cpi(void) { - return keyball_get_cpi(); -} - - -void pointing_device_driver_set_cpi(uint16_t cpi) { - keyball_set_cpi(cpi); -} -*/ - -__attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { -#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 - r->x = clip2int8(m->y); - r->y = clip2int8(m->x); - // if (is_left) { - // r->x = -r->x; - // r->y = -r->y; - // } -#elif KEYBALL_MODEL == 46 - r->x = clip2int8(m->x); - r->y = -clip2int8(m->y); -#else -# error("unknown Keyball model") -#endif - // clear motion - m->x = 0; - m->y = 0; -} - -__attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left) { - // consume motion of trackball. - int16_t div = 1 << (keyball_get_scroll_div() - 1); - int16_t x = divmod16(&m->x, div); - int16_t y = divmod16(&m->y, div); - - // apply to mouse report. -#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 - r->h = clip2int8(y); - r->v = -clip2int8(x); - if (is_left) { - r->h = -r->h; - r->v = -r->v; - } -#elif KEYBALL_MODEL == 46 - r->h = clip2int8(x); - r->v = clip2int8(y); -#else -# error("unknown Keyball model") -#endif - - // Scroll snapping -#if KEYBALL_SCROLLSNAP_ENABLE == 1 - // Old behavior up to 1.3.2) - uint32_t now = timer_read32(); - if (r->h != 0 || r->v != 0) { - keyball.scroll_snap_last = now; - } else if (TIMER_DIFF_32(now, keyball.scroll_snap_last) >= KEYBALL_SCROLLSNAP_RESET_TIMER) { - keyball.scroll_snap_tension_h = 0; - } - if (abs(keyball.scroll_snap_tension_h) < KEYBALL_SCROLLSNAP_TENSION_THRESHOLD) { - keyball.scroll_snap_tension_h += y; - r->h = 0; - } -#elif KEYBALL_SCROLLSNAP_ENABLE == 2 - // New behavior - switch (keyball_get_scrollsnap_mode()) { - case KEYBALL_SCROLLSNAP_MODE_VERTICAL: - r->h = 0; - break; - case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: - r->v = 0; - break; - default: - // pass by without doing anything - break; - } -#endif -} - - - static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { - if (as_scroll) { - keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); - } else { - keyball_on_apply_motion_to_mouse_move(m, r, is_left); - } -} - - -static inline bool should_report(void) { - uint32_t now = timer_read32(); -#if defined(KEYBALL_REPORTMOUSE_INTERVAL) && KEYBALL_REPORTMOUSE_INTERVAL > 0 - // throttling mouse report rate. - static uint32_t last = 0; - if (TIMER_DIFF_32(now, last) < KEYBALL_REPORTMOUSE_INTERVAL) { - return false; - } - last = now; -#endif -#if defined(KEYBALL_SCROLLBALL_INHIVITOR) && KEYBALL_SCROLLBALL_INHIVITOR > 0 - if (TIMER_DIFF_32(now, keyball.scroll_mode_changed) < KEYBALL_SCROLLBALL_INHIVITOR) { - keyball.this_motion.x = 0; - keyball.this_motion.y = 0; - keyball.that_motion.x = 0; - keyball.that_motion.y = 0; - } -#endif - return true; -} - -/////////// new code - -report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { - // if (is_keyboard_master()) return mouse_report; - - if (keyball.this_have_ball) { - pmw33xx_report_t report = pmw33xx_read_burst(0); - //if (pmw3360_motion_burst(&d)) { - ATOMIC_BLOCK_FORCEON { - keyball.this_motion.x = add16(keyball.this_motion.x, report.delta_x); - keyball.this_motion.y = add16(keyball.this_motion.y, report.delta_y); - } - //} - } - else { - // report mouse event, if keyboard is primary. - if (is_keyboard_master() && should_report()) { - // modify mouse report by PMW3360 motion. - motion_to_mouse(&keyball.this_motion, &mouse_report, is_keyboard_left(), keyball.scroll_mode); - motion_to_mouse(&keyball.that_motion, &mouse_report, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); - //store mouse report for OLED. - keyball.last_mouse = mouse_report; - } - } - return mouse_report; - -} - - - - - -////// end new code - - -/* -report_mouse_t pointing_device_driver_get_report(report_mouse_t rep) { - // fetch from optical sensor. - if (keyball.this_have_ball) { - pmw3360_motion_t d = {0}; - if (pmw3360_motion_burst(&d)) { - ATOMIC_BLOCK_FORCEON { - keyball.this_motion.x = add16(keyball.this_motion.x, d.x); - keyball.this_motion.y = add16(keyball.this_motion.y, d.y); - } - } - } - // report mouse event, if keyboard is primary. - if (is_keyboard_master() && should_report()) { - // modify mouse report by PMW3360 motion. - motion_to_mouse(&keyball.this_motion, &rep, is_keyboard_left(), keyball.scroll_mode); - motion_to_mouse(&keyball.that_motion, &rep, !is_keyboard_left(), keyball.scroll_mode ^ keyball.this_have_ball); - // store mouse report for OLED. - keyball.last_mouse = rep; - } - return rep; -} -*/ - -////////////////////////////////////////////////////////////////////////////// -// Split RPC - -#ifdef SPLIT_KEYBOARD - -static void rpc_get_info_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { - keyball_info_t info = { - .ballcnt = keyball.this_have_ball ? 1 : 0, - }; - *(keyball_info_t *)out_data = info; - keyball_on_adjust_layout(KEYBALL_ADJUST_SECONDARY); -} - -static void rpc_get_info_invoke(void) { - static bool negotiated = false; - static uint32_t last_sync = 0; - static int round = 0; - uint32_t now = timer_read32(); - if (negotiated || TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETINFO_INTERVAL) { - return; - } - last_sync = now; - round++; - keyball_info_t recv = {0}; - if (!transaction_rpc_exec(KEYBALL_GET_INFO, 0, NULL, sizeof(recv), &recv)) { - if (round < KEYBALL_TX_GETINFO_MAXTRY) { - dprintf("keyball:rpc_get_info_invoke: missed #%d\n", round); - return; - } - } - negotiated = true; - keyball.that_enable = true; - keyball.that_have_ball = recv.ballcnt > 0; - dprintf("keyball:rpc_get_info_invoke: negotiated #%d %d\n", round, keyball.that_have_ball); - - // split keyboard negotiation completed. - -# ifdef VIA_ENABLE - // adjust VIA layout options according to current combination. - uint8_t layouts = (keyball.this_have_ball ? (is_keyboard_left() ? 0x02 : 0x01) : 0x00) | (keyball.that_have_ball ? (is_keyboard_left() ? 0x01 : 0x02) : 0x00); - uint32_t curr = via_get_layout_options(); - uint32_t next = (curr & ~0x3) | layouts; - if (next != curr) { - via_set_layout_options(next); - } -# endif - - keyball_on_adjust_layout(KEYBALL_ADJUST_PRIMARY); -} - -static void rpc_get_motion_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { - *(keyball_motion_t *)out_data = keyball.this_motion; - // clear motion - keyball.this_motion.x = 0; - keyball.this_motion.y = 0; -} - -static void rpc_get_motion_invoke(void) { - static uint32_t last_sync = 0; - uint32_t now = timer_read32(); - if (TIMER_DIFF_32(now, last_sync) < KEYBALL_TX_GETMOTION_INTERVAL) { - return; - } - keyball_motion_t recv = {0}; - if (transaction_rpc_exec(KEYBALL_GET_MOTION, 0, NULL, sizeof(recv), &recv)) { - keyball.that_motion.x = add16(keyball.that_motion.x, recv.x); - keyball.that_motion.y = add16(keyball.that_motion.y, recv.y); - dprintf("rcv x: %d, %d ", recv.x, recv.y); - dprintf("mot x: %d, %d \n", keyball.that_motion.x, keyball.that_motion.y); - } - last_sync = now; - return; -} - -static void rpc_set_cpi_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { - keyball_set_cpi((*(keyball_cpi_t *)in_data) * 100); -} - -static void rpc_set_cpi_invoke(void) { - if (!keyball.cpi_changed) { - return; - } - keyball_cpi_t req = keyball.cpi_value / 100; - if (!transaction_rpc_send(KEYBALL_SET_CPI, sizeof(req), &req)) { - return; - } - keyball.cpi_changed = false; -} - -#endif - -////////////////////////////////////////////////////////////////////////////// -// OLED utility - -#ifdef OLED_ENABLE -// clang-format off -const char PROGMEM code_to_name[] = { - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', - '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', - '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', - ',', '.', '/', -}; -// clang-format on -#endif - -void keyball_oled_render_ballinfo(void) { -#ifdef OLED_ENABLE - // Format: `Ball:{mouse x}{mouse y}{mouse h}{mouse v}` - // - // Output example: - // - // Ball: -12 34 0 0 - - // 1st line, "Ball" label, mouse x, y, h, and v. - oled_write_P(PSTR("Ball\xB1"), false); - oled_write(format_4d(keyball.last_mouse.x), false); - oled_write(format_4d(keyball.last_mouse.y), false); - oled_write(format_4d(keyball.last_mouse.h), false); - oled_write(format_4d(keyball.last_mouse.v), false); - - // 2nd line, empty label and CPI - oled_write_P(PSTR(" \xB1\xBC\xBD"), false); - oled_write(format_4d((keyball_get_cpi()+1)/100), false); - oled_write_P(PSTR("00 "), false); - - // indicate scroll snap mode: "VT" (vertical), "HN" (horiozntal), and "SCR" (free) -#if 1 && KEYBALL_SCROLLSNAP_ENABLE == 2 - switch (keyball_get_scrollsnap_mode()) { - case KEYBALL_SCROLLSNAP_MODE_VERTICAL: - oled_write_P(PSTR("VT"), false); - break; - case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: - oled_write_P(PSTR("HO"), false); - break; - default: - oled_write_P(PSTR("\xBE\xBF"), false); - break; - } -#else - oled_write_P(PSTR("\xBE\xBF"), false); -#endif - // indicate scroll mode: on/off - if (keyball.scroll_mode) { - oled_write_P(LFSTR_ON, false); - } else { - oled_write_P(LFSTR_OFF, false); - } - - // indicate scroll divider: - oled_write_P(PSTR(" \xC0\xC1"), false); - oled_write_char('0' + keyball_get_scroll_div(), false); -#endif -} - -void keyball_oled_render_ballsubinfo(void) { -#ifdef OLED_ENABLE -#endif -} - -void keyball_oled_render_keyinfo(void) { -#ifdef OLED_ENABLE - // Format: `Key : R{row} C{col} K{kc} {name}{name}{name}` - // - // Where `kc` is lower 8 bit of keycode. - // Where `name`s are readable labels for pressing keys, valid between 4 and 56. - // - // `row`, `col`, and `kc` indicates the last processed key, - // but `name`s indicate unreleased keys in best effort. - // - // It is aligned to fit with output of keyball_oled_render_ballinfo(). - // For example: - // - // Key : R2 C3 K06 abc - // Ball: 0 0 0 0 - - // "Key" Label - oled_write_P(PSTR("Key \xB1"), false); - - // Row and column - oled_write_char('\xB8', false); - oled_write_char(to_1x(keyball.last_pos.row), false); - oled_write_char('\xB9', false); - oled_write_char(to_1x(keyball.last_pos.col), false); - - // Keycode - oled_write_P(PSTR("\xBA\xBB"), false); - oled_write_char(to_1x(keyball.last_kc >> 4), false); - oled_write_char(to_1x(keyball.last_kc), false); - - // Pressing keys - oled_write_P(PSTR(" "), false); - oled_write(keyball.pressing_keys, false); -#endif -} - -void keyball_oled_render_layerinfo(void) { -#ifdef OLED_ENABLE - // Format: `Layer:{layer state}` - // - // Output example: - // - // Layer:-23------------ - // - oled_write_P(PSTR("L\xB6\xB7r\xB1"), false); - for (uint8_t i = 1; i < 8; i++) { - oled_write_char((layer_state_is(i) ? to_1x(i) : BL), false); - } - oled_write_char(' ', false); - -# ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - oled_write_P(PSTR("\xC2\xC3"), false); - if (get_auto_mouse_enable()) { - oled_write_P(LFSTR_ON, false); - } else { - oled_write_P(LFSTR_OFF, false); - } - - oled_write(format_4d(get_auto_mouse_timeout() / 10) + 1, false); - oled_write_char('0', false); -# else - oled_write_P(PSTR("\xC2\xC3\xB4\xB5 ---"), false); -# endif -#endif -} - -////////////////////////////////////////////////////////////////////////////// -// Public API functions - -bool keyball_get_scroll_mode(void) { - return keyball.scroll_mode; -} - -void keyball_set_scroll_mode(bool mode) { - if (mode != keyball.scroll_mode) { - keyball.scroll_mode_changed = timer_read32(); - } - keyball.scroll_mode = mode; -} - -keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void) { -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - return keyball.scrollsnap_mode; -#else - return 0; -#endif -} - -void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode) { -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - keyball.scrollsnap_mode = mode; -#endif -} - -uint8_t keyball_get_scroll_div(void) { - return keyball.scroll_div == 0 ? KEYBALL_SCROLL_DIV_DEFAULT : keyball.scroll_div; -} - -void keyball_set_scroll_div(uint8_t div) { - keyball.scroll_div = div > SCROLL_DIV_MAX ? SCROLL_DIV_MAX : div; -} - -uint16_t keyball_get_cpi(void) { - return keyball.cpi_value == 0 ? CPI_DEFAULT : keyball.cpi_value; -} - -void keyball_set_cpi(uint16_t cpi) { - keyball.cpi_value = cpi; - keyball.cpi_changed = true; - if (keyball.this_have_ball) { - pmw33xx_set_cpi_wrapper(cpi == 0 ? CPI_DEFAULT : cpi); - keyball.cpi_value = pmw33xx_get_cpi_wrapper(); - } -} - -////////////////////////////////////////////////////////////////////////////// -// Keyboard hooks - -void keyboard_post_init_kb(void) { -#ifdef SPLIT_KEYBOARD - // register transaction handlers on secondary. - if (!is_keyboard_master()) { - transaction_register_rpc(KEYBALL_GET_INFO, rpc_get_info_handler); - transaction_register_rpc(KEYBALL_GET_MOTION, rpc_get_motion_handler); - transaction_register_rpc(KEYBALL_SET_CPI, rpc_set_cpi_handler); - } -#endif - - // read keyball configuration from EEPROM - if (eeconfig_is_enabled()) { - keyball_config_t c = {.raw = eeconfig_read_kb()}; - keyball_set_cpi(c.cpi); - keyball_set_scroll_div(c.sdiv); -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - set_auto_mouse_enable(c.amle); - set_auto_mouse_timeout(c.amlto == 0 ? AUTO_MOUSE_TIME : (c.amlto + 1) * AML_TIMEOUT_QU); -#endif -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - keyball_set_scrollsnap_mode(c.ssnap); -#endif - } - - keyball_on_adjust_layout(KEYBALL_ADJUST_PENDING); - keyboard_post_init_user(); -} - -#if SPLIT_KEYBOARD -void housekeeping_task_kb(void) { - if (is_keyboard_master()) { - rpc_get_info_invoke(); - if (keyball.that_have_ball) { - rpc_get_motion_invoke(); - rpc_set_cpi_invoke(); - } - } -} -#endif - -static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { - -#ifdef OLED_ENABLE - // Process only valid keycodes. - if (keycode >= 4 && keycode < 57) { - char value = pgm_read_byte(code_to_name + keycode - 4); - char where = BL; - if (!record->event.pressed) { - // Swap `value` and `where` when releasing. - where = value; - value = BL; - } - // Rewrite the last `where` of pressing_keys to `value` . - for (int i = 0; i < KEYBALL_OLED_MAX_PRESSING_KEYCODES; i++) { - if (keyball.pressing_keys[i] == where) { - keyball.pressing_keys[i] = value; - break; - } - } - } -#endif -} - -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE -bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) { - switch (keycode) { - case SCRL_MO: - return true; - } - return is_mouse_record_user(keycode, record); -} -#endif - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // store last keycode, row, and col for OLED - keyball.last_kc = keycode; - keyball.last_pos = record->event.key; - - pressing_keys_update(keycode, record); - - if (!process_record_user(keycode, record)) { - return false; - } - - // strip QK_MODS part. - if (keycode >= QK_MODS && keycode <= QK_MODS_MAX) { - keycode &= 0xff; - } - - switch (keycode) { -#ifndef MOUSEKEY_ENABLE - // process KC_MS_BTN1~8 by myself - // See process_action() in quantum/action.c for details. - case KC_MS_BTN1 ... KC_MS_BTN8: { - extern void register_mouse(uint8_t mouse_keycode, bool pressed); - register_mouse(keycode, record->event.pressed); - // to apply QK_MODS actions, allow to process others. - return true; - } -#endif - - case SCRL_MO: - keyball_set_scroll_mode(record->event.pressed); - // process_auto_mouse may use this in future, if changed order of - // processes. - return true; - } - - // process events which works on pressed only. - if (record->event.pressed) { - switch (keycode) { - case KBC_RST: - keyball_set_cpi(0); - keyball_set_scroll_div(0); -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - set_auto_mouse_enable(false); - set_auto_mouse_timeout(AUTO_MOUSE_TIME); -#endif - break; - case KBC_SAVE: { - keyball_config_t c = { - .cpi = keyball.cpi_value, - .sdiv = keyball.scroll_div, -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - .amle = get_auto_mouse_enable(), - .amlto = (get_auto_mouse_timeout() / AML_TIMEOUT_QU) - 1, -#endif -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - .ssnap = keyball_get_scrollsnap_mode(), -#endif - }; - eeconfig_update_kb(c.raw); - } break; - - case CPI_I100: - add_cpi(CPI_STEP); - break; - case CPI_D100: - add_cpi(-CPI_STEP); - break; - case CPI_I1K: - add_cpi(CPI_STEP*10); - break; - case CPI_D1K: - add_cpi(-CPI_STEP*10); - break; - - case SCRL_TO: - keyball_set_scroll_mode(!keyball.scroll_mode); - break; - case SCRL_DVI: - add_scroll_div(1); - break; - case SCRL_DVD: - add_scroll_div(-1); - break; - -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - case SSNP_HOR: - keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_HORIZONTAL); - break; - case SSNP_VRT: - keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_VERTICAL); - break; - case SSNP_FRE: - keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_FREE); - break; -#endif - -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - case AML_TO: - set_auto_mouse_enable(!get_auto_mouse_enable()); - break; - case AML_I50: - { - uint16_t v = get_auto_mouse_timeout() + 50; - set_auto_mouse_timeout(MIN(v, AML_TIMEOUT_MAX)); - } - break; - case AML_D50: - { - uint16_t v = get_auto_mouse_timeout() - 50; - set_auto_mouse_timeout(MAX(v, AML_TIMEOUT_MIN)); - } - break; -#endif - - default: - return true; - } - return false; - } - - return true; -} - -// Disable functions keycode_config() and mod_config() in keycode_config.c to -// reduce size. These functions are provided for customizing magic keycode. -// These two functions are mostly unnecessary if `MAGIC_KEYCODE_ENABLE = no` is -// set. -// -// If `MAGIC_KEYCODE_ENABLE = no` and you want to keep these two functions as -// they are, define the macro KEYBALL_KEEP_MAGIC_FUNCTIONS. -// -// See: https://docs.qmk.fm/#/squeezing_avr?id=magic-functions -// -#if !defined(MAGIC_KEYCODE_ENABLE) && !defined(KEYBALL_KEEP_MAGIC_FUNCTIONS) - -uint16_t keycode_config(uint16_t keycode) { - return keycode; -} - -uint8_t mod_config(uint8_t mod) { - return mod; -} - -#endif diff --git a/keyboards/keyball/lib/keyball/keyball.h b/keyboards/keyball/lib/keyball/keyball.h deleted file mode 100644 index 9364a6d61bd..00000000000 --- a/keyboards/keyball/lib/keyball/keyball.h +++ /dev/null @@ -1,272 +0,0 @@ -/* -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -////////////////////////////////////////////////////////////////////////////// -// Configurations - -#ifndef KEYBALL_CPI_DEFAULT -# define KEYBALL_CPI_DEFAULT 500 -#endif - -#ifndef KEYBALL_SCROLL_DIV_DEFAULT -# define KEYBALL_SCROLL_DIV_DEFAULT 4 // 4: 1/8 (1/2^(n-1)) -#endif - -#ifndef KEYBALL_REPORTMOUSE_INTERVAL -# define KEYBALL_REPORTMOUSE_INTERVAL 8 // mouse report rate: 125Hz -#endif - -#ifndef KEYBALL_SCROLLBALL_INHIVITOR -# define KEYBALL_SCROLLBALL_INHIVITOR 50 -#endif - -/// To disable scroll snap feature, define 0 in your config.h -#ifndef KEYBALL_SCROLLSNAP_ENABLE -# define KEYBALL_SCROLLSNAP_ENABLE 2 -#endif - -#ifndef KEYBALL_SCROLLSNAP_RESET_TIMER -# define KEYBALL_SCROLLSNAP_RESET_TIMER 100 -#endif - -#ifndef KEYBALL_SCROLLSNAP_TENSION_THRESHOLD -# define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 12 -#endif - -/// Specify SROM ID to be uploaded PMW3360DW (optical sensor). It will be -/// enabled high CPI setting or so. Valid valus are 0x04 or 0x81. Define this -/// in your config.h to be enable. Please note that using this option will -/// increase the firmware size by more than 4KB. -//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x04 -//#define KEYBALL_PMW3360_UPLOAD_SROM_ID 0x81 - -/// Defining this macro keeps two functions intact: keycode_config() and -/// mod_config() in keycode_config.c. -/// -/// These functions customize the magic key code and are useless if the magic -/// key code is disabled. Therefore, Keyball automatically disables it. -/// However, there may be cases where you still need these functions even after -/// disabling the magic key code. In that case, define this macro. -//#define KEYBALL_KEEP_MAGIC_FUNCTIONS - -////////////////////////////////////////////////////////////////////////////// -// Constants - -#define KEYBALL_TX_GETINFO_INTERVAL 500 -#define KEYBALL_TX_GETINFO_MAXTRY 10 -#define KEYBALL_TX_GETMOTION_INTERVAL 4 - -#if (PRODUCT_ID & 0xff00) == 0x0000 -# define KEYBALL_MODEL 46 -#elif (PRODUCT_ID & 0xff00) == 0x0100 -# define KEYBALL_MODEL 61 -#elif (PRODUCT_ID & 0xff00) == 0x0200 -# define KEYBALL_MODEL 39 -#elif (PRODUCT_ID & 0xff00) == 0x0300 -# define KEYBALL_MODEL 147 -#elif (PRODUCT_ID & 0xff00) == 0x0400 -# define KEYBALL_MODEL 44 -#endif - -#define KEYBALL_OLED_MAX_PRESSING_KEYCODES 6 - -////////////////////////////////////////////////////////////////////////////// -// Types - -enum keyball_keycodes { - KBC_RST = QK_KB_0, // Keyball configuration: reset to default - KBC_SAVE = QK_KB_1, // Keyball configuration: save to EEPROM - - CPI_I100 = QK_KB_2, // CPI +100 CPI - CPI_D100 = QK_KB_3, // CPI -100 CPI - CPI_I1K = QK_KB_4, // CPI +1000 CPI - CPI_D1K = QK_KB_5, // CPI -1000 CPI - - // In scroll mode, motion from primary trackball is treated as scroll - // wheel. - SCRL_TO = QK_KB_6, // Toggle scroll mode - SCRL_MO = QK_KB_7, // Momentary scroll mode - SCRL_DVI = QK_KB_8, // Increment scroll divider - SCRL_DVD = QK_KB_9, // Decrement scroll divider - - SSNP_VRT = QK_KB_13, // Set scroll snap mode as vertical - SSNP_HOR = QK_KB_14, // Set scroll snap mode as horizontal - SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) - - // Auto mouse layer control keycodes. - // Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined. - AML_TO = QK_KB_10, // Toggle automatic mouse layer - AML_I50 = QK_KB_11, // Increment automatic mouse layer timeout - AML_D50 = QK_KB_12, // Decrement automatic mouse layer timeout - - // User customizable 32 keycodes. - KEYBALL_SAFE_RANGE = QK_USER_0, -}; - -typedef union { - uint32_t raw; - struct { - uint8_t cpi : 7; - uint8_t sdiv : 3; // scroll divider -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE - uint8_t amle : 1; // automatic mouse layer enabled - uint16_t amlto : 5; // automatic mouse layer timeout -#endif -#if KEYBALL_SCROLLSNAP_ENABLE == 2 - uint8_t ssnap : 2; // scroll snap mode -#endif - }; -} keyball_config_t; - -typedef struct { - uint8_t ballcnt; // count of balls: support only 0 or 1, for now -} keyball_info_t; - -typedef struct { - int16_t x; - int16_t y; -} keyball_motion_t; - -typedef uint8_t keyball_cpi_t; - -typedef enum { - KEYBALL_SCROLLSNAP_MODE_VERTICAL = 0, - KEYBALL_SCROLLSNAP_MODE_HORIZONTAL = 1, - KEYBALL_SCROLLSNAP_MODE_FREE = 2, -} keyball_scrollsnap_mode_t; - -typedef struct { - bool this_have_ball; - bool that_enable; - bool that_have_ball; - - keyball_motion_t this_motion; - keyball_motion_t that_motion; - - uint16_t cpi_value; - bool cpi_changed; - - bool scroll_mode; - uint32_t scroll_mode_changed; - uint8_t scroll_div; - -#if KEYBALL_SCROLLSNAP_ENABLE == 1 - uint32_t scroll_snap_last; - int8_t scroll_snap_tension_h; -#elif KEYBALL_SCROLLSNAP_ENABLE == 2 - keyball_scrollsnap_mode_t scrollsnap_mode; -#endif - - uint16_t last_kc; - keypos_t last_pos; - report_mouse_t last_mouse; - - // Buffer to indicate pressing keys. - char pressing_keys[KEYBALL_OLED_MAX_PRESSING_KEYCODES + 1]; -} keyball_t; - -typedef enum { - KEYBALL_ADJUST_PENDING = 0, - KEYBALL_ADJUST_PRIMARY = 1, - KEYBALL_ADJUST_SECONDARY = 2, -} keyball_adjust_t; - -////////////////////////////////////////////////////////////////////////////// -// Exported values (touch carefully) - -extern keyball_t keyball; - -////////////////////////////////////////////////////////////////////////////// -// Hook points - -/// keyball_on_adjust_layout is called when the keyboard layout adjustted -void keyball_on_adjust_layout(keyball_adjust_t v); - -/// keyball_on_apply_motion_to_mouse_move applies trackball's motion m to r as -/// mouse movement. -/// You can change the default algorithm by override this function. -void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left); - -/// keyball_on_apply_motion_to_mouse_scroll applies trackball's motion m to r -/// as mouse scroll. -/// You can change the default algorithm by override this function. -void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left); - -////////////////////////////////////////////////////////////////////////////// -// Public API functions - -/// keyball_oled_render_ballinfo renders ball information to OLED. -/// It uses just 21 columns to show the info. -void keyball_oled_render_ballinfo(void); - -/// keyball_oled_render_keyinfo renders last processed key information to OLED. -/// It shows column, row, key code, and key name (if available). -void keyball_oled_render_keyinfo(void); - -/// keyball_oled_render_layerinfo renders current layer status information to -/// OLED. It shows layer mask with number (1~f) for active layers and '_' for -/// inactive layers. -void keyball_oled_render_layerinfo(void); - -/// keyball_get_scroll_mode gets current scroll mode. -bool keyball_get_scroll_mode(void); - -/// keyball_set_scroll_mode modify scroll mode. -void keyball_set_scroll_mode(bool mode); - -/// keyball_get_scrollsnap_mode gets current scroll snap mode. -keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void); - -/// keyball_set_scrollsnap_mode change scroll snap mode. -void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); - -/// keyball_get_scroll_div gets current scroll divider. -/// See also keyball_set_scroll_div for the scroll divider's detail. -uint8_t keyball_get_scroll_div(void); - -/// keyball_set_scroll_div changes scroll divider. -/// -/// The scroll divider is the number that divides the raw value when applying -/// trackball motion to scrolling. The CPI value of the trackball is very -/// high, so if you apply it to scrolling as is, it will scroll too much. -/// In order to adjust the scroll amount to be appropriate, it is applied after -/// dividing it by a scroll divider. The actual denominator is determined by -/// the following formula: -/// -/// denominator = 2 ^ (div - 1) ^2 -/// -/// Valid values are between 1 and 7, KEYBALL_SCROLL_DIV_DEFAULT is used when 0 -/// is specified. -void keyball_set_scroll_div(uint8_t div); - -/// keyball_get_cpi gets current CPI of trackball. -/// The actual CPI value is the returned value +1 and multiplied by 100: -/// -/// CPI = (v + 1) * 100 -uint16_t keyball_get_cpi(void); - -/// keyball_set_cpi changes CPI of trackball. -/// Valid values are between 0 to 119, and the actual CPI value is the set -/// value +1 and multiplied by 100: -/// -/// CPI = (v + 1) * 100 -/// -/// In addition, if you do not upload SROM, the maximum value will be limited -/// to 34 (3500CPI). -void keyball_set_cpi(uint16_t cpi); diff --git a/keyboards/keyball/lib/keyball/keycodes.md b/keyboards/keyball/lib/keyball/keycodes.md deleted file mode 100644 index ed1d15c33d1..00000000000 --- a/keyboards/keyball/lib/keyball/keycodes.md +++ /dev/null @@ -1,52 +0,0 @@ -# Keyball: Special Keycodes - -* [English/英語](#english) -* [日本語/Japanese](#japanese) - - -## Special Keycodes - -| Keycode | Value on Remap | Hex | Description | -|:-----------|:----------------|:---------|:------------------------------------------------------------------| -| `KBC_RST` | `Kb 0` | `0x7e00` | Reset Keyball configuration[^1] | -| `KBC_SAVE` | `Kb 1` | `0x7e01` | Persist Keyball configuration[^1] to EEPROM | -| `CPI_I100` | `Kb 2` | `0x7e02` | Increase 100 CPI (max 12000) | -| `CPI_D100` | `Kb 3` | `0x7e03` | Decrease 100 CPI (min 100) | -| `CPI_I1K` | `Kb 4` | `0x7e04` | Increase 1000 CPI (max 12000) | -| `CPI_D1K` | `Kb 5` | `0x7e05` | Decrease 1000 CPI (min 100) | -| `SCRL_TO` | `Kb 6` | `0x7e06` | Toggle scroll mode | -| `SCRL_MO` | `Kb 7` | `0x7e07` | Enable scroll mode when pressing | -| `SCRL_DVI` | `Kb 8` | `0x7e08` | Increase scroll divider (max D7 = 1/128) <- Most Scroll slow | -| `SCRL_DVD` | `Kb 9` | `0x7e09` | Decrease scroll divider (min 0 = 1/1) <- Most Scroll fast | -| `AML_TO` | `Kb 10` | `0x7e0a` | Toggle automatic mouse layer | -| `AML_I50` | `Kb 11` | `0x7e0b` | Increase 50ms automatic mouse layer timeout (max 1000ms) | -| `AML_D50` | `Kb 12` | `0x7e0c` | Decrease 50ms automatic mouse layer timeout (min 100ms) | -| `SSNP_VRT` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | -| `SSNP_HOR` | `Kb 14` | `0x7e0e` | Set scroll snap mode as horizontal | -| `SSNP_FRE` | `Kb 15` | `0x7e0f` | Set scroll snap mode as disable (free scroll) | - -[^1]: CPI, scroll divider, automatic mouse layer's enable/disable, and automatic mouse layer's timeout. - - -## 特殊キーコード - -| キーコード | Remap上での表記 | 値 | 説明 | -|:-----------|:----------------|:---------|:------------------------------------------------------------------| -| `KBC_RST` | `Kb 0` | `0x7e00` | Keyball設定[^2]のリセット | -| `KBC_SAVE` | `Kb 1` | `0x7e01` | 現在のKeyball設定[^2]をEEPROMに保存します | -| `CPI_I100` | `Kb 2` | `0x7e02` | CPIを100増加させます(最大:12000) | -| `CPI_D100` | `Kb 3` | `0x7e03` | CPIを100減少させます(最小:100) | -| `CPI_I1K` | `Kb 4` | `0x7e04` | CPIを1000増加させます(最大:12000) | -| `CPI_D1K` | `Kb 5` | `0x7e05` | CPIを1000減少させます(最小:100) | -| `SCRL_TO` | `Kb 6` | `0x7e06` | タップごとにスクロールモードのON/OFFを切り替えます | -| `SCRL_MO` | `Kb 7` | `0x7e07` | キーを押している間、スクロールモードになります | -| `SCRL_DVI` | `Kb 8` | `0x7e08` | スクロール除数を1つ上げます(max D7 = 1/128)←最もスクロール遅い | -| `SCRL_DVD` | `Kb 9` | `0x7e09` | スクロール除数を1つ下げます(min D0 = 1/1)←最もスクロール速い | -| `AML_TO` | `Kb 10` | `0x7e0a` | 自動マウスレイヤーをトグルします。 | -| `AML_I50` | `Kb 11` | `0x7e0b` | 自動マウスレイヤーのタイムアウトを50msec増やします (max 1000ms) | -| `AML_D50` | `Kb 12` | `0x7e0c` | 自動マウスレイヤーのタイムアウトを50msec減らします (min 100ms) | -| `SSNP_VRT` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | -| `SSNP_HOR` | `Kb 14` | `0x7e0e` | スクロールスナップモードを水平にする | -| `SSNP_FRE` | `Kb 15` | `0x7e0f` | スクロールスナップモードを無効にする(自由スクロール) | - -[^2]: CPI、スクロール除数、自動マウスレイヤーのON/OFF状態、及び自動マウスレイヤのタイムアウト diff --git a/keyboards/keyball/lib/logofont/font.md b/keyboards/keyball/lib/logofont/font.md deleted file mode 100644 index 5c963c75ca6..00000000000 --- a/keyboards/keyball/lib/logofont/font.md +++ /dev/null @@ -1,212 +0,0 @@ -# Special character patterns - -## blank - -``` -00000000 -00000000 -00000000 -00000000 -00000000 -00000000 -``` - -## blank indicator - -``` -00000000 -00010000 -00010000 -00010000 -00000000 -00000000 -00000000 -``` - -## vertical label separator - -``` -00000000 -00000000 -01010101 -00000000 -00000000 -00000000 -``` - -## "ON" in 2 chars with light background - -``` -00111110 -01100011 -01011101 -01011101 -01100011 -01111111 -01000001 -01111011 -01110111 -01000001 -00111110 -00000000 -``` - -## "OFF" in 2 chars - -``` -00000000 -00011100 -00100010 -00100010 -00011100 -00000000 -00111110 -00001010 -00000000 -00111110 -00001010 -00000000 -``` - -## "aye" in 2 chars for "Layer" - -``` -00110010 -00101010 -00111100 -00000000 -00100110 -00101000 -00011110 -00000000 -00011100 -00101010 -00101100 -00000000 -``` - -## right half 'R' - -``` -00000000 -00000000 -00111111 -00001001 -00110110 -00000000 -``` - -## right half 'C' - -``` -00000000 -00000000 -00011110 -00100001 -00100001 -00000000 -``` - -## "KC" in 2 chars, indicate "keycode" - -``` -00000000 -00000000 -00000000 -00000000 -00111111 -00001000 -00110111 -00000000 -00011110 -00100001 -00100001 -00000000 -``` - -## "CPI" in 2 chars - -``` -00011110 -00100001 -00100001 -00000000 -00111111 -00001001 -00000110 -00000000 -00100001 -00111111 -00100001 -00000000 -``` - -## "SCR" in 2 chars - -``` -00100010 -00100101 -00011001 -00000000 -00011110 -00100001 -00100001 -00000000 -00111111 -00001001 -00110110 -00000000 -``` - -## "DIV" in 2 chars - -``` -00111111 -00100001 -00011110 -00000000 -00100001 -00111111 -00100001 -00000000 -00001111 -00110000 -00001111 -00000000 -``` - -## "AML" in 2 chars - -``` -00111110 -00001001 -00111110 -00000000 -00111111 -00000110 -00111111 -00000000 -00111111 -00100000 -00100000 -00000000 -``` - -## inactive "ON" in 2 chars - -(not use) - -``` -00000000 -00011100 -00100010 -00100010 -00011100 -00000000 -00111110 -00000100 -00001000 -00111110 -00000000 -00000000 -``` diff --git a/keyboards/keyball/lib/logofont/logofont.c b/keyboards/keyball/lib/logofont/logofont.c deleted file mode 100644 index 29ce4888891..00000000000 --- a/keyboards/keyball/lib/logofont/logofont.c +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2021 @Yowkees: Keyball logo -// -// - Keyball logo (0x80 ~ 0xAF) -// -// Copyright 2024 MURAOKA Taro (aka KoRoN, @kaoriya): Other glyphs -// -// - ASCII characters (0x20 ~ 0x7E) -// - Special characters (0xB0 ~ 0xC3) - -#include "progmem.h" - -// clang-format off -const unsigned char font[] PROGMEM = { - - /////////////////////////////////////////////////////////////////////////// - // Standard ASCII characters, most of which fit within 5x6 area. - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 ' ' - 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, // 0x21 '!' - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 '"' - 0x12, 0x3F, 0x12, 0x3F, 0x12, 0x00, // 0x23 '#' - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, // 0x24 '$' - 0x36, 0x09, 0x1E, 0x24, 0x1B, 0x00, // 0x25 '%' - 0x18, 0x26, 0x29, 0x12, 0x28, 0x00, // 0x26 '&' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // 0x27 ''' - 0x00, 0x1E, 0x21, 0x40, 0x00, 0x00, // 0x28 '(' - 0x00, 0x40, 0x21, 0x1E, 0x00, 0x00, // 0x29 ')' - 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00, // 0x2A '*' - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, // 0x2B '+' - 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, // 0x2C ',' - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 0x2D '-' - 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, // 0x2E '.' - 0x20, 0x10, 0x0C, 0x02, 0x01, 0x00, // 0x2F '/' - 0x1E, 0x29, 0x25, 0x23, 0x1E, 0x00, // 0x30 '0' - 0x00, 0x22, 0x3F, 0x20, 0x00, 0x00, // 0x31 '1' - 0x22, 0x31, 0x29, 0x29, 0x26, 0x00, // 0x32 '2' - 0x12, 0x21, 0x25, 0x25, 0x1A, 0x00, // 0x33 '3' - 0x18, 0x14, 0x12, 0x3F, 0x10, 0x00, // 0x34 '4' - 0x17, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x35 '5' - 0x1E, 0x25, 0x25, 0x25, 0x18, 0x00, // 0x36 '6' - 0x01, 0x31, 0x09, 0x05, 0x03, 0x00, // 0x37 '7' - 0x1A, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x38 '8' - 0x06, 0x29, 0x29, 0x29, 0x1E, 0x00, // 0x39 '9' - 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, // 0x3A ':' - 0x00, 0x00, 0x33, 0x73, 0x00, 0x00, // 0x3B ';' - 0x08, 0x14, 0x14, 0x22, 0x22, 0x00, // 0x3C '<' - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // 0x3D '=' - 0x22, 0x22, 0x14, 0x14, 0x08, 0x00, // 0x3E '>' - 0x02, 0x01, 0x29, 0x05, 0x02, 0x00, // 0x3F '?' - 0x3E, 0x59, 0x55, 0x5D, 0x3E, 0x00, // 0x40 '@' - 0x38, 0x16, 0x11, 0x16, 0x38, 0x00, // 0x41 'A' - 0x3F, 0x25, 0x25, 0x25, 0x1A, 0x00, // 0x42 'B' - 0x1E, 0x21, 0x21, 0x21, 0x12, 0x00, // 0x43 'C' - 0x3F, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x44 'D' - 0x3F, 0x25, 0x25, 0x25, 0x21, 0x00, // 0x45 'E' - 0x3F, 0x09, 0x09, 0x09, 0x01, 0x00, // 0x46 'F' - 0x1E, 0x21, 0x21, 0x29, 0x1A, 0x00, // 0x47 'G' - 0x3F, 0x04, 0x04, 0x04, 0x3F, 0x00, // 0x48 'H' - 0x00, 0x21, 0x3F, 0x21, 0x00, 0x00, // 0x49 'I' - 0x10, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x4A 'J' - 0x3F, 0x04, 0x0C, 0x12, 0x21, 0x00, // 0x4B 'K' - 0x3F, 0x20, 0x20, 0x20, 0x20, 0x00, // 0x4C 'L' - 0x3F, 0x02, 0x04, 0x02, 0x3F, 0x00, // 0x4D 'M' - 0x3F, 0x02, 0x0C, 0x10, 0x3F, 0x00, // 0x4E 'N' - 0x1E, 0x21, 0x21, 0x21, 0x1E, 0x00, // 0x4F 'O' - 0x3F, 0x09, 0x09, 0x09, 0x06, 0x00, // 0x50 'P' - 0x1E, 0x21, 0x29, 0x11, 0x2E, 0x00, // 0x51 'Q' - 0x3F, 0x09, 0x09, 0x19, 0x26, 0x00, // 0x52 'R' - 0x12, 0x25, 0x25, 0x29, 0x12, 0x00, // 0x53 'S' - 0x01, 0x01, 0x3F, 0x01, 0x01, 0x00, // 0x54 'T' - 0x1F, 0x20, 0x20, 0x20, 0x1F, 0x00, // 0x55 'U' - 0x07, 0x18, 0x20, 0x18, 0x07, 0x00, // 0x56 'V' - 0x0F, 0x30, 0x0C, 0x30, 0x0F, 0x00, // 0x57 'W' - 0x21, 0x12, 0x0C, 0x12, 0x21, 0x00, // 0x58 'X' - 0x03, 0x04, 0x38, 0x04, 0x03, 0x00, // 0x59 'Y' - 0x31, 0x29, 0x25, 0x23, 0x21, 0x00, // 0x5A 'Z' - 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, // 0x5B '[' - 0x01, 0x02, 0x0C, 0x10, 0x20, 0x00, // 0x5C '\' - 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, // 0x5D ']' - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, // 0x5E '^' - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x5F '_' - 0x00, 0x01, 0x03, 0x04, 0x00, 0x00, // 0x60 '`' - 0x10, 0x2A, 0x2A, 0x2A, 0x3C, 0x00, // 0x61 'a' - 0x3F, 0x24, 0x22, 0x22, 0x1C, 0x00, // 0x62 'b' - 0x1C, 0x22, 0x22, 0x22, 0x24, 0x00, // 0x63 'c' - 0x1C, 0x22, 0x22, 0x24, 0x3F, 0x00, // 0x64 'd' - 0x1C, 0x2A, 0x2A, 0x2A, 0x0C, 0x00, // 0x65 'e' - 0x00, 0x04, 0x3E, 0x05, 0x05, 0x00, // 0x66 'f' - 0x0C, 0x52, 0x52, 0x54, 0x3E, 0x00, // 0x67 'g' - 0x3F, 0x08, 0x04, 0x04, 0x38, 0x00, // 0x68 'h' - 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, // 0x69 'i' - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, // 0x6A 'j' - 0x3F, 0x08, 0x08, 0x14, 0x22, 0x00, // 0x6B 'k' - 0x00, 0x01, 0x3F, 0x20, 0x00, 0x00, // 0x6C 'l' - 0x3E, 0x02, 0x3C, 0x02, 0x3C, 0x00, // 0x6D 'm' - 0x3E, 0x04, 0x02, 0x02, 0x3C, 0x00, // 0x6E 'n' - 0x1C, 0x22, 0x22, 0x22, 0x1C, 0x00, // 0x6F 'o' - 0x7E, 0x14, 0x22, 0x22, 0x1C, 0x00, // 0x70 'p' - 0x1C, 0x22, 0x22, 0x14, 0x7E, 0x00, // 0x71 'q' - 0x3E, 0x04, 0x02, 0x02, 0x04, 0x00, // 0x72 'r' - 0x24, 0x2A, 0x2A, 0x2A, 0x12, 0x00, // 0x73 's' - 0x00, 0x02, 0x1F, 0x22, 0x00, 0x00, // 0x74 't' - 0x1E, 0x20, 0x20, 0x10, 0x3E, 0x00, // 0x75 'u' - 0x06, 0x18, 0x20, 0x18, 0x06, 0x00, // 0x76 'v' - 0x0E, 0x30, 0x0C, 0x30, 0x0E, 0x00, // 0x77 'w' - 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, // 0x78 'x' - 0x0E, 0x50, 0x50, 0x48, 0x3E, 0x00, // 0x79 'y' - 0x22, 0x32, 0x2A, 0x26, 0x22, 0x00, // 0x7A 'z' - 0x08, 0x08, 0x77, 0x41, 0x41, 0x00, // 0x7B '{' - 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, // 0x7C '|' - 0x41, 0x41, 0x77, 0x08, 0x08, 0x00, // 0x7D '}' - 0x18, 0x04, 0x08, 0x10, 0x0C, 0x00, // 0x7E '~' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x7F - - /////////////////////////////////////////////////////////////////////////// - // Keyball logo - - // Logo 1/3 (0x80 ~ 0x8F) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0xF0, 0xF8, 0x8C, 0x86, 0xC6, - 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xE0, - 0x80, 0x00, 0x00, 0x00, 0xF0, 0xF0, - 0xF0, 0x00, 0x00, 0xC0, 0xE0, 0xF0, - 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, - 0xF8, 0x00, 0x00, 0xF8, 0xF8, 0xF8, - - // Logo 2/3 (0x90 ~ 0x9F) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xE0, 0x70, 0x78, 0x68, 0x6C, 0x64, - 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, - 0xE7, 0x3F, 0x1F, 0x0F, 0x3F, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, - 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0xFF, 0x1E, 0x3F, 0xFF, 0xF3, 0xE1, - 0x80, 0x00, 0x00, 0xF8, 0xFC, 0xFE, - 0x36, 0x36, 0x36, 0x3E, 0xBC, 0xB8, - 0x00, 0x0E, 0x3E, 0xFE, 0xF0, 0x80, - 0xF0, 0xFE, 0x3E, 0x0E, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0x06, 0x06, 0x06, - 0xFE, 0xFE, 0xFC, 0x70, 0x00, 0xE6, - 0xF6, 0xF6, 0x36, 0x36, 0xFE, 0xFE, - 0xFC, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - - // Logo 3/3 (0xA0 ~ 0xAF) - 0x00, 0x00, 0x00, 0x00, 0x3C, 0x7F, - 0x63, 0x60, 0xE0, 0xC0, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, - 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0F, - 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, - 0x00, 0x70, 0x70, 0x39, 0x3F, 0x1F, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, - 0x03, 0x00, 0x00, 0x03, 0x03, 0x03, - - /////////////////////////////////////////////////////////////////////////// - // Special characters for Keyball - - // 0xB0 - 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, // B0: blank indicator (BL) - 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, // B1: vertical label separator - 0x3E, 0x63, 0x5D, 0x5D, 0x63, 0x7F, // B2, B3: - 0x41, 0x7B, 0x77, 0x41, 0x3E, 0x00, // "ON" in 2 chars with light bg. - 0x00, 0x1C, 0x22, 0x22, 0x1C, 0x00, // B4, B5: - 0x3E, 0x0A, 0x00, 0x3E, 0x0A, 0x00, // "OFF" in 2 chars - 0x32, 0x2A, 0x3C, 0x00, 0x26, 0x28, // B6, B7: - 0x1E, 0x00, 0x1C, 0x2A, 0x2C, 0x00, // "aye" in 2 chars - 0x00, 0x00, 0x3F, 0x09, 0x36, 0x00, // B8: right half "R" indicate "row" - 0x00, 0x00, 0x1E, 0x21, 0x21, 0x00, // B9: right halc "C" indicate "column" - 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, // BA, BB: - 0x37, 0x00, 0x1E, 0x21, 0x21, 0x00, // "KC" in 2 chars right aligned - 0x1E, 0x21, 0x21, 0x00, 0x3F, 0x09, // BC, BD: - 0x06, 0x00, 0x21, 0x3F, 0x21, 0x00, // "CPI" in 2 chars - 0x22, 0x25, 0x19, 0x00, 0x1E, 0x21, // BE, BF: - 0x21, 0x00, 0x3F, 0x09, 0x36, 0x00, // "SCR" in 2 chars indicate "scroll" - - // 0xC0 - 0x3F, 0x21, 0x1E, 0x00, 0x21, 0x3F, // C0, C1: - 0x21, 0x00, 0x0F, 0x30, 0x0F, 0x00, // "DIV" in 2 chars indicate "divider" - 0x3E, 0x09, 0x3E, 0x00, 0x3F, 0x06, // C2, C3: - 0x3F, 0x00, 0x3F, 0x20, 0x20, 0x00, // "AML" in 2 chars -}; -// clang-format on diff --git a/keyboards/keyball/lib/oledkit/oledkit.c b/keyboards/keyball/lib/oledkit/oledkit.c deleted file mode 100644 index 04e67517a9e..00000000000 --- a/keyboards/keyball/lib/oledkit/oledkit.c +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include "quantum.h" - -#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) - -__attribute__((weak)) void oledkit_render_logo_user(void) { - // Require `OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c"` - char ch = 0x80; - for (int y = 0; y < 3; y++) { - oled_write_P(PSTR(" "), false); - for (int x = 0; x < 16; x++) { - oled_write_char(ch++, false); - } - oled_advance_page(false); - } -} - -__attribute__((weak)) void oledkit_render_info_user(void) { - oledkit_render_logo_user(); -} - -__attribute__((weak)) bool oled_task_user(void) { - if (is_keyboard_master()) { - oledkit_render_info_user(); - } else { - oledkit_render_logo_user(); - } - return true; -} - -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - // Logo needs to be rotated 180 degrees. - // - // A typical OLED has a narrow margin on the left side near the origin, and - // a wide margin on the right side. The Keyball logo consists of three - // lines. If the logo is displayed on an OLED consisting of four lines, the - // margin on the right side will be too large and the balance is not good. - // - // Additionally, by rotating it, the left side of the logo will be above - // the OLED screen, giving it a natural look. - return !is_keyboard_master() ? OLED_ROTATION_180 : rotation; -} - -#endif // OLED_ENABLE diff --git a/keyboards/keyball/lib/oledkit/oledkit.h b/keyboards/keyball/lib/oledkit/oledkit.h deleted file mode 100644 index c8865eb4525..00000000000 --- a/keyboards/keyball/lib/oledkit/oledkit.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#if defined(OLED_ENABLE) && !defined(OLEDKIT_DISABLE) - -// oledkit_render_info_user renders keyboard's internal state information to -// primary board. A keymap can override this by defining a function with same -// signature. -// -// It render a logo as default. -void oledkit_render_info_user(void); - -// oledkit_render_logo_user renders a logo of keyboard to secondary board. -// A keymap can override this by defining a function with same signature. -void oledkit_render_logo_user(void); - -#endif // OLED_ENABLE diff --git a/keyboards/keyball/readme.md b/keyboards/keyball/readme.md deleted file mode 100644 index 3027c69d05f..00000000000 --- a/keyboards/keyball/readme.md +++ /dev/null @@ -1,84 +0,0 @@ -# Keyball series - -This directory includes source code of Keyball keyboard series: - -| Name | Description -|---------------|------------------------------------------------------------- -|[Keyball46](./keyball46)|A split keyboard with 46 vertically staggered keys and 34mm track ball. -|[Keyball61](./keyball61)|A split keyboard with 61 vertically staggered keys and 34mm track ball. -|[Keyball39](./keyball39)|A split keyboard with 39 vertically staggered keys and 34mm track ball. -|[ONE47](./one47)|A keyboard with 47 vertically keys and 34mm trackball. It will support BLE Micro Pro. -|[Keyball44](./keyball44)|A split keyboard with 44 vertically staggered keys and 34mm track ball. - -* Keyboard Designer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: ProMicro like footprint -* Hardware Availability: See [Where to Buy](../../../README.md#where-to-buy) - -See each directories for each keyboards in a table above. - -## How to build - -1. Check out this repository. - - ```console - $ git clone https://github.com/Yowkees/keyball.git keyball - ``` - -2. Check out [qmk/qmk_firmware](https://github.com/qmk/qmk_firmware/) repository in another place. - - ```console - $ git clone https://github.com/qmk/qmk_firmware.git --depth 1 --recurse-submodules --shallow-submodules -b 0.22.14 qmk - ``` - - Currently Keyball firmwares are verified to compile with QMK 0.22.14 - -3. Create a symbolic link to this `keyball/` directory from [qmk/qmk_firmware]'s `keyboards/` directory. - - ```console - $ ls - keyball/ qmk/ - - $ cd qmk/keyboards - $ ln -s ../../keyball/qmk_firmware/keyboards/keyball keyball - $ ls keyball/ - drivers/ keyball39/ keyball44/ keyball46/ keyball61/ lib/ one47/ readme.md - $ cd .. - ``` - -4. `make` your Keyball firmware. - - ```console - # Build Keyball39 firmware with "default" keymap - $ make SKIP_GIT=yes keyball/keyball39:default - - # Build Keyball44 firmware with "default" keymap - $ make SKIP_GIT=yes keyball/keyball44:default - - # Build Keyball61 firmware with "default" keymap - $ make SKIP_GIT=yes keyball/keyball61:default - ``` - -There are three keymaps provided at least: - -* `via` - Standard version with [Remap](https://remap-keys.app/) or VIA to change keymap -* `test` - Easy-to-use version for checking operation at build time -* `default` - Base version for creating your own customized firmware - -## How to create your keymap - -1. Fork this Yowkees/keyball repository -2. Checkout forked repository -3. (OPTIONAL) Create a new branch -4. Add a your keymap, or make some changes -5. Commit changes and push it to your forked repository -6. Open your forked repository with web browser -7. Click and open "Actions" tab -8. Click "Build a firmware on demand" in Workflows on left panel -9. Press "Run workflow" button on right side, then you will see forms -10. (OPTIONAL) Select a your working branch -11. Select a "Keyboard" from drop-down list -12. Enter the "keymap" you want to build -13. Click "Run workflow" -14. Wait a minute until the firmware build is finished -15. Click a latest workflow run and open details -16. Download built firmware in "Artifacts" section From d33cfaddf9e93778fd5626c71acaa1ab6a58e7d9 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:28:43 +0200 Subject: [PATCH 15/22] restore kimiko --- .../keycapsss/kimiko/keymaps/default/keymap.c | 30 +-- .../keycapsss/kimiko/keymaps/default/rules.mk | 13 +- .../kimiko/keymaps/graphite/config.h | 43 --- .../kimiko/keymaps/graphite/glcdfont.c | 237 ----------------- .../kimiko/keymaps/graphite/keymap.c | 182 ------------- .../kimiko/keymaps/graphite/rules.mk | 20 -- .../keycapsss/kimiko/keymaps/rzr/config.h | 57 ---- .../keycapsss/kimiko/keymaps/rzr/glcdfont.c | 237 ----------------- .../keycapsss/kimiko/keymaps/rzr/keymap.c | 203 -------------- .../keycapsss/kimiko/keymaps/rzr/rules.mk | 20 -- keyboards/keycapsss/kimiko/readme.md | 44 ++-- keyboards/keycapsss/kimiko/rev1/keyboard.json | 6 - keyboards/keycapsss/kimiko/rev1/rev1.c | 248 ------------------ 13 files changed, 30 insertions(+), 1310 deletions(-) delete mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/config.h delete mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c delete mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c delete mode 100644 keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk delete mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/config.h delete mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c delete mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c delete mode 100644 keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk delete mode 100644 keyboards/keycapsss/kimiko/rev1/rev1.c diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c index a38f1c83bc0..c61fdfc03a5 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c @@ -28,25 +28,6 @@ enum layers { #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; - - -////////////////////////////////////////////////// -// Tap Dance declarations -enum { - TD_MINS_PLUS, -}; - -// Tap Dance definitions -// tap_dance_action_t tap_dance_actions[] = { -// // Tap once for MINUS, twice for PLUS -// [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), -// }; - -///////////////////////////////////////////////// - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -65,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, //TD(TD_MINS_PLUS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI, KC_RALT @@ -149,12 +130,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, }; #endif // ENCODER_MAP_ENABLE - - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_matrix=true; - debug_keyboard=true; - //debug_mouse=true; - } diff --git a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk index acc30dc4924..ef4f0c0b43a 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk +++ b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk @@ -1,16 +1,9 @@ OLED_ENABLE = yes -ENCODER_ENABLE = no # ENables the use of one or more encoders -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow # LTO: Link Time Optimizations. # Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. # This does not affect QMK Macros and Layers LTO_ENABLE = yes -ENCODER_MAP_ENABLE = no -BOOTLOADER = caterina - -TAP_DANCE_ENABLE = no - -CONSOLE_ENABLE = yes -COMMAND_ENABLE = no -MOUSEKEY_ENABLE = no +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/config.h b/keyboards/keycapsss/kimiko/keymaps/graphite/config.h deleted file mode 100644 index 8be15d964a7..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/graphite/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2019 MechMerlin - * Copyright 2020 @ben_roe (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" -// #define OLED_FONT_WIDTH 5 -// #define OLED_FONT_HEIGHT 7 - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* 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 - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c b/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c deleted file mode 100644 index c3c79d76ee3..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/graphite/glcdfont.c +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2019 MechMerlin -// Copyright 2020 @ben_roe (keycapsss.com) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "progmem.h" - -// Corne 8x6 font -// Online editor: https://helixfonteditor.netlify.com -// or https://joric.github.io/qle/ -// See also: https://github.com/soundmonster/glcdfont_converter - -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, 0x13, 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, 0x24, 0x24, 0x1C, 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, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, - 0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, - 0x22, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, - 0x42, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x02, 0x82, 0x42, 0x22, 0x12, 0x22, - 0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, - 0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, - 0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, - 0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, - 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, - 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, - 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, - 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, - 0x1F, 0x1F, 0x0E, 0x1B, 0x11, 0xC0, - 0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x06, - 0x0C, 0xC6, 0x1F, 0x1F, 0x80, 0x5F, - 0x1F, 0x00, 0x1F, 0x1F, 0x8E, 0x9B, - 0x91, 0x80, 0x9F, 0x9F, 0x91, 0x1F, - 0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, - 0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, - 0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, - 0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, - 0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, - 0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, - 0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, - 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, - 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, - 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, - 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, - 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, - 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, - 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, - 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, - 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, - 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, - 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, - 0x00, 0x84, 0x87, 0x7D, 0x55, 0x57, - 0x55, 0x7D, 0x87, 0x84, 0x00, 0x91, - 0x95, 0x55, 0x55, 0x3F, 0x55, 0x55, - 0x95, 0x91, 0x00, 0x08, 0x08, 0x08, - 0x88, 0xFC, 0x0A, 0x09, 0x08, 0x08, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, - 0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, - 0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, - 0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, - 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, - 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, - 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, - 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, -}; diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c b/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c deleted file mode 100644 index 3efc6e41362..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/graphite/keymap.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright 2019 Leo Batyuk - * Copyright 2020 Drashna Jaelre <@drashna> - * Copyright 2020 @ben_roe (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -enum layers { - _GRAPHITE, - _QWERTY, - _LOWER, - _RAISE, - _ADJUST, -}; - -#define RAISE MO(_RAISE) -#define LOWER MO(_LOWER) - -const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; - - -////////////////////////////////////////////////// -// Tap Dance declarations -// enum { -// TD_MINS_PLUS, -// }; - -// // Tap Dance definitions -// tap_dance_action_t tap_dance_actions[] = { -// // Tap once for MINUS, twice for PLUS -// [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), -// }; - -///////////////////////////////////////////////// - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Graphite - * ,--------------------------------------------. ,---------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | - * |---------+------+------+------+------+------| |------+------+------+------+------+----------| - * | Tab | B | L | D | W | Z | | '" | F | O | U | J | -_/+ | - * |---------+------+------+------+------+------| |------+------+------+------+------+----------| - * | LShift | N | R | T | S | G |-------. ,-------| Y | H | A | E | I | /? | - * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+----------| - * | LCTRL | Q | X | M | C | V |-------| |-------| K | P | ,< | .> | ;: | =+ | - * `--------------------------------------------| / \ |---------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | - * `----------------------------------' '------------------------------------' - */ - - [_GRAPHITE] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, KC_MINS, //TD(TD_MINS_PLUS), - KC_LSFT, KC_N,LALT_T(KC_R), LCTL_T(KC_T),LSFT_T(KC_S),KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, - KC_LCTL, KC_Q, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_P, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, - KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT -), - -/* QWERTY - * ,--------------------------------------------. ,----------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | -_ TD + | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | LShift | A | S | D | F | G |-------. ,-------| H | J | K | L | ;: | '" | - * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| - * | LCTRL | Z | X | C | V | B |-------| |-------| N | M | ,< | .> | /? |RShift/Enter| - * `-------------------------------------------| / \ \-----------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE| Space / \Enter |LOWER |BackSP| RGUI | RALT | - * `----------------------------------' '------------------------------------' - */ - - [_QWERTY] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, //TD(TD_MINS_PLUS), - KC_LSFT, KC_A, LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), - KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_RGUI, KC_RALT -), -/* LOWER - * ,-------------------------------------------. ,-----------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | [ | ] | | | | = | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| |------+------+------+------+------+------| - * | | # | $ | ( | ) | ` |-------. ,-------| _ | 4 | 5 | 6 | + | _ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | % | ^ | { | } | ~ |-------| |-------| & | 1 | 2 | 3 | / | \ | - * `-------------------------------------------| / \ \-----------------------------------------------' - * | LCTRL| LGUI | LALT |LOWER| Space / \Enter |RAISE |BackSP| 0 | . | - * `----------------------------------' '------------------------------------' - */ - -[_LOWER] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, - _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, KC_AMPR, KC_1, KC_2, KC_3, KC_SLASH,KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT -), -/* RAISE - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | PgUp | Home | Up | End | Ins | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F2 | F3 | F4 | F5 | F6 |-------. ,-------| PgDn | Left | Down |Right | Del | | - * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LCTRL| LGUI | LALT |LOWER| Space / \Enter |RAISE |BackSP| RGUI | RALT | - * `----------------------------------' '------------------------------------' - */ - -[_RAISE] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, _______, - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, - _______, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -/* ADJUST (Press LOWER and RAISE together) - * ,-----------------------------------------. ,-----------------------------------------. - * |QK_BOOT| | | | | | | | | | | | def. layer to QWERTY | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |RGB ON| HUE+ | SAT+ | VAL+ | | | | PREV | PLAY | NEXT | | | def. layer to GRAPHITE | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | MODE | HUE- | SAT- | VAL- | | |-------. ,-------| VOL+ | MUTE | VOL- | | | | - * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | - * `-----------------------------------------/ / \ \-----------------------------------------' - * |LCTRL| LGUI | LALT |LOWER| Space / \Enter \ |RAISE |BackSP| RGUI | RALT | - * `----------------------------------' '------------------------------------' - */ - -[_ADJUST] = LAYOUT( - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_QWERTY), - UG_TOGG, UG_HUEU, UG_SATU, UG_VALU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, DF(_GRAPHITE), - UG_NEXT, UG_HUED, UG_SATD, UG_VALD, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - - -layer_state_t layer_state_set_user(layer_state_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); - return state; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_matrix=true; - debug_keyboard=true; - //debug_mouse=true; - } - - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, - [_GRAPHITE] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, - [_LOWER] = { ENCODER_CCW_CW(UG_HUEU, KC_TAB), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_RAISE] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, - [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, -}; -#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk b/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk deleted file mode 100644 index 02214a851bc..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/graphite/rules.mk +++ /dev/null @@ -1,20 +0,0 @@ -OLED_ENABLE = yes -ENCODER_ENABLE = yes # ENables the use of one or more encoders - -RGBLIGHT_ENABLE = no # Enable keyboard 'old' RGB lightning -RGB_MATRIX_ENABLE = yes # Enable keyboard RGB Matrix lightning -RGB_MATRIX_DRIVER = ws2812 - -# LTO: Link Time Optimizations. -# Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. -# This does not affect QMK Macros and Layers -LTO_ENABLE = yes -ENCODER_MAP_ENABLE = yes -BOOTLOADER = caterina - -TAP_DANCE_ENABLE = yes - -CONSOLE_ENABLE = no - -COMMAND_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/config.h b/keyboards/keycapsss/kimiko/keymaps/rzr/config.h deleted file mode 100644 index c065f568f6f..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/rzr/config.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2019 MechMerlin - * Copyright 2020 @ben_roe (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" -// #define OLED_FONT_WIDTH 5 -// #define OLED_FONT_HEIGHT 7 - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* 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 - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK - - -#define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -#define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard - -// These modes also require the RGB_MATRIX_FRAMEBUFFER_EFFECTS define to be available. -#define ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -#define RGB_MATRIX_VAL_STEP 4 -#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR -#define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set -#define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set -#define RGB_MATRIX_DEFAULT_VAL 60 // RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set -#define RGB_MATRIX_DEFAULT_SPD 60 // Sets the default animation speed, if none has been set diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c b/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c deleted file mode 100644 index c3c79d76ee3..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/rzr/glcdfont.c +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2019 MechMerlin -// Copyright 2020 @ben_roe (keycapsss.com) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "progmem.h" - -// Corne 8x6 font -// Online editor: https://helixfonteditor.netlify.com -// or https://joric.github.io/qle/ -// See also: https://github.com/soundmonster/glcdfont_converter - -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, 0x13, 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, 0x24, 0x24, 0x1C, 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, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, - 0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, - 0x22, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, - 0x42, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x02, 0x82, 0x42, 0x22, 0x12, 0x22, - 0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, - 0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, - 0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, - 0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, - 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, - 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, - 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, - 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, - 0x1F, 0x1F, 0x0E, 0x1B, 0x11, 0xC0, - 0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x06, - 0x0C, 0xC6, 0x1F, 0x1F, 0x80, 0x5F, - 0x1F, 0x00, 0x1F, 0x1F, 0x8E, 0x9B, - 0x91, 0x80, 0x9F, 0x9F, 0x91, 0x1F, - 0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, - 0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, - 0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, - 0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, - 0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, - 0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, - 0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, - 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, - 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, - 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, - 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, - 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, - 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, - 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, - 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, - 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, - 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, - 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, - 0x00, 0x84, 0x87, 0x7D, 0x55, 0x57, - 0x55, 0x7D, 0x87, 0x84, 0x00, 0x91, - 0x95, 0x55, 0x55, 0x3F, 0x55, 0x55, - 0x95, 0x91, 0x00, 0x08, 0x08, 0x08, - 0x88, 0xFC, 0x0A, 0x09, 0x08, 0x08, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, - 0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, - 0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, - 0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, - 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, - 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, - 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, - 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, -}; diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c b/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c deleted file mode 100644 index ade1d0f025d..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/rzr/keymap.c +++ /dev/null @@ -1,203 +0,0 @@ -/* Copyright 2019 Leo Batyuk - * Copyright 2020 Drashna Jaelre <@drashna> - * Copyright 2020 @ben_roe (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -enum layers { - _GRAPHITE, - _QWERTY, - _LOWER, - _RAISE, - _ADJUST, -}; - -#define RAISE MO(_RAISE) -#define LOWER MO(_LOWER) - -const char* const PROGMEM LAYER_NAMES[] = { "Grpht", "QWERT" }; - -////////////////////////////////////////////////// -// Tap Dance declarations -enum { - TD_MINS_PLUS, -}; - -// Tap Dance definitions -tap_dance_action_t tap_dance_actions[] = { - // Tap once for MINUS, twice for PLUS - [TD_MINS_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_PLUS), -}; - -///////////////////////////////////////////////// - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* focal - * ,--------------------------------------------. ,----------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | Tab | V | L | H | G | K | | Q | F | O | U | J | -_/+ | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | LShift | S | R | N | T | B |-------. ,-------| Y | C | A | E | I | /? | - * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| - * | LCTRL | Z | X | M | D | P |-------| |-------| '" | W | ,< | .> | ;: | =+ | - * `--------------------------------------------| / \ |-----------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | - * `----------------------------------' '------------------------------------' - */ - -// [_FOCAL] = LAYOUT( -// KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, -// KC_TAB, KC_V, KC_L, KC_H, KC_G, KC_K, KC_Q, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), -// KC_LSFT, KC_S,LALT_T(KC_R), LCTL_T(KC_N),LSFT_T(KC_T),KC_B, KC_Y, RSFT_T(KC_C), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, -// KC_LCTL, KC_Z, KC_X, KC_M, KC_D, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, KC_W, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, -// KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT -// ), - - /* Graphite - * ,--------------------------------------------. ,---------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | - * |---------+------+------+------+------+------| |------+------+------+------+------+----------| - * | Tab | B | L | D | W | Z | | '" | F | O | U | J | -_/+ | - * |---------+------+------+------+------+------| |------+------+------+------+------+----------| - * | LShift | N | R | T | S | G |-------. ,-------| Y | H | A | E | I | /? | - * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+----------| - * | LCTRL | Q | X | M | C | V |-------| |-------| K | P | ,< | .> | ;: | =+ | - * `--------------------------------------------| / \ |---------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP|Delete| RALT | - * `----------------------------------' '------------------------------------' - */ - - [_GRAPHITE] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_B, KC_L, KC_D, KC_W, KC_Z, KC_QUOT, KC_F, KC_O, KC_U, KC_J, TD(TD_MINS_PLUS), - KC_LSFT, KC_N,LALT_T(KC_R), LCTL_T(KC_T),LSFT_T(KC_S),KC_G, KC_Y, RSFT_T(KC_H), RCTL_T(KC_A), RALT_T(KC_E),KC_I, KC_SLSH, - KC_LCTL, KC_Q, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_P, KC_COMM, KC_DOT, KC_SCLN,KC_EQL, - KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_DEL, KC_RALT -), - -/* QWERTY - * ,--------------------------------------------. ,----------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | `~ | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | -_ TD + | - * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | LShift | A | S | D | F | G |-------. ,-------| H | J | K | L | ;: | '" | - * |---------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| - * | LCTRL | Z | X | C | V | B |-------| |-------| N | M | ,< | .> | /? |RShift/Enter| - * `-------------------------------------------| / \ \-----------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter |LOWER |BackSP| RGUI | RALT | - * `----------------------------------' '------------------------------------' - */ - - [_QWERTY] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD(TD_MINS_PLUS), - KC_LSFT, KC_A, LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), - KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_RGUI, KC_RALT -), -/* LOWER - * ,-------------------------------------------. ,-----------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | [ | ] | | | | = | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| |------+------+------+------+------+------| - * | | # | $ | ( | ) | ` |-------. ,-------| _ | 4 | 5 | 6 | + | _ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | % | ^ | { | } | ~ |-------| |-------| & | 1 | 2 | 3 | / | \ | - * `-------------------------------------------| / \ \-----------------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP| 0 | . | - * `----------------------------------' '------------------------------------' - */ - -[_LOWER] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_EXLM, KC_AT, KC_LBRC, KC_RBRC, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, - _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, KC_AMPR, KC_1, KC_2, KC_3, KC_SLASH,KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT -), -/* RAISE - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | PgUp | Home | Up | End | Ins | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F2 | F3 | F4 | F5 | F6 |-------. ,-------| PgDn | Left | Down |Right | Del | | - * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LCTRL| LGUI | LALT |RAISE | Space/ \Enter|LOWER |BackSP| RGUI | RALT | - * `---------------------------------' '------------------------------------' - */ - -[_RAISE] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, _______, - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, - _______, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -/* ADJUST (Press LOWER and RAISE together) - * ,-----------------------------------------. ,-----------------------------------------. - * |QK_BOOT| | | | | | | | | | | | def. layer to QWERTY | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |RGB ON| HUE+ | SAT+ | VAL+ | | | | PREV | PLAY | NEXT | | | def. layer to FOCAL | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | MODE | HUE- | SAT- | VAL- | | |-------. ,-------| VOL+ | MUTE | VOL- | | | def. layer to GRAPHITE | - * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | - * `-----------------------------------------/ / \ \-----------------------------------------' - * |LCTRL| LGUI | LALT |RAISE|Space / \Enter|LOWER |BackSP| RGUI | RALT | - * `----------------------------------' '------------------------------------' - */ - -[_ADJUST] = LAYOUT( - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_GRAPHITE), DF(_QWERTY), - RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, - RM_NEXT, RM_HUED, RM_SATD, RM_VALD, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - - -layer_state_t layer_state_set_user(layer_state_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); - return state; -} - -// void keyboard_post_init_user(void) { -// // // Customise these values to desired behaviour -// debug_enable=true; -// debug_keyboard=true; -// // debug_matrix=true; -// // //debug_mouse=true; -// } - - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, - [_GRAPHITE] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, - [_LOWER] = { ENCODER_CCW_CW(UG_HUEU, KC_TAB), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_RAISE] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, - [_ADJUST] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, -}; -#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk b/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk deleted file mode 100644 index 02214a851bc..00000000000 --- a/keyboards/keycapsss/kimiko/keymaps/rzr/rules.mk +++ /dev/null @@ -1,20 +0,0 @@ -OLED_ENABLE = yes -ENCODER_ENABLE = yes # ENables the use of one or more encoders - -RGBLIGHT_ENABLE = no # Enable keyboard 'old' RGB lightning -RGB_MATRIX_ENABLE = yes # Enable keyboard RGB Matrix lightning -RGB_MATRIX_DRIVER = ws2812 - -# LTO: Link Time Optimizations. -# Reduce compiled size, but will automatically disable the legacy TMK Macros and Functions features. -# This does not affect QMK Macros and Layers -LTO_ENABLE = yes -ENCODER_MAP_ENABLE = yes -BOOTLOADER = caterina - -TAP_DANCE_ENABLE = yes - -CONSOLE_ENABLE = no - -COMMAND_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/kimiko/readme.md b/keyboards/keycapsss/kimiko/readme.md index 39215182090..32c64010126 100644 --- a/keyboards/keycapsss/kimiko/readme.md +++ b/keyboards/keycapsss/kimiko/readme.md @@ -1,28 +1,36 @@ -# Kimiko rev1 board by Keycapsss.com -### What's added by me +# Kimiko -1. OLED display enabled - - layout name displayed +## Rev2 -2. RGB key lights - - RGB Matrix enabled for Graphite layout, keys heatmap works - - RGB lights enabled for default layout - -3. Multiple layouts - - Graphite layout has 2 switchable layouts, **Graphite** and **Qwerty** +A split keyboard with 4x6 vertically staggered keys and a Kyria style thumb thumb cluster. +![Kimiko Rev2](https://i.imgur.com/TBP8Bcrh.jpg) -Put content of this repo in *qmk_firmware/keyboards/keycapsss/kimiko/* directory -Build and flash with: -``` -make keycapsss/kimiko/rev1:graphite:flash +- Keyboard Maintainer: [BenRoe](https://github.com/BenRoe/) [@keycapsss](https://twitter.com/keycapsss) +- Hardware Supported: Pro Micro 5V/16Mhz and compatible +- Hardware Availability: [Keycapsss.com](https://keycapsss.com) + +### Features (Rev2) + +- 62 Per key RGB led's (SK6812 Mini-E) + - RGB Matrix is enabled as default in rules.mk + - The effects can be configured in config.h +- Support for 1 rotary encoder per side (two possible positions) +- Support for 1 OLED display per side + - 128x32 (SSD1306) or Nice!View are supported + - With 1 OLED on each side, they have to be the same + - Default configuration for 128x32 OLED + + +Make firmware .hex for this keyboard (after setting up your build environment): + +```bash +qmk compile -kb keycapsss/kimiko/rev2 -km default ``` -# -# +Use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) to flash the firmware hex file to the keyboard controller. -Original documentation: -# Kimiko +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). ## Rev1 diff --git a/keyboards/keycapsss/kimiko/rev1/keyboard.json b/keyboards/keycapsss/kimiko/rev1/keyboard.json index 6a7d6b6f514..ae09eb83c87 100644 --- a/keyboards/keycapsss/kimiko/rev1/keyboard.json +++ b/keyboards/keycapsss/kimiko/rev1/keyboard.json @@ -40,12 +40,6 @@ "led_count": 60, "split_count": [30, 30] }, - "rgb_matrix": { - "driver": "ws2812", - "led_count": 60, - "max_brightness": 60, - "split_count": [30, 30] - }, "ws2812": { "pin": "D3" }, diff --git a/keyboards/keycapsss/kimiko/rev1/rev1.c b/keyboards/keycapsss/kimiko/rev1/rev1.c deleted file mode 100644 index 78da3767ef3..00000000000 --- a/keyboards/keycapsss/kimiko/rev1/rev1.c +++ /dev/null @@ -1,248 +0,0 @@ -/* Copyright 2023 @BenRoe (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - - -# ifdef OLED_ENABLE - -enum layers { _GRAPHITE, _QWERTY, _LOWER, _RAISE, _ADJUST }; -//enum layers {, _QWERTY, _LOWER, _RAISE, _ADJUST }; - -extern const char* const PROGMEM LAYER_NAMES[]; - -oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - return OLED_ROTATION_270; -} - -// NOTE: Most of the OLED code was originally written by Soundmonster for the Corne, -// and has been copied directly from `crkbd/soundmonster/keymap.c` - -void render_mod_status_gui_alt(uint8_t modifiers) { - static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0}; - static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0}; - static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0}; - static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0}; - - static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0}; - static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0}; - static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0}; - static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0}; - - // fillers between the modifier icons bleed into the icon frames - static const char PROGMEM off_off_1[] = {0xc5, 0}; - static const char PROGMEM off_off_2[] = {0xc6, 0}; - static const char PROGMEM on_off_1[] = {0xc7, 0}; - static const char PROGMEM on_off_2[] = {0xc8, 0}; - static const char PROGMEM off_on_1[] = {0xc9, 0}; - static const char PROGMEM off_on_2[] = {0xca, 0}; - static const char PROGMEM on_on_1[] = {0xcb, 0}; - static const char PROGMEM on_on_2[] = {0xcc, 0}; - - if (modifiers & MOD_MASK_GUI) { - oled_write_P(gui_on_1, false); - } else { - oled_write_P(gui_off_1, false); - } - - if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { - oled_write_P(on_on_1, false); - } else if (modifiers & MOD_MASK_GUI) { - oled_write_P(on_off_1, false); - } else if (modifiers & MOD_MASK_ALT) { - oled_write_P(off_on_1, false); - } else { - oled_write_P(off_off_1, false); - } - - if (modifiers & MOD_MASK_ALT) { - oled_write_P(alt_on_1, false); - } else { - oled_write_P(alt_off_1, false); - } - - if (modifiers & MOD_MASK_GUI) { - oled_write_P(gui_on_2, false); - } else { - oled_write_P(gui_off_2, false); - } - - if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { - oled_write_P(on_on_2, false); - } else if (modifiers & MOD_MASK_GUI) { - oled_write_P(on_off_2, false); - } else if (modifiers & MOD_MASK_ALT) { - oled_write_P(off_on_2, false); - } else { - oled_write_P(off_off_2, false); - } - - if (modifiers & MOD_MASK_ALT) { - oled_write_P(alt_on_2, false); - } else { - oled_write_P(alt_off_2, false); - } -} - -void render_mod_status_ctrl_shift(uint8_t modifiers) { - static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0}; - static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0}; - static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0}; - static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0}; - - static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0}; - static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0}; - static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0}; - static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0}; - - // fillers between the modifier icons bleed into the icon frames - static const char PROGMEM off_off_1[] = {0xc5, 0}; - static const char PROGMEM off_off_2[] = {0xc6, 0}; - static const char PROGMEM on_off_1[] = {0xc7, 0}; - static const char PROGMEM on_off_2[] = {0xc8, 0}; - static const char PROGMEM off_on_1[] = {0xc9, 0}; - static const char PROGMEM off_on_2[] = {0xca, 0}; - static const char PROGMEM on_on_1[] = {0xcb, 0}; - static const char PROGMEM on_on_2[] = {0xcc, 0}; - - if (modifiers & MOD_MASK_CTRL) { - oled_write_P(ctrl_on_1, false); - } else { - oled_write_P(ctrl_off_1, false); - } - - if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { - oled_write_P(on_on_1, false); - } else if (modifiers & MOD_MASK_CTRL) { - oled_write_P(on_off_1, false); - } else if (modifiers & MOD_MASK_SHIFT) { - oled_write_P(off_on_1, false); - } else { - oled_write_P(off_off_1, false); - } - - if (modifiers & MOD_MASK_SHIFT) { - oled_write_P(shift_on_1, false); - } else { - oled_write_P(shift_off_1, false); - } - - if (modifiers & MOD_MASK_CTRL) { - oled_write_P(ctrl_on_2, false); - } else { - oled_write_P(ctrl_off_2, false); - } - - if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { - oled_write_P(on_on_2, false); - } else if (modifiers & MOD_MASK_CTRL) { - oled_write_P(on_off_2, false); - } else if (modifiers & MOD_MASK_SHIFT) { - oled_write_P(off_on_2, false); - } else { - oled_write_P(off_off_2, false); - } - - if (modifiers & MOD_MASK_SHIFT) { - oled_write_P(shift_on_2, false); - } else { - oled_write_P(shift_off_2, false); - } -} - -void render_logo(void) { - //static const char PROGMEM kimiko_logo[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0}; - oled_advance_page(false); - oled_advance_page(false); - - uint8_t default_layer = get_highest_layer(default_layer_state); - switch (default_layer) { - // case 2: - // oled_write(LAYER_NAMES[2], false); - // break; - case 1: - oled_write(LAYER_NAMES[1], false); - break; - case 0: - oled_write(LAYER_NAMES[0], false); - break; - } - - //oled_write_P(kimiko_logo, false); - // oled_write_P(PSTR("Kimik"), false); - //uint8_t current_layer = get_highest_layer(layer_state); -// char ch[4]; - // sprintf(ch, "%u", layer_state); - // oled_write(ch, false); - // sprintf(ch, "%u", default_layer) ; - // oled_write(ch, false); - -// oled_write(LAYER_NAMES[default_layer], false); - - - - // char ch[4]; - // sprintf(ch, "%u", default_layer); - // oled_write(ch, false); - // //char ch[4]; - // sprintf(ch, "L%u", _QWERTY); - // oled_write(ch, false); - - - // uprintf("u %u\n", default_layer_state); - -} - -void render_layer_state(void) { - static const char PROGMEM default_layer[] = {0x20, 0x94, 0x95, 0x96, 0x20, 0x20, 0xb4, 0xb5, 0xb6, 0x20, 0x20, 0xd4, 0xd5, 0xd6, 0x20, 0}; - static const char PROGMEM raise_layer[] = {0x20, 0x97, 0x98, 0x99, 0x20, 0x20, 0xb7, 0xb8, 0xb9, 0x20, 0x20, 0xd7, 0xd8, 0xd9, 0x20, 0}; - static const char PROGMEM lower_layer[] = {0x20, 0x9a, 0x9b, 0x9c, 0x20, 0x20, 0xba, 0xbb, 0xbc, 0x20, 0x20, 0xda, 0xdb, 0xdc, 0x20, 0}; - static const char PROGMEM adjust_layer[] = {0x20, 0x9d, 0x9e, 0x9f, 0x20, 0x20, 0xbd, 0xbe, 0xbf, 0x20, 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; - - if (layer_state_is(_ADJUST)) { - oled_write_P(adjust_layer, false); - } else if (layer_state_is(_LOWER)) { - oled_write_P(lower_layer, false); - } else if (layer_state_is(_RAISE)) { - oled_write_P(raise_layer, false); - } else { - oled_write_P(default_layer, false); - } -} - -void render_status_main(void) { - render_logo(); - oled_advance_page(false); - render_layer_state(); - oled_advance_page(false); - render_mod_status_gui_alt(get_mods() | get_oneshot_mods()); - render_mod_status_ctrl_shift(get_mods() | get_oneshot_mods()); -} - -bool oled_task_kb(void) { - if (!oled_task_user()) { - return false; - } - - if (is_keyboard_master()) { - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_logo(); - } - - return true; -} -# endif // OLED_ENABLE From b8254cc868aac2598af77d50f17c6174be766d51 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:32:49 +0200 Subject: [PATCH 16/22] remove project artifacts --- .gitignore | 2 ++ .vscode/settings.json | 38 ------------------------------ qmk_firmware.sln | 55 ------------------------------------------- 3 files changed, 2 insertions(+), 93 deletions(-) delete mode 100644 .vscode/settings.json delete mode 100644 qmk_firmware.sln diff --git a/.gitignore b/.gitignore index 20e706a2b59..99fcbabe80b 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,8 @@ quantum/version.h .idea/ .project .settings/ +.vscode/ +*.sln # ? .dep diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 5f6794a0eef..00000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,38 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - // Unofficially, QMK uses spaces for indentation - "editor.insertSpaces": true, - // Configure glob patterns for excluding files and folders. - "files.exclude": { - "**/.build": true, - "**/*.hex": true, - "**/*.bin": true, - "**/*.uf2": true - }, - "files.associations": { - "*.h": "c", - "*.c": "c", - "*.inc": "c", - "*.cpp": "cpp", - "*.hpp": "cpp", - "xstddef": "c", - "type_traits": "c", - "utility": "c", - "ranges": "c", - "cstdint": "c", - "chrono": "c", - "span": "c" - }, - "[markdown]": { - "editor.trimAutoWhitespace": false, - "files.trimTrailingWhitespace": false - }, - "python.formatting.provider": "yapf", - "[json]": { - "editor.formatOnSave": false - }, - "clangd.arguments": [ - "--header-insertion=never" - ], - "workbench.tree.indent": 16 -} diff --git a/qmk_firmware.sln b/qmk_firmware.sln deleted file mode 100644 index 5044ace618f..00000000000 --- a/qmk_firmware.sln +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.2.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{3A8DF596-E814-FECC-DD4B-D8EF8AAC1A0D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lufa", "lufa", "{05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projects", "Projects", "{EBAEACE1-FFDC-2B03-6487-1FD503E5D58B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LEDNotifier", "LEDNotifier", "{263C1B12-F4D9-330A-570B-947F5E3B8527}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CPUMonitor", "lib\lufa\Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj", "{088719F7-C934-BC63-1527-6EFF4B84BC94}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LEDMixer", "lib\lufa\Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj", "{E50FF490-1163-BB1F-C704-7DD84ED8F5FD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TempDataLogger", "TempDataLogger", "{04CDC07F-3F25-3195-D559-D5409EC77759}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TempLoggerHostApp", "lib\lufa\Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj", "{34968B94-999A-114F-A945-DCF12133FBDB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {088719F7-C934-BC63-1527-6EFF4B84BC94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {088719F7-C934-BC63-1527-6EFF4B84BC94}.Debug|Any CPU.Build.0 = Debug|Any CPU - {088719F7-C934-BC63-1527-6EFF4B84BC94}.Release|Any CPU.ActiveCfg = Release|Any CPU - {088719F7-C934-BC63-1527-6EFF4B84BC94}.Release|Any CPU.Build.0 = Release|Any CPU - {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E50FF490-1163-BB1F-C704-7DD84ED8F5FD}.Release|Any CPU.Build.0 = Release|Any CPU - {34968B94-999A-114F-A945-DCF12133FBDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34968B94-999A-114F-A945-DCF12133FBDB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34968B94-999A-114F-A945-DCF12133FBDB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34968B94-999A-114F-A945-DCF12133FBDB}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A} = {3A8DF596-E814-FECC-DD4B-D8EF8AAC1A0D} - {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} = {05FC12FD-B4D5-2EA3-118E-AEE4400B7F0A} - {263C1B12-F4D9-330A-570B-947F5E3B8527} = {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} - {088719F7-C934-BC63-1527-6EFF4B84BC94} = {263C1B12-F4D9-330A-570B-947F5E3B8527} - {E50FF490-1163-BB1F-C704-7DD84ED8F5FD} = {263C1B12-F4D9-330A-570B-947F5E3B8527} - {04CDC07F-3F25-3195-D559-D5409EC77759} = {EBAEACE1-FFDC-2B03-6487-1FD503E5D58B} - {34968B94-999A-114F-A945-DCF12133FBDB} = {04CDC07F-3F25-3195-D559-D5409EC77759} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {0F4CBF29-187F-4FDE-A7D5-C19E42C10D93} - EndGlobalSection -EndGlobal From 1ade493cf64cf5b8483ff650fc2b9de508ef2811 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:35:27 +0200 Subject: [PATCH 17/22] remove .noci ? --- keyboards/yowkees/keyball/keyball39/.noci | 0 keyboards/yowkees/keyball/keyball44/.noci | 0 keyboards/yowkees/keyball/keyball46/.noci | 0 keyboards/yowkees/keyball/keyball61/.noci | 0 keyboards/yowkees/keyball/one47/.noci | 0 5 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 keyboards/yowkees/keyball/keyball39/.noci delete mode 100644 keyboards/yowkees/keyball/keyball44/.noci delete mode 100644 keyboards/yowkees/keyball/keyball46/.noci delete mode 100644 keyboards/yowkees/keyball/keyball61/.noci delete mode 100644 keyboards/yowkees/keyball/one47/.noci diff --git a/keyboards/yowkees/keyball/keyball39/.noci b/keyboards/yowkees/keyball/keyball39/.noci deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/keyboards/yowkees/keyball/keyball44/.noci b/keyboards/yowkees/keyball/keyball44/.noci deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/keyboards/yowkees/keyball/keyball46/.noci b/keyboards/yowkees/keyball/keyball46/.noci deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/keyboards/yowkees/keyball/keyball61/.noci b/keyboards/yowkees/keyball/keyball61/.noci deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/keyboards/yowkees/keyball/one47/.noci b/keyboards/yowkees/keyball/one47/.noci deleted file mode 100644 index e69de29bb2d..00000000000 From 467efe86c6bf83f888e75efb9007e253bfcebc0d Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:39:23 +0200 Subject: [PATCH 18/22] revert .vscode/settings --- .vscode/settings.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..f369ecb1748 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,34 @@ +// Place your settings in this file to overwrite default and user settings. +{ + // Unofficially, QMK uses spaces for indentation + "editor.insertSpaces": true, + // Configure glob patterns for excluding files and folders. + "files.exclude": { + "**/.build": true, + "**/*.hex": true, + "**/*.bin": true, + "**/*.uf2": true + }, + "files.associations": { + "*.h": "c", + "*.c": "c", + "*.inc": "c", + "*.cpp": "cpp", + "*.hpp": "cpp", + "xstddef": "c", + "type_traits": "c", + "utility": "c", + "ranges": "c" + }, + "[markdown]": { + "editor.trimAutoWhitespace": false, + "files.trimTrailingWhitespace": false + }, + "python.formatting.provider": "yapf", + "[json]": { + "editor.formatOnSave": false + }, + "clangd.arguments": [ + "--header-insertion=never" + ] +} From 4432e8114799d24cd7782eb6ad76353fc9054e77 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:44:53 +0200 Subject: [PATCH 19/22] old Keyball46 and One47 removed --- keyboards/yowkees/keyball/keyball46/config.h | 80 ------- .../keyball/keyball46/docs/diff_from_v1.md | 49 ---- .../keyball/keyball46/docs/features_v1_ja.md | 154 ------------- keyboards/yowkees/keyball/keyball46/info.json | 218 ------------------ .../yowkees/keyball/keyball46/keyball46.c | 66 ------ .../yowkees/keyball/keyball46/keyball46.h | 113 --------- .../yowkees/keyball/keyball46/keyball46.json | 32 --- .../keyball/keyball46/keyball46_left.json | 32 --- .../keyball46/keymaps/default/config.h | 42 ---- .../keyball46/keymaps/default/keymap.c | 117 ---------- .../keyball46/keymaps/default/rules.mk | 3 - .../keyball46/keymaps/develop/config.h | 39 ---- .../keyball46/keymaps/develop/keymap.c | 57 ----- .../keyball46/keymaps/develop/rules.mk | 6 - .../keyball/keyball46/keymaps/test/config.h | 25 -- .../keyball/keyball46/keymaps/test/keymap.c | 56 ----- .../keyball/keyball46/keymaps/test/rules.mk | 3 - .../keyball46/keymaps/test_Both/config.h | 28 --- .../keyball46/keymaps/test_Both/keymap.c | 57 ----- .../keyball46/keymaps/test_Both/rules.mk | 3 - .../keyball46/keymaps/test_Left/config.h | 28 --- .../keyball46/keymaps/test_Left/keymap.c | 57 ----- .../keyball46/keymaps/test_Left/rules.mk | 3 - .../keyball46/keymaps/via_Both/config.h | 42 ---- .../keyball46/keymaps/via_Both/keymap.c | 117 ---------- .../keyball46/keymaps/via_Both/rules.mk | 5 - .../keyball46/keymaps/via_Left/config.h | 42 ---- .../keyball46/keymaps/via_Left/keymap.c | 117 ---------- .../keyball46/keymaps/via_Left/rules.mk | 5 - keyboards/yowkees/keyball/keyball46/readme.md | 25 -- keyboards/yowkees/keyball/keyball46/rules.mk | 49 ---- .../yowkees/keyball/lib/keyball/keyball.c | 14 -- keyboards/yowkees/keyball/one47/config.h | 59 ----- keyboards/yowkees/keyball/one47/info.json | 68 ------ .../keyball/one47/keymaps/default/config.h | 36 --- .../keyball/one47/keymaps/default/keymap.c | 70 ------ .../keyball/one47/keymaps/default/rules.mk | 3 - .../keyball/one47/keymaps/develop/config.h | 33 --- .../keyball/one47/keymaps/develop/keymap.c | 57 ----- .../keyball/one47/keymaps/develop/rules.mk | 6 - .../keyball/one47/keymaps/test/config.h | 27 --- .../keyball/one47/keymaps/test/keymap.c | 51 ---- .../keyball/one47/keymaps/test/rules.mk | 3 - keyboards/yowkees/keyball/one47/one47.c | 97 -------- keyboards/yowkees/keyball/one47/one47.h | 54 ----- keyboards/yowkees/keyball/one47/readme.md | 20 -- keyboards/yowkees/keyball/one47/rules.mk | 53 ----- 47 files changed, 2321 deletions(-) delete mode 100644 keyboards/yowkees/keyball/keyball46/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md delete mode 100644 keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md delete mode 100644 keyboards/yowkees/keyball/keyball46/info.json delete mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keyball46.json delete mode 100644 keyboards/yowkees/keyball/keyball46/keyball46_left.json delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball46/readme.md delete mode 100644 keyboards/yowkees/keyball/keyball46/rules.mk delete mode 100644 keyboards/yowkees/keyball/one47/config.h delete mode 100644 keyboards/yowkees/keyball/one47/info.json delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/config.h delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/keymap.c delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/default/rules.mk delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/config.h delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/config.h delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/keymap.c delete mode 100644 keyboards/yowkees/keyball/one47/keymaps/test/rules.mk delete mode 100644 keyboards/yowkees/keyball/one47/one47.c delete mode 100644 keyboards/yowkees/keyball/one47/one47.h delete mode 100644 keyboards/yowkees/keyball/one47/readme.md delete mode 100644 keyboards/yowkees/keyball/one47/rules.mk diff --git a/keyboards/yowkees/keyball/keyball46/config.h b/keyboards/yowkees/keyball/keyball46/config.h deleted file mode 100644 index d3592fec608..00000000000 --- a/keyboards/yowkees/keyball/keyball46/config.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -// Key matrix parameters (Keyball61 is duplex matrix) -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define MATRIX_MASKED -#define DEBOUNCE 5 -#define DIODE_DIRECTION COL2ROW - -// Split parameters -#define SOFT_SERIAL_PIN D2 -//#define SPLIT_HAND_MATRIX_GRID F7, B5 // for ball -//#define SPLIT_HAND_MATRIX_GRID F6, B5 // for noball -#define SPLIT_USB_DETECT -#ifdef OLED_ENABLE -# define SPLIT_OLED_ENABLE -#endif - -// If your PC does not recognize Keyball, try setting this macro. This macro -// increases the firmware size by 200 bytes, so it is disabled by default, but -// it has been reported to work well in such cases. -//#define SPLIT_WATCHDOG_ENABLE - -#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI - -// RGB LED settings -#define WS2812_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 14 -# define RGBLED_SPLIT { 7, 7 } -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 255 // limitated for power consumption -# endif -# ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 17 -# endif -# ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 17 -# endif -# ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -# endif -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_SPLIT { 7, 7 } -#endif - -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" -# define OLED_FONT_START 32 -# define OLED_FONT_END 195 -#endif - -#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) -# define LAYER_STATE_8BIT -#endif - -// To squeeze firmware size -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md b/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md deleted file mode 100644 index fb2b42467ca..00000000000 --- a/keyboards/yowkees/keyball/keyball46/docs/diff_from_v1.md +++ /dev/null @@ -1,49 +0,0 @@ -# Differences from V1 - -* `KEYBALL_SCROLL_DIVIDER` - deleted - - V2 is able to change scroll divider dynamically by keycodes: - - * `SCRL_DVI` - increment scroll divider (maximum 7) - * `SCRL_DVD` - decrement scroll divider (mininum 1) - - The effect of scroll divider is changed. - It is applied as `1 / (2 ^ (n-1))`. - Therefore, its divider will be like this table: - - Value | Divider - -----:|-------: - 1 | 1 / 1 - 2 | 1 / 2 - 3 | 1 / 4 - 4 | 1 / 8 - 5 | 1 / 16 - 6 | 1 / 32 - 7 | 1 / 64 - - Default is 4, it can be changed by defining `KEYBALL_SCROLL_DIV_DEFAULT` in your config.h - -* `KEYBALL_POINTER_DIVIDER` - deleted - - V2 controls resolution (CPI) of optical sensor PMW3360DM directly. - The minimum is 100, and the maximum is 12000, with 100 step. - - CPI can be changed by keycodes: - - * `CPI_I1K` - increase 1000 CPI - * `CPI_I100` - increase 100 CPI - * `CPI_D100` - decrease 100 CPI - * `CPI_D1K` - decrease 1000 CPI - - Default is 500, it can be changed by defiing `KEYBALL_CPI_DEFAULT` in your - config.h - -* `void keyball_process_trackball_default()` API - deleted - -* `void keyball_process_trackball_user()` overridable function - deleted - -* `TRACKBALL_MAX_NUMBER` constant - deleted - -* `TRACKBALL_SAMPLE_COUNT` - deleted - - V2 controls resolution (CPI) of optical sensor PMW3360DM directly. diff --git a/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md b/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md deleted file mode 100644 index 4a102b7d41f..00000000000 --- a/keyboards/yowkees/keyball/keyball46/docs/features_v1_ja.md +++ /dev/null @@ -1,154 +0,0 @@ -# Keyball のカスタマイズ可能な機能 - -## キーマップで利用可能な Keyball の機能 - -### `bool keyball_get_scroll_mode(void)` API - -トラックボールの現在のスクロールモードを取得します。 - -### `void keyball_set_scroll_mode(bool mode)` API - -トラックボールのスクロールモードを変更します。 - -### `KEYBALL_SCROLL_DIVIDER` - -スクロールモードではトラックボールの移動量を `KEYBALL_SCROLL_DIVIDER` で割るこ -とで程よいスクロール量に調整しています。 - -各キーマップの config.h で設定できます。デフォルトは `10` で `0` 以下の値を設定 -するとコンパイルエラーになります。 - -### `KEYBALL_POINTER_DIVIDER` - -トラックボールによるポインタの移動量を `KEYBALL_POINTER_DIVIDER` で割ることで調 -整できます。 - -各キーマップの config.h で設定できます。デフォルトは `1` で `0` 以下の値を設定 -するとコンパイルエラーになります。 - -### `void keyball_process_trackball_default()` API - -トラックボールイベントのデフォルトハンドラです。1つ目のトラックボールはマウスポ -インタに、2つ目のトラックボールはスクロール量に反映されます。 - -### `void keyball_process_trackball_user()` オーバーライド可能な関数 - -トラックボールの移動方法を独自に定義できます。トラックボールの移動量をOLEDに表 -示したい時などに `keyball_process_trackball_default` と合わせて利用できます。 - -例: - -```c -void keyball_process_trackball_user( - const trackball_delta_t *primary, - const trackball_delta_t *secondary) { - // FIXME: modify or apply deltas for your purpose. -} -``` - -## トラックボールドライバ - -Keyballに搭載されているトラックボールのドライバーです。 - -### `TRACKBALL_MAX_NUMBER` 定数 - -サポート可能な最大のトラックボール数で現在は `2` です。 - -### `TRACKBALL_SAMPLE_COUNT` - -トラックボールでは光学センサから数回に渡って読み取った平均値をポインティングデ -バイスの移動量として送信しており `TRACKBALL_SAMPLE_COUNT` はその回数を指定する -設定項目です。 - -各キーマップの config.h で設定できます。デフォルトは `10` で `0` 以下の値を設定 -するとコンパイルエラーになります。 - -設定例: - -```c -#define TRACKBALL_SAMPLE_COUNT 100 -``` - -## OLED Kit - -OLED KitはKeyballのキーマップがOLEDにロゴなどの各種情報を表示するのを容易にする -ためのライブラリです。キーマップの rules.mk に `OLED_ENABLE = yes` を追 -加すれば自動的に利用されますが、キーマップで表示内容をカスタマイズすることもで -きます。 - -表示内容をカスタマイズするには keymap.c 等に以下の2つを追加してください。 - -1. `#include "lib/oledkit/oledkit.h"` -2. `void oledkit_render_info_user(void)` を定義する - -`oledkit_render_info_user()` はプライマリ(USBケーブルが接続されている)側のキー -ボードに情報を表示する際にコールバックされる関数です。レイヤー状態などの各種情 -報を `oled_write_*()` を用いてプライマリ側のOLEDに描画することができます。 - -例: keymaps/default/keymap.c より抜粋 - -```c -#ifdef OLED_ENABLE - -void oledkit_render_info_user(void) { - const char *n; - switch (get_highest_layer(layer_state)) { - case _QWERTY: - n = PSTR("Default"); - break; - case _RAISE: - n = PSTR("Raise"); - break; - case _LOWER: - n = PSTR("Lower"); - break; - case _BALL: - n = PSTR("Adjust"); - break; - default: - n = PSTR("Undefined"); - break; - } - oled_write_P(PSTR("Layer: "), false); - oled_write_ln_P(n, false); -} - -#endif -``` - -この例は現在アクティブなレイヤー名を表示するという、OLEDの良くある利用方法で -す。 - -以下では OLED Kit の設定項目を解説します。 - -### `OLEDKIT_DISABLE` define マクロ - -OLED Kitを無効化する設定項目です。各キーマップでOLED Kitを使いたくない場合、す -なわちOLED表示を完全に自身でコントロールしたい場合に設定してください。 - -各キーマップの config.h で設定できます。 - -設定例: - -```c -#define OLEDKIT_DISABLE -``` - -### `oledkit_render_info_user()` オーバーライド可能関数 - -`oledkit_render_info_user()` 関数を定義するとプライマリ側のOLEDに表示する内容を -カスタマイズできます。デフォルトではロゴを表示するようになっています。 - -各キーマップの keymap.c で定義できます。 - -設定例は上述してあります。 - -### `oledkit_render_logo_user()` オーバーライド可能関数 - -`oledkit_render_logo_user` 関数を定義するとセカンダリ(USBケーブルが接続されてい -ない)側のOLEDに表示する内容をカスタマイズできます。デフォルトではロゴを表示する -ようになっています。ただしキーボードとしての主要な情報はほぼプライマリ側に集約 -されているため、アクティブなレイヤーやタイプしたキーなどの情報を表示することは -できません。 - -各キーマップの keymap.c で定義できます。 diff --git a/keyboards/yowkees/keyball/keyball46/info.json b/keyboards/yowkees/keyball/keyball46/info.json deleted file mode 100644 index df2efb1e918..00000000000 --- a/keyboards/yowkees/keyball/keyball46/info.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0001", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball46", - "url": "", - "maintainer": "Yowkees", - "width": 17.5, - "height": 4.5, - "rgblight": { - "driver": "ws2812" - }, - "layouts": { - "LAYOUT_right_ball": { - "layout": [ - {"label":"L00", "x":0, "y":1.18}, - {"label":"L01", "x":1, "y":1.03}, - {"label":"L02", "x":2, "y":0.35}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0.05}, - {"label":"L05", "x":5, "y":0.10}, - {"label":"R00", "x":11.5, "y":0.10}, - {"label":"R01", "x":12.5, "y":0.05}, - {"label":"R02", "x":13.5, "y":0}, - {"label":"R03", "x":14.5, "y":0.35}, - {"label":"R04", "x":15.5, "y":1.08}, - {"label":"R05", "x":16.5, "y":1.18}, - {"label":"L10", "x":0, "y":2.18}, - {"label":"L11", "x":1, "y":2.03}, - {"label":"L12", "x":2, "y":1.35}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1.05}, - {"label":"L15", "x":5, "y":1.10}, - {"label":"R10", "x":11.5, "y":1.10}, - {"label":"R11", "x":12.5, "y":1.05}, - {"label":"R12", "x":13.5, "y":1}, - {"label":"R13", "x":14.5, "y":1.35}, - {"label":"R14", "x":15.5, "y":2.03}, - {"label":"R15", "x":16.5, "y":2.18}, - {"label":"L20", "x":0, "y":3.18}, - {"label":"L21", "x":1, "y":3.03}, - {"label":"L22", "x":2, "y":2.35}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2.05}, - {"label":"R20", "x":11.5, "y":2.10}, - {"label":"R21", "x":12.5, "y":2.05}, - {"label":"R22", "x":13.5, "y":2}, - {"label":"R23", "x":14.5, "y":2.35}, - {"label":"R24", "x":15.5, "y":3.03}, - {"label":"R25", "x":16.5, "y":3.18}, - {"label":"L30", "x":0, "y":4.18}, - {"label":"L31", "x":1, "y":4.03}, - {"label":"L32", "x":2, "y":3.25}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3.05}, - {"label":"L35", "x":5.25, "y":3.10}, - {"label":"R31", "x":10.25, "y":3.20}, - {"label":"R32", "x":11.5, "y":3.10}, - {"label":"R33", "x":12.5, "y":3.05}, - {"label":"R34", "x":13.5, "y":3.05}, - {"label":"R35", "x":14.5, "y":3.05} - ] - }, - "LAYOUT_left_ball": { - "layout": [ - {"label":"L00", "x":0, "y":1.18}, - {"label":"L01", "x":1, "y":1.03}, - {"label":"L02", "x":2, "y":0.35}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0.05}, - {"label":"L05", "x":5, "y":0.10}, - {"label":"R00", "x":11.5, "y":0.10}, - {"label":"R01", "x":12.5, "y":0.05}, - {"label":"R02", "x":13.5, "y":0}, - {"label":"R03", "x":14.5, "y":0.35}, - {"label":"R04", "x":15.5, "y":1.08}, - {"label":"R05", "x":16.5, "y":1.18}, - {"label":"L10", "x":0, "y":2.18}, - {"label":"L11", "x":1, "y":2.03}, - {"label":"L12", "x":2, "y":1.35}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1.05}, - {"label":"L15", "x":5, "y":1.10}, - {"label":"R10", "x":11.5, "y":1.10}, - {"label":"R11", "x":12.5, "y":1.05}, - {"label":"R12", "x":13.5, "y":1}, - {"label":"R13", "x":14.5, "y":1.35}, - {"label":"R14", "x":15.5, "y":2.03}, - {"label":"R15", "x":16.5, "y":2.18}, - {"label":"L20", "x":0, "y":3.18}, - {"label":"L21", "x":1, "y":3.03}, - {"label":"L22", "x":2, "y":2.35}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2.05}, - {"label":"L25", "x":5, "y":2.10}, - {"label":"R21", "x":12.5, "y":2.05}, - {"label":"R22", "x":13.5, "y":2}, - {"label":"R23", "x":14.5, "y":2.35}, - {"label":"R24", "x":15.5, "y":3.03}, - {"label":"R25", "x":16.5, "y":3.18}, - {"label":"L30", "x":0, "y":4.18}, - {"label":"L31", "x":1, "y":4.03}, - {"label":"L32", "x":2, "y":3.25}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3.05}, - {"label":"R30", "x":9.25, "y":3.50}, - {"label":"R31", "x":10.25, "y":3.20}, - {"label":"R32", "x":11.5, "y":3.10}, - {"label":"R33", "x":12.5, "y":3.05}, - {"label":"R34", "x":13.5, "y":3.05}, - {"label":"R35", "x":14.5, "y":3.05} - ] - }, - "LAYOUT_double_balls": { - "layout": [ - {"label":"L00", "x":0, "y":1.18}, - {"label":"L01", "x":1, "y":1.03}, - {"label":"L02", "x":2, "y":0.35}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0.05}, - {"label":"L05", "x":5, "y":0.10}, - {"label":"R00", "x":11.5, "y":0.10}, - {"label":"R01", "x":12.5, "y":0.05}, - {"label":"R02", "x":13.5, "y":0}, - {"label":"R03", "x":14.5, "y":0.35}, - {"label":"R04", "x":15.5, "y":1.08}, - {"label":"R05", "x":16.5, "y":1.18}, - {"label":"L10", "x":0, "y":2.18}, - {"label":"L11", "x":1, "y":2.03}, - {"label":"L12", "x":2, "y":1.35}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1.05}, - {"label":"L15", "x":5, "y":1.10}, - {"label":"R10", "x":11.5, "y":1.10}, - {"label":"R11", "x":12.5, "y":1.05}, - {"label":"R12", "x":13.5, "y":1}, - {"label":"R13", "x":14.5, "y":1.35}, - {"label":"R14", "x":15.5, "y":2.03}, - {"label":"R15", "x":16.5, "y":2.18}, - {"label":"L20", "x":0, "y":3.18}, - {"label":"L21", "x":1, "y":3.03}, - {"label":"L22", "x":2, "y":2.35}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2.05}, - {"label":"L25", "x":5, "y":2.10}, - {"label":"R20", "x":11.5, "y":2.10}, - {"label":"R21", "x":12.5, "y":2.05}, - {"label":"R22", "x":13.5, "y":2}, - {"label":"R23", "x":14.5, "y":2.35}, - {"label":"R24", "x":15.5, "y":3.03}, - {"label":"R25", "x":16.5, "y":3.18}, - {"label":"L30", "x":0, "y":4.18}, - {"label":"L31", "x":1, "y":4.03}, - {"label":"L32", "x":2, "y":3.25}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3.05}, - {"label":"R31", "x":10.25, "y":3.20}, - {"label":"R32", "x":11.5, "y":3.10}, - {"label":"R33", "x":12.5, "y":3.05}, - {"label":"R34", "x":13.5, "y":3.05}, - {"label":"R35", "x":14.5, "y":3.05} - ] - }, - "LAYOUT_no_balls": { - "layout": [ - {"label":"L00", "x":0, "y":1.18}, - {"label":"L01", "x":1, "y":1.03}, - {"label":"L02", "x":2, "y":0.35}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0.05}, - {"label":"L05", "x":5, "y":0.10}, - {"label":"R00", "x":11.5, "y":0.10}, - {"label":"R01", "x":12.5, "y":0.05}, - {"label":"R02", "x":13.5, "y":0}, - {"label":"R03", "x":14.5, "y":0.35}, - {"label":"R04", "x":15.5, "y":1.08}, - {"label":"R05", "x":16.5, "y":1.18}, - {"label":"L10", "x":0, "y":2.18}, - {"label":"L11", "x":1, "y":2.03}, - {"label":"L12", "x":2, "y":1.35}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1.05}, - {"label":"L15", "x":5, "y":1.10}, - {"label":"R10", "x":11.5, "y":1.10}, - {"label":"R11", "x":12.5, "y":1.05}, - {"label":"R12", "x":13.5, "y":1}, - {"label":"R13", "x":14.5, "y":1.35}, - {"label":"R14", "x":15.5, "y":2.03}, - {"label":"R15", "x":16.5, "y":2.18}, - {"label":"L20", "x":0, "y":3.18}, - {"label":"L21", "x":1, "y":3.03}, - {"label":"L22", "x":2, "y":2.35}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2.05}, - {"label":"R21", "x":12.5, "y":2.05}, - {"label":"R22", "x":13.5, "y":2}, - {"label":"R23", "x":14.5, "y":2.35}, - {"label":"R24", "x":15.5, "y":3.03}, - {"label":"R25", "x":16.5, "y":3.18}, - {"label":"L30", "x":0, "y":4.18}, - {"label":"L31", "x":1, "y":4.03}, - {"label":"L32", "x":2, "y":3.25}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3.05}, - {"label":"L35", "x":5.25, "y":3.10}, - {"label":"R30", "x":9.25, "y":3.50}, - {"label":"R31", "x":10.25, "y":3.20}, - {"label":"R32", "x":11.5, "y":3.10}, - {"label":"R33", "x":12.5, "y":3.05}, - {"label":"R34", "x":13.5, "y":3.05}, - {"label":"R35", "x":14.5, "y":3.05} - ] - } - } -} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.c b/keyboards/yowkees/keyball/keyball46/keyball46.c deleted file mode 100644 index 14283834c60..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keyball46.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "lib/keyball/keyball.h" - -////////////////////////////////////////////////////////////////////////////// - -// clang-format off -matrix_row_t matrix_mask[MATRIX_ROWS] = { - 0b0111111, - 0b0111111, - 0b0011111, - 0b0011111, - - 0b0111111, - 0b0111111, - 0b0011111, - 0b0011111, -}; -// clang-format on - -////////////////////////////////////////////////////////////////////////////// - -static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { - extern void matrix_io_delay(void); - setPinInputHigh(in_pin); - setPinOutput(out_pin); - writePinLow(out_pin); - wait_us(1); - uint8_t pin_state = readPin(in_pin); - setPinInputHigh(out_pin); - matrix_io_delay(); - return pin_state; -} - -bool is_keyboard_left(void) { - return !peek_matrix_intersection(keyball.this_have_ball ? F7 : F6, B5); -} - -////////////////////////////////////////////////////////////////////////////// - -void keyball_on_adjust_layout(keyball_adjust_t v) { - if (v == KEYBALL_ADJUST_PRIMARY) { - // adjust matrix mask - bool is_left = is_keyboard_left(); - matrix_mask[(is_left ? 2 : 6) + (keyball.this_have_ball ? 0 : 1)] = 0b0111111; - matrix_mask[(is_left ? 6 : 2) + (keyball.that_have_ball ? 0 : 1)] = 0b0111111; - } -} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.h b/keyboards/yowkees/keyball/keyball46/keyball46.h deleted file mode 100644 index df443475fb7..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keyball46.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include "quantum.h" -#include "lib/keyball/keyball.h" - -// clang-format off - -#define LAYOUT_right_ball( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, KC_NO}, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, KC_NO } \ - } - -#define LAYOUT_left_ball( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, KC_NO }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, KC_NO }, \ - { R35, R34, R33, R32, R31, R30 } \ - } - -#define LAYOUT_double_balls( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, KC_NO }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, KC_NO } \ - } - -#define LAYOUT_no_balls( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, KC_NO }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, KC_NO }, \ - { R35, R34, R33, R32, R31, R30 } \ - } - -#define LAYOUT_universal( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 } \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball diff --git a/keyboards/yowkees/keyball/keyball46/keyball46.json b/keyboards/yowkees/keyball/keyball46/keyball46.json deleted file mode 100644 index aed56b9c0a9..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keyball46.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Keyball46", - "vendorId": "0x5957", - "productId": "0x0001", - "lighting": "qmk_rgblight", - "matrix": { "rows": 8, "cols": 6 }, - "layouts": { - "keymap": [ - [{"x":2,"c":"#aaaaaa"},"0,2",{"x":8.25},"4,3"], - [{"y":-0.87,"x":1},"0,1",{"x":1},"0,3",{"x":6.25},"4,4",{"x":1},"4,2"], - [{"y":-0.88,"x":4},"0,4",{"x":4.25},"4,5"], - [{"y":-0.87},"0,0",{"x":12.25},"4,1",{"c":"#777777"},"4,0"], - [{"y":-0.88,"x":5,"c":"#aaaaaa","h":1.5},"0,5"], - [{"y":-0.5,"x":2},"1,2",{"x":8.25},"5,3"], - [{"y":-0.87,"x":1},"1,1",{"x":1},"1,3",{"x":6.25},"5,4",{"x":1},"5,2"], - [{"y":-0.88,"x":4},"1,4",{"x":4.25},"5,5"], - [{"y":-0.87},"1,0",{"x":12.25},"5,1",{"c":"#777777"},"5,0"], - [{"y":-0.88,"x":6.25},"2,5",{"x":0.75},"7,5"], - [{"y":-0.5,"x":2,"c":"#aaaaaa"},"2,2",{"x":2,"h":1.5},"1,5",{"x":5.25},"6,3"], - [{"y":-0.87,"x":1},"2,1",{"x":1},"2,3",{"x":6.25},"6,4",{"x":1},"6,2"], - [{"y":-0.88,"x":4},"2,4",{"x":4.25},"6,5"], - [{"y":-0.87},"2,0",{"x":12.25},"6,1",{"c":"#777777"},"6,0"], - [{"y":-0.25,"x":1},"3,1",{"x":10.25},"7,2"], - [{"y":-0.75},"3,0",{"x":12.25},"7,1","7,0"], - [{"y":-0.88,"x":2.5},"3,2",{"x":7.25},"7,3"], - [{"r":10,"y":-1.7,"x":4.3},"3,3"], - [{"r":20,"rx":6.5,"ry":4.25,"y":0.05,"x":-1.6},"3,4"], - [{"r":-60,"y":-1.4,"x":-1.1,"w":1.25},"3,5"], - [{"r":-10,"rx":0,"ry":0,"y":5.3,"x":8.75},"7,4"] - ] - } -} diff --git a/keyboards/yowkees/keyball/keyball46/keyball46_left.json b/keyboards/yowkees/keyball/keyball46/keyball46_left.json deleted file mode 100644 index 2835e61318a..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keyball46_left.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Keyball46_Left", - "vendorId": "0x5957", - "productId": "0x0002", - "lighting": "qmk_rgblight", - "matrix": { "rows": 8, "cols": 6 }, - "layouts": { - "keymap": [ - [{"y":1,"x":2},"0,2",{"x":9.75},"4,2"], - [{"y":-0.87,"x":1},"0,1",{"x":1},"0,3",{"x":7.75},"4,3",{"x":1},"4,1"], - [{"y":-0.88,"x":4},"0,4","0,5",{"x":3.75,"c":"#aaaaaa","h":1.5},"4,5",{"c":"#cccccc"},"4,4"], - [{"y":-0.87},"0,0",{"x":13.75},"4,0"], - [{"y":-0.38,"x":2},"1,2",{"x":9.75},"5,2"], - [{"y":-0.87,"x":1},"1,1",{"x":1},"1,3",{"x":7.75},"5,3",{"x":1},"5,1"], - [{"y":-0.88,"x":4},"1,4","1,5",{"x":0.25,"c":"#aaaaaa"},"3,5",{"x":1.25},"6,5",{"x":1.25,"c":"#cccccc"},"5,4"], - [{"y":-0.87},"1,0",{"x":13.75},"5,0"], - [{"y":-0.63,"x":9.75,"c":"#aaaaaa","h":1.5},"5,5"], - [{"y":-0.75,"x":2,"c":"#cccccc"},"2,2",{"x":9.75},"6,2"], - [{"y":-0.87,"x":1},"2,1",{"x":1},"2,3",{"x":7.75},"6,3",{"x":1},"6,1"], - [{"y":-0.88,"x":4},"2,4","2,5",{"x":4.75},"6,4"], - [{"y":-0.87},"2,0",{"x":13.75},"6,0"], - [{"y":-0.38,"x":2},"3,2"], - [{"y":-0.87,"x":1},"3,1",{"x":11.75},"7,1"], - [{"y":-0.75},"3,0",{"x":13.75},"7,0"], - [{"y":-0.88,"x":3.5,"c":"#aaaaaa"},"3,3",{"x":7.75},"7,2"], - [{"r":10,"rx":6.5,"ry":4.25,"y":0.55,"x":-1.65},"3,4"], - [{"r":-30,"rx":13,"y":-1.05,"x":-4.45,"h":1.25},"7,5"], - [{"r":-20,"y":-0.2,"x":-3.3},"7,4"], - [{"r":-10,"rx":0,"ry":0,"y":6.55,"x":10},"7,3"] - ] - } -} diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h deleted file mode 100644 index e44b0be8553..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/default/config.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -#undef PRODUCT_ID -#define PRODUCT_ID 0x0005 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c deleted file mode 100644 index 98b1bc6192d..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/default/keymap.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2021 @Yowkees - -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 . -*/ - -#include QMK_KEYBOARD_H - -enum keymap_layers { - _QWERTY, - _LOWER, - _RAISE, - _BALL, -}; - -///////////////////////////////////////////////////////////////////////////// -// Special key codes for shorthand - -// clang-format off - -// layer -#define KC_L_SPC LT(_LOWER, KC_SPC) -#define KC_R_ENT LT(_RAISE, KC_ENT) - -// shift_t -#define KC_S_EN LSFT_T(KC_LNG2) - -// original -#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust -#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock -#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space -#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete -#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space -#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete -// clang-format on - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_right_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, KC_SCLN, - //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, - //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| - KC_LCTL,KC_AL_CP, KC_G_BS, KC_L_SPC, KC_S_EN, KC_A_JA, KC_R_ENT,KC_G_DEL, KC_EXLM, KC_TAB, KC_PSCR - //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_RAISE] = LAYOUT_right_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_BSLS, KC_7, KC_8, KC_9, KC_PLUS, KC_LPRN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_RPRN, _______, KC_LEFT, KC_UP, KC_RGHT, _______, KC_F12, - //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| - KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, _______, _______, KC_DOWN, _______, _______, _______, - //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| - _______, KC_0, KC_ENT, KC_A_DEL, KC_SPC, _______, _______, _______, _______, _______, _______ - //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_LOWER] = LAYOUT_right_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LPRN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_HASH, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT, KC_RPRN, _______, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, - //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| - KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, _______, _______, KC_PGDN, _______, _______, _______, - //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| - _______, KC_PERC, _______, _______, _______, _______, KC_A_BS, _______, _______, _______, _______ - //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_BALL] = LAYOUT_right_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| - RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, - //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| - QK_BOOT, EE_CLR , _______, _______, _______, _______, _______,SCRL_DVD, SCRL_DVI, _______, KBC_RST - //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == _BALL); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h deleted file mode 100644 index dc31a732168..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/develop/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -// PMW3360 performance counter. Require CONSOLE_ENABLE too. -//#define DEBUG_PMW3360_SCAN_RATE - -// Disable mouse report rate throttling. -//#define KEYBALL_REPORTMOUSE_INTERVAL 0 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c deleted file mode 100644 index 6b70405d514..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/develop/keymap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_universal( - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_LBRC , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_RBRC , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_Z , KC_X , KC_C , KC_V , KC_B , _______ , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_BSLS , - KC_LCTL , KC_APP , MO(1) , SCRL_MO ,KC_MS_BTN1, KC_ENT , _______ , KC_SPC , KC_RALT , MO(1) , KC_RGUI , KC_RSFT - ), - - [1] = LAYOUT_universal( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , - QK_BOOT , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , SCRL_DVD , SCRL_DVI , _______ , KBC_RST - ), -}; -// clang-format on - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif - -void keyboard_post_init_user(void) { -#if defined(DEBUG_PMW3360_SCAN_RATE) && defined(CONSOLE_ENABLE) - debug_enable = true; -#endif -} diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h deleted file mode 100644 index c7088883686..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c deleted file mode 100644 index 2ed175df561..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test/keymap.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_right_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, KC_SCLN, - //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, - //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ESC, KC_ENT, KC_DEL, KC_EXLM, KC_TAB, KC_RSFT - //`--------+--------' `--------' `--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h deleted file mode 100644 index bc3a2377560..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif - -#undef PRODUCT_ID -#define PRODUCT_ID 0x0003 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c deleted file mode 100644 index 34366e2da93..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/keymap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Test keymap for double balls configuration. - [0] = LAYOUT_double_balls( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| - KC_ESC, KC_GRV, KC_LALT, KC_BSPC, KC_SPC, KC_ENT, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS - //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Both/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h deleted file mode 100644 index a17dff49a85..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif - -#undef PRODUCT_ID -#define PRODUCT_ID 0x0002 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c deleted file mode 100644 index 7e2d315b365..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/keymap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2021 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Test keymap for left ball configuration. - [0] = LAYOUT_left_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, - //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| - KC_ESC, KC_GRV, KC_LALT, KC_BSPC, KC_SPC, KC_ESC, KC_LGUI, KC_ENT, KC_DEL, KC_TAB, KC_RSFT - //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/test_Left/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h deleted file mode 100644 index eedf25f4283..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/config.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -//# 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 - -#undef PRODUCT_ID -#define PRODUCT_ID 0x0003 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c deleted file mode 100644 index 0c5f3621d4b..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/keymap.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2021 @Yowkees - -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 . -*/ - -#include QMK_KEYBOARD_H - -enum keymap_layers { - _QWERTY, - _LOWER, - _RAISE, - _BALL, -}; - -///////////////////////////////////////////////////////////////////////////// -// Special key codes for shorthand - -// clang-format off - -// layer -#define KC_L_SPC LT(_LOWER, KC_SPC) -#define KC_R_ENT LT(_RAISE, KC_ENT) - -// shift_t -#define KC_S_EN LSFT_T(KC_LNG2) - -// original -#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust -#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock -#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space -#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete -#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space -#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete -// clang-format on - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_double_balls( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| - KC_ESC, KC_GRV, KC_LALT, KC_BSPC,KC_L_SPC, KC_R_ENT, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS - //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_RAISE] = LAYOUT_double_balls( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_HASH, KC_7, KC_8, KC_9, KC_PLUS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_AT, KC_EXLM, KC_AMPR, KC_PIPE, KC_PERC, KC_F12, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, KC_RSFT, - //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| - KC_ESC, KC_GRV, KC_0, KC_LNG2 ,KC_A_DEL, _______, _______, KC_LPRN, KC_RPRN, KC_BSLS - //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_LOWER] = LAYOUT_double_balls( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, _______, _______, KC_DOWN, _______, _______, _______, _______, KC_PGDN, _______, _______, KC_RSFT, - //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| - KC_ESC, KC_GRV, KC_LALT, _______, _______, KC_A_BS,KC_LNG1 , KC_LPRN, KC_RPRN, KC_BSLS - //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - - [_BALL] = LAYOUT_double_balls( - //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, - //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| - QK_BOOT, EE_CLR , _______, _______, _______, _______,SCRL_DVD, SCRL_DVI, _______, KBC_RST - //`--------+--------+--------' `--------+--------' `--------+--------' `--------+--------+--------' - ), - -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == _BALL); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk deleted file mode 100644 index d80df3fa49a..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Both/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -VIA_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h deleted file mode 100644 index 30a67de66bb..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/config.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -//# 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 - -#undef PRODUCT_ID -#define PRODUCT_ID 0x0002 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c deleted file mode 100644 index e32244bbad3..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/keymap.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2021 @Yowkees - -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 . -*/ - -#include QMK_KEYBOARD_H - -enum keymap_layers { - _QWERTY, - _LOWER, - _RAISE, - _BALL, -}; - -///////////////////////////////////////////////////////////////////////////// -// Special key codes for shorthand - -// clang-format off - -// layer -#define KC_L_SPC LT(_LOWER, KC_SPC) -#define KC_R_ENT LT(_RAISE, KC_ENT) - -// shift_t -#define KC_S_EN LSFT_T(KC_LNG2) - -// original -#define KC_A_JA LT(_BALL, KC_LNG1) // cmd or adjust -#define KC_AL_CP MT(MOD_LALT, KC_CAPS) // alt or caps lock -#define KC_G_BS MT(MOD_LGUI, KC_BSPC) // command or back space -#define KC_G_DEL MT(MOD_LGUI, KC_DEL) // command or delete -#define KC_A_BS LT(_BALL, KC_BSPC) // adjust or back space -#define KC_A_DEL LT(_BALL, KC_DEL) // adjust or delete -// clang-format on - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_left_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_MINS, - //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| - KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| - KC_LCTL, KC_PSCR,KC_AL_CP, KC_G_BS, KC_SPC, KC_A_JA, KC_S_EN, KC_R_ENT, KC_G_DEL, KC_EXLM, KC_TAB - //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' - ), - - [_RAISE] = LAYOUT_left_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - _______, KC_BSLS, KC_7, KC_8, KC_9, KC_PLUS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_RPRN, KC_LEFT, KC_UP, KC_RGHT, _______, KC_F12, - //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| - _______, KC_SLSH, KC_1, KC_2, KC_3, KC_EQL, _______, KC_DOWN, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| - _______, _______, KC_0, KC_ENT,KC_A_DEL, KC_SPC, _______, _______, _______, _______, _______ - //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' - ), - - [_LOWER] = LAYOUT_left_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_HASH, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT, KC_RPRN, KC_BTN1, KC_PGUP, KC_BTN2, KC_BTN3, KC_F12, - //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| - _______, KC_GRV, KC_DQT, KC_QUOT, KC_CIRC, KC_TILD, _______, KC_PGDN, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| - _______, _______, KC_0, _______, _______, _______, _______, KC_A_BS, _______, _______, _______ - //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' - ), - - [_BALL] = LAYOUT_left_ball( - //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| - RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, - //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| - QK_BOOT, EE_CLR , _______, _______, _______, _______, _______, SCRL_DVD, SCRL_DVI, _______, KBC_RST - //`--------+--------+--------' `--------+--------' `--------+--------' `--------' `--------' `--------+--------' - ), - -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == _BALL); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk b/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk deleted file mode 100644 index d80df3fa49a..00000000000 --- a/keyboards/yowkees/keyball/keyball46/keymaps/via_Left/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -VIA_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball46/readme.md b/keyboards/yowkees/keyball/keyball46/readme.md deleted file mode 100644 index 55e35184d8b..00000000000 --- a/keyboards/yowkees/keyball/keyball46/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# Keyball46 - -![Keyball46](../../../../keyball46/doc/rev1/images/yw001.jpg) - -A split keyboard with 4x6 vertically staggered keys and 34mm track ball. - -* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: Keyball46 PCB, ProMicro -* Hardware Availability: - Unavailable - * ~~[BOOTH](https://yowkees.booth.pm/)~~ - -Make example for this keyboard (after setting up your build environment): - - make keyball/keyball46:default - -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). - -## Special keycodes - -See [Special Keycode](../lib/keyball/keycodes.md) file. - -## Changes - -* Keyball46 firmware V2 has some incompatibles with V1. See [document](./docs/diff_from_v1.md) for details. diff --git a/keyboards/yowkees/keyball/keyball46/rules.mk b/keyboards/yowkees/keyball/keyball46/rules.mk deleted file mode 100644 index 7ed03f4f771..00000000000 --- a/keyboards/yowkees/keyball/keyball46/rules.mk +++ /dev/null @@ -1,49 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes - -# Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -AUDIO_ENABLE = no # Audio output - -# Keyball46 is split keyboard. -SPLIT_KEYBOARD = yes - -# Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += drivers/pmw3360/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate - -# This is unnecessary for processing KC_MS_BTN*. -MOUSEKEY_ENABLE = no - -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. -SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. - -# Include common library -SRC += lib/keyball/keyball.c - -# Disable other features to squeeze firmware size -SPACE_CADET_ENABLE = no -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/lib/keyball/keyball.c b/keyboards/yowkees/keyball/lib/keyball/keyball.c index 707d9777e25..e544b3bcb73 100644 --- a/keyboards/yowkees/keyball/lib/keyball/keyball.c +++ b/keyboards/yowkees/keyball/lib/keyball/keyball.c @@ -159,19 +159,12 @@ void pointing_device_init_kb(void) { __attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { -#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 r->x = clip2int8(m->y); r->y = clip2int8(m->x); if (is_left) { r->x = -r->x; r->y = -r->y; } -#elif KEYBALL_MODEL == 46 - r->x = clip2int8(m->x); - r->y = -clip2int8(m->y); -#else -# error("unknown Keyball model") -#endif // clear motion m->x = 0; m->y = 0; @@ -184,19 +177,12 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio int16_t y = divmod16(&m->y, div); // apply to mouse report. -#if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 r->h = clip2int8(y); r->v = -clip2int8(x); if (is_left) { r->h = -r->h; r->v = -r->v; } -#elif KEYBALL_MODEL == 46 - r->h = clip2int8(x); - r->v = clip2int8(y); -#else -# error("unknown Keyball model") -#endif // Scroll snapping #if KEYBALL_SCROLLSNAP_ENABLE == 1 diff --git a/keyboards/yowkees/keyball/one47/config.h b/keyboards/yowkees/keyball/one47/config.h deleted file mode 100644 index 696ed8cafee..00000000000 --- a/keyboards/yowkees/keyball/one47/config.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -// Key matrix parameters (KeyballONE46 is duplex matrix) -#define MATRIX_ROWS (4) // split keyboard -#define MATRIX_COLS (6 * 2) // duplex matrix -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D2, D4, C6, D7, E6, B4 } -#define MATRIX_MASKED -#define DEBOUNCE 5 - -// RGB LED settings -#define WS2812_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 20 -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 255 // limitated for power consumption -# endif -# ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 17 -# endif -# ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 17 -# endif -# ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -# endif -#endif - -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" -# define OLED_FONT_START 32 -# define OLED_FONT_END 195 -#endif - -#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) -# define LAYER_STATE_8BIT -#endif - -// To squeeze firmware size -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/one47/info.json b/keyboards/yowkees/keyball/one47/info.json deleted file mode 100644 index 2dc4e864733..00000000000 --- a/keyboards/yowkees/keyball/one47/info.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0300", - "device_version": "0.1.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "KeyballONE47", - "rgblight": { - "driver": "ws2812" - }, - "layouts": { - "LAYOUT_right_ball": { - "layout": [ - { "label": "K00", "x": 0, "y": 0 }, - { "label": "K01", "x": 1, "y": 0 }, - { "label": "K02", "x": 2, "y": 0 }, - { "label": "K03", "x": 3, "y": 0 }, - { "label": "K04", "x": 4, "y": 0 }, - { "label": "K05", "x": 5, "y": 0 }, - { "label": "K06", "x": 8, "y": 0 }, - { "label": "K07", "x": 9, "y": 0 }, - { "label": "K08", "x":10, "y": 0 }, - { "label": "K09", "x":11, "y": 0 }, - { "label": "K0A", "x":12, "y": 0 }, - { "label": "K0B", "x":13, "y": 0 }, - - { "label": "K10", "x": 0, "y": 1 }, - { "label": "K11", "x": 1, "y": 1 }, - { "label": "K12", "x": 2, "y": 1 }, - { "label": "K13", "x": 3, "y": 1 }, - { "label": "K14", "x": 4, "y": 1 }, - { "label": "K15", "x": 5, "y": 1 }, - { "label": "K16", "x": 8, "y": 1 }, - { "label": "K17", "x": 9, "y": 1 }, - { "label": "K18", "x":10, "y": 1 }, - { "label": "K19", "x":11, "y": 1 }, - { "label": "K1A", "x":12, "y": 1 }, - { "label": "K1B", "x":13, "y": 1 }, - - { "label": "K20", "x": 0, "y": 2 }, - { "label": "K21", "x": 1, "y": 2 }, - { "label": "K22", "x": 2, "y": 2 }, - { "label": "K23", "x": 3, "y": 2 }, - { "label": "K24", "x": 4, "y": 2 }, - { "label": "K25", "x": 5, "y": 2 }, - { "label": "K35", "x": 6, "y": 2 }, - { "label": "K38", "x": 7, "y": 2 }, - { "label": "K26", "x": 8, "y": 2 }, - { "label": "K27", "x": 9, "y": 2 }, - { "label": "K28", "x":10, "y": 2 }, - { "label": "K29", "x":11, "y": 2 }, - { "label": "K2A", "x":12, "y": 2 }, - { "label": "K2B", "x":13, "y": 2 }, - - { "label": "K30", "x": 1, "y": 3 }, - { "label": "K31", "x": 2, "y": 3 }, - { "label": "K32", "x": 3, "y": 3 }, - { "label": "K33", "x": 4, "y": 3 }, - { "label": "K34", "x": 5, "y": 3 }, - { "label": "K36", "x": 6, "y": 3 }, - { "label": "K37", "x": 7, "y": 3 }, - { "label": "K39", "x": 8, "y": 3 }, - { "label": "K3A", "x":12, "y": 3 } - ] - } - } -} diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/config.h b/keyboards/yowkees/keyball/one47/keymaps/default/config.h deleted file mode 100644 index a05a1cc5b9d..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/default/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -#define TAP_CODE_DELAY 5 diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c deleted file mode 100644 index 94102e524af..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/default/keymap.c +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_right_ball( - KC_DEL , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_INT3 , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , - MO(1) , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_RBRC , KC_NUHS, KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_LCTL , KC_LALT ,KC_LGUI ,LT(1,KC_LNG2),LT(2,KC_SPC),LT(3,KC_LNG1), KC_BSPC, KC_ENT , KC_RALT - ), - - [1] = LAYOUT_right_ball( - S(KC_DEL), S(KC_Q) , S(KC_W) , S(KC_E) , S(KC_R) , S(KC_T) , S(KC_Y) , S(KC_U) , S(KC_I) , S(KC_O) , S(KC_P) ,S(KC_INT3), - S(KC_TAB), S(KC_A) , S(KC_S) , S(KC_D) , S(KC_F) , S(KC_G) , S(KC_H) , S(KC_J) , S(KC_K) , S(KC_L) , KC_QUOT , S(KC_2) , - _______ , S(KC_Z) , S(KC_X) , S(KC_C) , S(KC_V) , S(KC_B) ,S(KC_RBRC), S(KC_NUHS),S(KC_N) , S(KC_M) ,S(KC_COMM), S(KC_DOT),S(KC_SLSH),S(KC_RSFT), - S(KC_LCTL),S(KC_LALT),S(KC_LGUI), _______ , _______ , _______ , _______ , _______ , S(KC_RALT) - ), - - [2] = LAYOUT_right_ball( - SSNP_FRE , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , - SSNP_VRT , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - SSNP_HOR , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , - _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ - ), - - [3] = LAYOUT_right_ball( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , QK_BOOT , EE_CLR , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ - ), -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == 3); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/config.h b/keyboards/yowkees/keyball/one47/keymaps/develop/config.h deleted file mode 100644 index 7c18d0969f7..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/develop/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c deleted file mode 100644 index d3759ee75c1..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/develop/keymap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_right_ball( - KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_TAB , KC_BSPC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , - KC_MS_BTN2, KC_ESC , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RGUI - ), - - [1] = LAYOUT_right_ball( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , QK_BOOT , EE_CLR , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ - ), -}; -// clang-format on - -void keyboard_post_init_user(void) { -#ifdef CONSOLE_ENABLE - debug_enable = true; -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/config.h b/keyboards/yowkees/keyball/one47/keymaps/test/config.h deleted file mode 100644 index 8aa86c31c1c..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/test/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -# undef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 63 -#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c b/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c deleted file mode 100644 index 965dd0a1441..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/test/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_right_ball( - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , - KC_EQL , KC_BSLS , KC_GRV , KC_LALT , KC_BSPC , KC_LGUI , KC_APP , KC_SPC , KC_ESC - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk b/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/one47/keymaps/test/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/one47/one47.c b/keyboards/yowkees/keyball/one47/one47.c deleted file mode 100644 index ee028c45d4a..00000000000 --- a/keyboards/yowkees/keyball/one47/one47.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "lib/keyball/keyball.h" -#include "lib/duplexmatrix/duplexmatrix.h" - -////////////////////////////////////////////////////////////////////////////// - -// clang-format off - -const matrix_row_t matrix_mask[MATRIX_ROWS] = { - 0b111111111111, - 0b111111111111, - 0b111111111111, - 0b011111111111, -}; - -const uint8_t row3_order_data[] = { - 0, 1, 2, 3, 9, 8, 7, 6, 5, 4, 10 -}; - -////////////////////////////////////////////////////////////////////////////// - -static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { - extern void matrix_io_delay(void); - setPinInputHigh(in_pin); - setPinOutput(out_pin); - writePinLow(out_pin); - wait_us(1); - uint8_t pin_state = readPin(in_pin); - setPinInputHigh(out_pin); - matrix_io_delay(); - return pin_state; -} - -static uint16_t bitrev12(uint16_t bits) { - return bitrev16(bits) >> 4; -} - -static uint16_t row3_order(uint16_t bits) { - uint16_t r = 0; - for (int i = 0; i < sizeof(row3_order_data) / sizeof(row3_order_data[0]); i++) { - uint8_t shift = row3_order_data[i]; - r |= ((bits & (1 << shift)) >> shift) << i; - } - return r; -} - -static bool isLeftBall = false; - -////////////////////////////////////////////////////////////////////////////// - -// the ball on left side. -bool is_keyboard_left(void) { - return isLeftBall; -} - -void keyboard_pre_init_kb(void) { - isLeftBall = !peek_matrix_intersection(B4, F7); - keyboard_pre_init_user(); -} - -void duplex_scan_raw_post_kb(matrix_row_t out_matrix[]) { - if (isLeftBall) { - out_matrix[0] = bitrev12(out_matrix[0]); - out_matrix[1] = bitrev12(out_matrix[1]); - out_matrix[2] = bitrev12(out_matrix[2]); - out_matrix[3] = row3_order(out_matrix[3]); - } -} - -void keyball_on_adjust_layout(keyball_adjust_t v) { -#ifdef VIA_ENABLE - uint32_t curr = via_get_layout_options(); - uint32_t next = (curr & ~0x01) | (isLeftBall ? 0x01 : 0x00); - if (next != curr) { - via_set_layout_options(next); - } -#endif -} diff --git a/keyboards/yowkees/keyball/one47/one47.h b/keyboards/yowkees/keyball/one47/one47.h deleted file mode 100644 index e1480a864af..00000000000 --- a/keyboards/yowkees/keyball/one47/one47.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include "quantum.h" -#include "lib/keyball/keyball.h" - -// clang-format off - -#define LAYOUT_right_ball( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K35, K38, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K36, K37, K39, K3A \ - ) \ - { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO } \ - } - -#define LAYOUT_left_ball( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K35, K38, K26, K27, K28, K29, K2A, K2B, \ - K3A, K34, K36, K37, K39, K33, K32, K31, K30 \ - ) \ - { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO } \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball diff --git a/keyboards/yowkees/keyball/one47/readme.md b/keyboards/yowkees/keyball/one47/readme.md deleted file mode 100644 index 4626c81cb50..00000000000 --- a/keyboards/yowkees/keyball/one47/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -# KeyballONE47 - -![KeyballONE47]() - -A split keyboard with 47 vertically staggered keys and 34mm track ball. - -* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: KeyballONE47 PCB, ProMicro -* Hardware Availability: - Unavailable - -Make example for this keyboard (after setting up your build environment): - - make keyball/one47:test - -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). - -## Special keycodes - -See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/one47/rules.mk b/keyboards/yowkees/keyball/one47/rules.mk deleted file mode 100644 index bea0565dcc1..00000000000 --- a/keyboards/yowkees/keyball/one47/rules.mk +++ /dev/null @@ -1,53 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes - -# Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -AUDIO_ENABLE = no # Audio output - -# Duplex matrix. -CUSTOM_MATRIX = lite -SRC += lib/duplexmatrix/duplexmatrix.c - -# One47 is non-split keyboard. -SPLIT_KEYBOARD = no - -# Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += drivers/pmw3360/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate - -# This is unnecessary for processing KC_MS_BTN*. -MOUSEKEY_ENABLE = no - -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. -SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. - -# Include common library -SRC += lib/keyball/keyball.c - -# Disable other features to squeeze firmware size -SPACE_CADET_ENABLE = no -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no From fde5c96b81758a11aafa7634b897b8229a5181a5 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 14:47:34 +0200 Subject: [PATCH 20/22] restore .gitignore --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 99fcbabe80b..20e706a2b59 100644 --- a/.gitignore +++ b/.gitignore @@ -56,8 +56,6 @@ quantum/version.h .idea/ .project .settings/ -.vscode/ -*.sln # ? .dep From d718bf47978be682fbc085f2cc8932b9bbecea7f Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 15:04:36 +0200 Subject: [PATCH 21/22] only default keymap --- .../keyball39/keymaps/develop/config.h | 33 ----------- .../keyball39/keymaps/develop/keymap.c | 51 ---------------- .../keyball39/keymaps/develop/rules.mk | 6 -- .../keyball/keyball39/keymaps/test/config.h | 25 -------- .../keyball/keyball39/keymaps/test/keymap.c | 51 ---------------- .../keyball/keyball39/keymaps/test/rules.mk | 6 -- .../keyball44/keymaps/develop/config.h | 33 ----------- .../keyball44/keymaps/develop/keymap.c | 51 ---------------- .../keyball44/keymaps/develop/rules.mk | 6 -- .../keyball/keyball44/keymaps/test/config.h | 25 -------- .../keyball/keyball44/keymaps/test/keymap.c | 51 ---------------- .../keyball/keyball44/keymaps/test/rules.mk | 6 -- .../keyball61/keymaps/develop/config.h | 33 ----------- .../keyball61/keymaps/develop/keymap.c | 59 ------------------- .../keyball61/keymaps/develop/rules.mk | 6 -- .../keyball/keyball61/keymaps/test/config.h | 25 -------- .../keyball/keyball61/keymaps/test/keymap.c | 52 ---------------- .../keyball/keyball61/keymaps/test/rules.mk | 3 - 18 files changed, 522 deletions(-) delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/config.h delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/config.h delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/config.h delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h deleted file mode 100644 index 7c18d0969f7..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/develop/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c deleted file mode 100644 index dca2006c475..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/develop/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_universal( - 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_LCTL , KC_LGUI , KC_LALT , SCRL_MO , KC_SPC ,LT(1,KC_TAB),LT(1,KC_BSPC), KC_ENT , SCRL_MO , KC_RALT , KC_RGUI , KC_RSFT - ), - - [1] = LAYOUT_universal( - RGB_TOG , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , RGB_M_K , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , - QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT - ), -}; -// clang-format on - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h deleted file mode 100644 index b8849eed0cc..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/test/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c deleted file mode 100644 index beb81aa4574..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/test/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - 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_LCTL , KC_LGUI , KC_LALT , KC_ESC , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_ESC , KC_RALT , KC_RGUI , KC_RSFT - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/test/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h deleted file mode 100644 index 7c18d0969f7..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/develop/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c deleted file mode 100644 index 9a32b9d4855..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/develop/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_universal( - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , - KC_LGUI , KC_LALT , SCRL_MO , KC_SPC , LT(1,KC_TAB), LT(1,KC_BSPC), KC_ENT , SCRL_MO , KC_RALT , KC_RGUI - ), - - [1] = LAYOUT_universal( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , _______ , KBC_SAVE , - QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT - ), -}; -// clang-format on - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h deleted file mode 100644 index b8849eed0cc..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/test/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c deleted file mode 100644 index 194c6d837c7..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/test/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_DEL , KC_BSPC , KC_ENT , KC_RALT , KC_RGUI , KC_RCTL - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/test/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h deleted file mode 100644 index 7c18d0969f7..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/develop/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c deleted file mode 100644 index 34e1400dcdb..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/develop/keymap.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for development - [0] = LAYOUT_universal( - 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SCRL_TO , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , - KC_LGUI , KC_APP , KC_HOME , KC_LALT , SCRL_MO ,KC_MS_BTN1, MO(1) , MO(1) , KC_SPC , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI - ), - - [1] = LAYOUT_universal( - RGB_TOG , _______ , _______ , _______ , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , _______ , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , _______ , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , KBC_RST , - _______ , _______ , SCRL_DVD , SCRL_DVI , SCRL_MO , SCRL_TO , EE_CLR , EE_CLR , _______ , _______ , _______ , _______ , _______ , _______ , - QK_BOOT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT - ), -}; -// clang-format on - -void keyboard_post_init_user(void) { -#ifdef CONSOLE_ENABLE - debug_enable = true; -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk deleted file mode 100644 index 98615de5f51..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/develop/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes - -# for debug -#CONSOLE_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h b/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h deleted file mode 100644 index 60cd183d54c..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/test/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_RGB_TEST // required for LED test -#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c b/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c deleted file mode 100644 index 5f1f8c673a5..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/test/keymap.c +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_universal( - 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_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC , KC_RBRC , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , - KC_LGUI , KC_APP , KC_HOME , KC_END , KC_LALT , KC_SPC , KC_TAB , KC_BSPC , KC_ENT , KC_RALT , KC_PGUP , KC_PGDN , KC_BSLS , KC_RGUI - ), -}; -// clang-format on - -void keyboard_post_init_user() { -#ifdef RGBLIGHT_ENABLE - // Force RGB lights to show test animation without writing EEPROM. - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -#endif -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk b/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball61/keymaps/test/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes From 4813a622ce4804968ea2158585011c7b15b18954 Mon Sep 17 00:00:00 2001 From: rzrjck Date: Thu, 29 May 2025 15:08:56 +0200 Subject: [PATCH 22/22] remoce keyball39,44 (can't test it) --- keyboards/yowkees/keyball/keyball39/config.h | 79 --------------- keyboards/yowkees/keyball/keyball39/info.json | 63 ------------ .../yowkees/keyball/keyball39/keyball39.c | 46 --------- .../yowkees/keyball/keyball39/keyball39.h | 97 ------------------- .../keyball39/keymaps/default/config.h | 39 -------- .../keyball39/keymaps/default/keymap.c | 71 -------------- .../keyball39/keymaps/default/rules.mk | 3 - keyboards/yowkees/keyball/keyball39/readme.md | 21 ---- keyboards/yowkees/keyball/keyball39/rules.mk | 49 ---------- keyboards/yowkees/keyball/keyball44/config.h | 79 --------------- keyboards/yowkees/keyball/keyball44/info.json | 67 ------------- .../yowkees/keyball/keyball44/keyball44.c | 46 --------- .../yowkees/keyball/keyball44/keyball44.h | 97 ------------------- .../keyball44/keymaps/default/config.h | 39 -------- .../keyball44/keymaps/default/keymap.c | 71 -------------- .../keyball44/keymaps/default/rules.mk | 3 - keyboards/yowkees/keyball/keyball44/readme.md | 20 ---- keyboards/yowkees/keyball/keyball44/rules.mk | 49 ---------- 18 files changed, 939 deletions(-) delete mode 100644 keyboards/yowkees/keyball/keyball39/config.h delete mode 100644 keyboards/yowkees/keyball/keyball39/info.json delete mode 100644 keyboards/yowkees/keyball/keyball39/keyball39.c delete mode 100644 keyboards/yowkees/keyball/keyball39/keyball39.h delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/config.h delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball39/readme.md delete mode 100644 keyboards/yowkees/keyball/keyball39/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball44/config.h delete mode 100644 keyboards/yowkees/keyball/keyball44/info.json delete mode 100644 keyboards/yowkees/keyball/keyball44/keyball44.c delete mode 100644 keyboards/yowkees/keyball/keyball44/keyball44.h delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/config.h delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c delete mode 100644 keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk delete mode 100644 keyboards/yowkees/keyball/keyball44/readme.md delete mode 100644 keyboards/yowkees/keyball/keyball44/rules.mk diff --git a/keyboards/yowkees/keyball/keyball39/config.h b/keyboards/yowkees/keyball/keyball39/config.h deleted file mode 100644 index 83441bf6060..00000000000 --- a/keyboards/yowkees/keyball/keyball39/config.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -// Key matrix parameters -#define MATRIX_ROWS (4 * 2) // split keyboard -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define MATRIX_MASKED -#define DEBOUNCE 5 -#define DIODE_DIRECTION COL2ROW - -// Split parameters -#define SOFT_SERIAL_PIN D2 -#define SPLIT_HAND_MATRIX_GRID F6, B5 -#define SPLIT_USB_DETECT -#ifdef OLED_ENABLE -# define SPLIT_OLED_ENABLE -#endif - -// If your PC does not recognize Keyball, try setting this macro. This macro -// increases the firmware size by 200 bytes, so it is disabled by default, but -// it has been reported to work well in such cases. -//#define SPLIT_WATCHDOG_ENABLE - -#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI - -// RGB LED settings -#define WS2812_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 48 -# define RGBLED_SPLIT { 24, 24 } // (24 + 22) -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 150 // limitated for power consumption -# endif -# ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 15 -# endif -# ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 17 -# endif -# ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -# endif -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_SPLIT { 24, 24 } -#endif - -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" -# define OLED_FONT_START 32 -# define OLED_FONT_END 195 -#endif - -#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) -# define LAYER_STATE_8BIT -#endif - -// To squeeze firmware size -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball39/info.json b/keyboards/yowkees/keyball/keyball39/info.json deleted file mode 100644 index 163269d8466..00000000000 --- a/keyboards/yowkees/keyball/keyball39/info.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0200", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball39", - "rgblight": { - "driver": "ws2812" - }, - "layouts": { - "LAYOUT_no_ball": { - "layout": [ - { "label": "L00", "x": 0, "y": 0 }, - { "label": "L01", "x": 1, "y": 0 }, - { "label": "L02", "x": 2, "y": 0 }, - { "label": "L03", "x": 3, "y": 0 }, - { "label": "L04", "x": 4, "y": 0 }, - { "label": "R04", "x": 7, "y": 0 }, - { "label": "R03", "x": 8, "y": 0 }, - { "label": "R02", "x": 9, "y": 0 }, - { "label": "R01", "x":10, "y": 0 }, - { "label": "R00", "x":11, "y": 0 }, - - { "label": "L10", "x": 0, "y": 1 }, - { "label": "L11", "x": 1, "y": 1 }, - { "label": "L12", "x": 2, "y": 1 }, - { "label": "L13", "x": 3, "y": 1 }, - { "label": "L14", "x": 4, "y": 1 }, - { "label": "R14", "x": 7, "y": 1 }, - { "label": "R13", "x": 8, "y": 1 }, - { "label": "R12", "x": 9, "y": 1 }, - { "label": "R11", "x":10, "y": 1 }, - { "label": "R10", "x":11, "y": 1 }, - - { "label": "L20", "x": 0, "y": 2 }, - { "label": "L21", "x": 1, "y": 2 }, - { "label": "L22", "x": 2, "y": 2 }, - { "label": "L23", "x": 3, "y": 2 }, - { "label": "L24", "x": 4, "y": 2 }, - { "label": "R24", "x": 7, "y": 2 }, - { "label": "R23", "x": 8, "y": 2 }, - { "label": "R22", "x": 9, "y": 2 }, - { "label": "R21", "x":10, "y": 2 }, - { "label": "R20", "x":11, "y": 2 }, - - { "label": "L30", "x": 0, "y": 3 }, - { "label": "L31", "x": 1, "y": 3 }, - { "label": "L32", "x": 2, "y": 3 }, - { "label": "L33", "x": 3, "y": 3 }, - { "label": "L34", "x": 4, "y": 3 }, - { "label": "L35", "x": 5, "y": 3 }, - { "label": "R35", "x": 6, "y": 3 }, - { "label": "R34", "x": 7, "y": 3 }, - { "label": "R33", "x": 8, "y": 3 }, - { "label": "R32", "x": 9, "y": 3 }, - { "label": "R31", "x":10, "y": 3 }, - { "label": "R30", "x":11, "y": 3 } - ] - } - } -} diff --git a/keyboards/yowkees/keyball/keyball39/keyball39.c b/keyboards/yowkees/keyball/keyball39/keyball39.c deleted file mode 100644 index 5472a0d48ff..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keyball39.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2021 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "lib/keyball/keyball.h" - -////////////////////////////////////////////////////////////////////////////// - -// clang-format off -matrix_row_t matrix_mask[MATRIX_ROWS] = { - 0b00011111, - 0b00011111, - 0b00011111, - 0b00111111, - 0b00011111, - 0b00011111, - 0b00011111, - 0b00111111, -}; -// clang-format on - -void keyball_on_adjust_layout(keyball_adjust_t v) { -#ifdef RGBLIGHT_ENABLE - // adjust RGBLIGHT's clipping and effect ranges - uint8_t lednum_this = keyball.this_have_ball ? 22 : 24; - uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 22 : 24; - rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); - rgblight_set_effect_range(0, lednum_this + lednum_that); -#endif -} diff --git a/keyboards/yowkees/keyball/keyball39/keyball39.h b/keyboards/yowkees/keyball/keyball39/keyball39.h deleted file mode 100644 index a2555e0b502..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keyball39.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include "quantum.h" -#include "lib/keyball/keyball.h" - -// clang-format off - -#define LAYOUT_right_ball( \ - L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, R35, R34, R30 \ - ) \ - { \ - { L00, L01, L02, L03, L04, KC_NO }, \ - { L10, L11, L12, L13, L14, KC_NO }, \ - { L20, L21, L22, L23, L24, KC_NO }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, KC_NO }, \ - { R10, R11, R12, R13, R14, KC_NO }, \ - { R20, R21, R22, R23, R24, KC_NO }, \ - { R30, KC_NO, KC_NO, KC_NO, R34, R35 }, \ - } - -#define LAYOUT_left_ball( \ - L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ - L30, L34, L35, R35, R34, R33, R32, R31, R30 \ - ) \ - { \ - { L00, L01, L02, L03, L04, KC_NO }, \ - { L10, L11, L12, L13, L14, KC_NO }, \ - { L20, L21, L22, L23, L24, KC_NO }, \ - { L30, KC_NO, KC_NO, KC_NO, L34, L35 }, \ - { R00, R01, R02, R03, R04, KC_NO }, \ - { R10, R11, R12, R13, R14, KC_NO }, \ - { R20, R21, R22, R23, R24, KC_NO }, \ - { R30, R31, R32, R33, R34, R35 }, \ - } - -#define LAYOUT_dual_ball( \ - L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ - L30, L34, L35, R35, R34, R30 \ - ) \ - { \ - { L00, L01, L02, L03, L04, KC_NO }, \ - { L10, L11, L12, L13, L14, KC_NO }, \ - { L20, L21, L22, L23, L24, KC_NO }, \ - { L30, KC_NO, KC_NO, KC_NO, L34, L35 }, \ - { R00, R01, R02, R03, R04, KC_NO }, \ - { R10, R11, R12, R13, R14, KC_NO }, \ - { R20, R21, R22, R23, R24, KC_NO }, \ - { R30, KC_NO, KC_NO, KC_NO, R34, R35 }, \ - } - -#define LAYOUT_no_ball( \ - L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30 \ - ) \ - { \ - { L00, L01, L02, L03, L04, KC_NO }, \ - { L10, L11, L12, L13, L14, KC_NO }, \ - { L20, L21, L22, L23, L24, KC_NO }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, KC_NO }, \ - { R10, R11, R12, R13, R14, KC_NO }, \ - { R20, R21, R22, R23, R24, KC_NO }, \ - { R30, R31, R32, R33, R34, R35 }, \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball -#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h deleted file mode 100644 index ec062cf45e0..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/default/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c deleted file mode 100644 index ebc39675860..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/default/keymap.c +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for default - [0] = LAYOUT_universal( - 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_MINS , - KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , - KC_LCTL , KC_LGUI , KC_LALT ,LSFT_T(KC_LNG2),LT(1,KC_SPC),LT(3,KC_LNG1),KC_BSPC,LT(2,KC_ENT),LSFT_T(KC_LNG2),KC_RALT,KC_RGUI, KC_RSFT - ), - - [1] = LAYOUT_universal( - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_RBRC , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , - KC_F5 , KC_EXLM , S(KC_6) ,S(KC_INT3), S(KC_8) , S(KC_INT1), KC_BTN1 , KC_PGUP , KC_BTN2 , KC_SCLN , - S(KC_EQL),S(KC_LBRC),S(KC_7) , S(KC_2) ,S(KC_RBRC), KC_LBRC , KC_DLR , KC_PGDN , KC_BTN3 , KC_F11 , - KC_INT1 , KC_EQL , S(KC_3) , _______ , _______ , _______ , TO(2) , TO(0) , _______ , KC_RALT , KC_RGUI , KC_F12 - ), - - [2] = LAYOUT_universal( - KC_TAB , KC_7 , KC_8 , KC_9 , KC_MINS , KC_NUHS , _______ , KC_BTN3 , _______ , KC_BSPC , - S(KC_QUOT), KC_4 , KC_5 , KC_6 ,S(KC_SCLN), S(KC_9) , KC_BTN1 , KC_UP , KC_BTN2 , KC_QUOT , - KC_SLSH , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_NUHS), KC_LEFT , KC_DOWN , KC_RGHT , _______ , - KC_ESC , KC_0 , KC_DOT , KC_DEL , KC_ENT , KC_BSPC , _______ , _______ , _______ , _______ , _______ , _______ - ), - - [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , _______ , SSNP_HOR , SSNP_VRT , SSNP_FRE , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , _______ , _______ , _______ , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , - QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT - ), -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == 3); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball39/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball39/readme.md b/keyboards/yowkees/keyball/keyball39/readme.md deleted file mode 100644 index 6076b3f2917..00000000000 --- a/keyboards/yowkees/keyball/keyball39/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Keyball39 - -![Keyball39](../../../../keyball39/doc/rev1/images/kb39_001.jpg) - -A split keyboard with 39 vertically staggered keys and 34mm track ball. - -* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: Keyball39 PCB, ProMicro -* Hardware Availability: - * - * - -Make example for this keyboard (after setting up your build environment): - - make keyball/keyball39:default - -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). - -## Special keycodes - -See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/keyball39/rules.mk b/keyboards/yowkees/keyball/keyball39/rules.mk deleted file mode 100644 index 0dfde5b3dd9..00000000000 --- a/keyboards/yowkees/keyball/keyball39/rules.mk +++ /dev/null @@ -1,49 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes - -# Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -AUDIO_ENABLE = no # Audio output - -# Keyball39 is split keyboard. -SPLIT_KEYBOARD = yes - -# Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += drivers/pmw3360/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate - -# This is unnecessary for processing KC_MS_BTN*. -MOUSEKEY_ENABLE = no - -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. -SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. - -# Include common library -SRC += lib/keyball/keyball.c - -# Disable other features to squeeze firmware size -SPACE_CADET_ENABLE = no -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no diff --git a/keyboards/yowkees/keyball/keyball44/config.h b/keyboards/yowkees/keyball/keyball44/config.h deleted file mode 100644 index b2282c2a6de..00000000000 --- a/keyboards/yowkees/keyball/keyball44/config.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -// Key matrix parameters -#define MATRIX_ROWS (4 * 2) // split keyboard -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define MATRIX_MASKED -#define DEBOUNCE 5 -#define DIODE_DIRECTION COL2ROW - -// Split parameters -#define SOFT_SERIAL_PIN D2 -#define SPLIT_HAND_MATRIX_GRID F7, D4 -#define SPLIT_USB_DETECT -#ifdef OLED_ENABLE -# define SPLIT_OLED_ENABLE -#endif - -// If your PC does not recognize Keyball, try setting this macro. This macro -// increases the firmware size by 200 bytes, so it is disabled by default, but -// it has been reported to work well in such cases. -//#define SPLIT_WATCHDOG_ENABLE - -#define SPLIT_TRANSACTION_IDS_KB KEYBALL_GET_INFO, KEYBALL_GET_MOTION, KEYBALL_SET_CPI - -// RGB LED settings -#define WS2812_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 60 -# define RGBLED_SPLIT { 30, 30 } // (30 + 29) -# ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 150 // limitated for power consumption -# endif -# ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 15 -# endif -# ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 17 -# endif -# ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -# endif -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_SPLIT { 30, 30 } -#endif - -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keyball/lib/logofont/logofont.c" -# define OLED_FONT_START 32 -# define OLED_FONT_END 195 -#endif - -#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) -# define LAYER_STATE_8BIT -#endif - -// To squeeze firmware size -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/yowkees/keyball/keyball44/info.json b/keyboards/yowkees/keyball/keyball44/info.json deleted file mode 100644 index 45b860f991f..00000000000 --- a/keyboards/yowkees/keyball/keyball44/info.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "usb": { - "vid": "0x5957", - "pid": "0x0400", - "device_version": "1.0.0" - }, - "manufacturer": "Yowkees", - "keyboard_name": "Keyball44", - "rgblight": { - "driver": "ws2812" - }, - "layouts": { - "LAYOUT_no_ball": { - "layout": [ - { "label": "L00", "x": 0, "y": 0 }, - { "label": "L01", "x": 1, "y": 0 }, - { "label": "L02", "x": 2, "y": 0 }, - { "label": "L03", "x": 3, "y": 0 }, - { "label": "L04", "x": 4, "y": 0 }, - { "label": "L05", "x": 5, "y": 0 }, - { "label": "R05", "x": 7, "y": 0 }, - { "label": "R04", "x": 8, "y": 0 }, - { "label": "R03", "x": 9, "y": 0 }, - { "label": "R02", "x":10, "y": 0 }, - { "label": "R01", "x":11, "y": 0 }, - { "label": "R00", "x":12, "y": 0 }, - - { "label": "L10", "x": 0, "y": 1 }, - { "label": "L11", "x": 1, "y": 1 }, - { "label": "L12", "x": 2, "y": 1 }, - { "label": "L13", "x": 3, "y": 1 }, - { "label": "L14", "x": 4, "y": 1 }, - { "label": "L15", "x": 5, "y": 1 }, - { "label": "R15", "x": 7, "y": 1 }, - { "label": "R14", "x": 8, "y": 1 }, - { "label": "R13", "x": 9, "y": 1 }, - { "label": "R12", "x":10, "y": 1 }, - { "label": "R11", "x":11, "y": 1 }, - { "label": "R10", "x":12, "y": 1 }, - - { "label": "L20", "x": 0, "y": 2 }, - { "label": "L21", "x": 1, "y": 2 }, - { "label": "L22", "x": 2, "y": 2 }, - { "label": "L23", "x": 3, "y": 2 }, - { "label": "L24", "x": 4, "y": 2 }, - { "label": "L25", "x": 5, "y": 2 }, - { "label": "R25", "x": 7, "y": 2 }, - { "label": "R24", "x": 8, "y": 2 }, - { "label": "R23", "x": 9, "y": 2 }, - { "label": "R22", "x":10, "y": 2 }, - { "label": "R21", "x":11, "y": 2 }, - { "label": "R20", "x":12, "y": 2 }, - - { "label": "L31", "x": 1, "y": 3 }, - { "label": "L32", "x": 2, "y": 3 }, - { "label": "L33", "x": 3, "y": 3 }, - { "label": "L34", "x": 4, "y": 3 }, - { "label": "L35", "x": 5, "y": 3 }, - { "label": "R35", "x": 7, "y": 3 }, - { "label": "R34", "x": 8, "y": 3 }, - { "label": "R33", "x": 9, "y": 3 }, - { "label": "R32", "x":10, "y": 3 }, - { "label": "R31", "x":11, "y": 3 } - ] - } - } -} diff --git a/keyboards/yowkees/keyball/keyball44/keyball44.c b/keyboards/yowkees/keyball/keyball44/keyball44.c deleted file mode 100644 index 2fc24dfb0ac..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keyball44.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "lib/keyball/keyball.h" - -////////////////////////////////////////////////////////////////////////////// - -// clang-format off -matrix_row_t matrix_mask[MATRIX_ROWS] = { - 0b00111111, - 0b00111111, - 0b00111111, - 0b00111110, - 0b00111111, - 0b00111111, - 0b00111111, - 0b00111110, -}; -// clang-format on - -void keyball_on_adjust_layout(keyball_adjust_t v) { -#ifdef RGBLIGHT_ENABLE - // adjust RGBLIGHT's clipping and effect ranges - uint8_t lednum_this = keyball.this_have_ball ? 29 : 30; - uint8_t lednum_that = !keyball.that_enable ? 0 : keyball.that_have_ball ? 29 : 30; - rgblight_set_clipping_range(is_keyboard_left() ? 0 : lednum_that, lednum_this); - rgblight_set_effect_range(0, lednum_this + lednum_that); -#endif -} diff --git a/keyboards/yowkees/keyball/keyball44/keyball44.h b/keyboards/yowkees/keyball/keyball44/keyball44.h deleted file mode 100644 index 0a39a4fa3d7..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keyball44.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#include "quantum.h" -#include "lib/keyball/keyball.h" - -// clang-format off - -#define LAYOUT_right_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L31, L32, L33, L34, L35, R35, R34, R31 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, R31, KC_NO, KC_NO, R34, R35 }, \ - } - -#define LAYOUT_left_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L31, L34, L35, R35, R34, R33, R32, R31 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, L31, KC_NO, KC_NO, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, R31, R32, R33, R34, R35 }, \ - } - -#define LAYOUT_dual_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L31, L34, L35, R35, R34, R31 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, L31, KC_NO, KC_NO, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, R31, KC_NO, KC_NO, R34, R35 }, \ - } - -#define LAYOUT_no_ball( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - L31, L32, L33, L34, L35, R35, R34, R33, R32, R31 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, R31, R32, R33, R34, R35 }, \ - } - -// clang-format on - -#define LAYOUT LAYOUT_right_ball -#define LAYOUT_universal LAYOUT_no_ball diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h b/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h deleted file mode 100644 index ec062cf45e0..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/default/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#pragma once - -#ifdef RGBLIGHT_ENABLE -# 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 - -#define TAP_CODE_DELAY 5 - -#define POINTING_DEVICE_AUTO_MOUSE_ENABLE -#define AUTO_MOUSE_DEFAULT_LAYER 1 diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c b/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c deleted file mode 100644 index 9446f052dc6..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/default/keymap.c +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2022 @Yowkees -Copyright 2022 MURAOKA Taro (aka KoRoN, @kaoriya) - -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 . -*/ - -#include QMK_KEYBOARD_H - -#include "quantum.h" - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // keymap for default - [0] = LAYOUT_universal( - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , - KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_INT1 , - KC_LALT,KC_LGUI,LCTL_T(KC_LNG2) ,LT(1,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT), RCTL_T(KC_LNG2), KC_RALT , KC_PSCR - ), - - [1] = LAYOUT_universal( - SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - SSNP_VRT , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , - SSNP_HOR , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ - ), - - [2] = LAYOUT_universal( - _______ ,S(KC_QUOT), KC_7 , KC_8 , KC_9 , S(KC_8) , S(KC_9) , S(KC_1) , S(KC_6) , KC_LBRC , S(KC_4) , _______ , - _______ ,S(KC_SCLN), KC_4 , KC_5 , KC_6 , KC_RBRC , KC_NUHS , KC_MINS , S(KC_EQL), S(KC_3) , KC_QUOT , S(KC_2) , - _______ ,S(KC_MINS), KC_1 , KC_2 , KC_3 ,S(KC_RBRC), S(KC_NUHS),S(KC_INT1), KC_EQL ,S(KC_LBRC),S(KC_SLSH),S(KC_INT3), - KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ - ), - - [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , RGB_M_K , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , _______ , SCRL_DVI , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , _______ , _______ , - RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , _______ , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , _______ , KBC_SAVE , - QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT - ), -}; -// clang-format on - -layer_state_t layer_state_set_user(layer_state_t state) { - // Auto enable scroll mode when the highest layer is 3 - keyball_set_scroll_mode(get_highest_layer(state) == 3); - return state; -} - -#ifdef OLED_ENABLE - -# include "lib/oledkit/oledkit.h" - -void oledkit_render_info_user(void) { - keyball_oled_render_keyinfo(); - keyball_oled_render_ballinfo(); - keyball_oled_render_layerinfo(); -} -#endif diff --git a/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk b/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk deleted file mode 100644 index 5746ccd2854..00000000000 --- a/keyboards/yowkees/keyball/keyball44/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -RGBLIGHT_ENABLE = yes - -OLED_ENABLE = yes diff --git a/keyboards/yowkees/keyball/keyball44/readme.md b/keyboards/yowkees/keyball/keyball44/readme.md deleted file mode 100644 index 4707f2c6574..00000000000 --- a/keyboards/yowkees/keyball/keyball44/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -# Keyball44 - -![Keyball44](../../../../keyball44/doc/rev1/images/kb44_001.jpg) - -A split keyboard with 44 vertically staggered keys and 34mm track ball. - -* Keyboard Maintainer: [@Yowkees](https://twitter.com/Yowkees) -* Hardware Supported: Keyball44 PCB, ProMicro -* Hardware Availability: - * - -Make example for this keyboard (after setting up your build environment): - - make keyball/keyball44:default - -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). - -## Special keycodes - -See [Special Keycode](../lib/keyball/keycodes.md) file. diff --git a/keyboards/yowkees/keyball/keyball44/rules.mk b/keyboards/yowkees/keyball/keyball44/rules.mk deleted file mode 100644 index 77004677fad..00000000000 --- a/keyboards/yowkees/keyball/keyball44/rules.mk +++ /dev/null @@ -1,49 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Link Time Optimization required for size. -LTO_ENABLE = yes - -# Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -AUDIO_ENABLE = no # Audio output - -# Keyball44 is split keyboard. -SPLIT_KEYBOARD = yes - -# Optical sensor driver for trackball. -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += drivers/pmw3360/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c # Optical sensor use SPI to communicate - -# This is unnecessary for processing KC_MS_BTN*. -MOUSEKEY_ENABLE = no - -# Enabled only one of RGBLIGHT and RGB_MATRIX if necessary. -RGBLIGHT_ENABLE = no # Enable RGBLIGHT -RGB_MATRIX_ENABLE = no # Enable RGB_MATRIX (not work yet) -RGB_MATRIX_DRIVER = ws2812 - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# To support OLED -OLED_ENABLE = no # Please Enable this in each keymaps. -SRC += lib/oledkit/oledkit.c # OLED utility for Keyball series. - -# Include common library -SRC += lib/keyball/keyball.c - -# Disable other features to squeeze firmware size -SPACE_CADET_ENABLE = no -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no