From 4d9f16143bf9204614c0e62b34acb6f5d4f0533d Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 26 Jul 2023 19:19:31 +0530 Subject: [PATCH 01/25] init --- keyboards/keebit/coral/config.h | 26 +++ keyboards/keebit/coral/coral.c | 49 ++++++ keyboards/keebit/coral/coral.h | 6 + keyboards/keebit/coral/info.json | 149 ++++++++++++++++++ .../keebit/coral/keymaps/default/keymap.c | 116 ++++++++++++++ .../keebit/coral/keymaps/default/rules.mk | 1 + keyboards/keebit/coral/readme.md | 27 ++++ keyboards/keebit/coral/rules.mk | 2 + 8 files changed, 376 insertions(+) create mode 100644 keyboards/keebit/coral/config.h create mode 100644 keyboards/keebit/coral/coral.c create mode 100644 keyboards/keebit/coral/coral.h create mode 100644 keyboards/keebit/coral/info.json create mode 100644 keyboards/keebit/coral/keymaps/default/keymap.c create mode 100644 keyboards/keebit/coral/keymaps/default/rules.mk create mode 100644 keyboards/keebit/coral/readme.md create mode 100644 keyboards/keebit/coral/rules.mk diff --git a/keyboards/keebit/coral/config.h b/keyboards/keebit/coral/config.h new file mode 100644 index 00000000000..61453239b34 --- /dev/null +++ b/keyboards/keebit/coral/config.h @@ -0,0 +1,26 @@ +// Copyright 2023 numToStr (@numToStr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP16 + +#define WS2812_PIO_USE_PIO1 diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c new file mode 100644 index 00000000000..0a8cdf525f1 --- /dev/null +++ b/keyboards/keebit/coral/coral.c @@ -0,0 +1,49 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// ===== LED/RGB INDICATOR ===== +enum RGB_LAYERS { + RGBL_CAPS = 0 +}; + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_BLUE} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + [RGBL_CAPS] = my_capslock_layer +); + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(RGBL_CAPS, led_state.caps_lock); + return true; +} + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +// ===== DEFAULT ENCODERS ===== +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; /* Don't process further events if user function exists and returns false */ + } + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_D); + } else { + tap_code(KC_WH_U); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return true; +} diff --git a/keyboards/keebit/coral/coral.h b/keyboards/keebit/coral/coral.h new file mode 100644 index 00000000000..26d9c6f0fbf --- /dev/null +++ b/keyboards/keebit/coral/coral.h @@ -0,0 +1,6 @@ +// Copyright 2023 numToStr (@numToStr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json new file mode 100644 index 00000000000..144342561f2 --- /dev/null +++ b/keyboards/keebit/coral/info.json @@ -0,0 +1,149 @@ +{ + "manufacturer": "keeb.it!", + "keyboard_name": "coral!56", + "maintainer": "numToStr", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "lto": true, + "key_override": true, + "combo": true, + "tap_dance": true, + "rgblight": true + }, + "matrix_pins": { + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], + "cols": ["GP1", "GP0", "GP27", "GP26", "GP15", "GP5"] + }, + "processor": "RP2040", + "url": "https://github.com/keeb-it/coral", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP16" + }, + "rgblight": { + "led_count": 1, + "hue_steps": 4, + "saturation_steps": 5, + "brightness_steps": 5, + "max_brightness": 50, + "sleep": false, + "layers": { + "blink": true, + "enabled": true, + "max": 22, + "override_rgb": true + }, + "animations": { + "breathing": true, + "christmas": true, + "rainbow_swirl": true, + "rgb_test": true + } + }, + "encoder": { + "enabled": true, + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 1 }] + }, + "split": { + "enabled": true, + "soft_serial_pin": "GP13", + "transport": { + "protocol": "serial" + }, + "matrix_pins": { + "right": { + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], + "cols": ["GP5", "GP15", "GP26", "GP27", "GP0", "GP1"] + } + }, + "encoder": { + "right": { + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 1 }] + } + }, + "usb_detect": { + "enabled": true, + "timeout": 2500 + } + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "1", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "2", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "3", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "4", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "5", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "6", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "7", "matrix": [5, 0], "x": 6, "y": 0 }, + { "label": "8", "matrix": [5, 1], "x": 7, "y": 0 }, + { "label": "9", "matrix": [5, 2], "x": 8, "y": 0 }, + { "label": "0", "matrix": [5, 3], "x": 9, "y": 0 }, + { "label": "-_", "matrix": [5, 4], "x": 10, "y": 0 }, + { "label": "=+", "matrix": [5, 5], "x": 11, "y": 0 }, + + { "label": "`~", "matrix": [1, 0], "x": 0, "y": 1 }, + { "label": "Q", "matrix": [1, 1], "x": 1, "y": 1 }, + { "label": "W", "matrix": [1, 2], "x": 2, "y": 1 }, + { "label": "E", "matrix": [1, 3], "x": 3, "y": 1 }, + { "label": "R", "matrix": [1, 4], "x": 4, "y": 1 }, + { "label": "T", "matrix": [1, 5], "x": 5, "y": 1 }, + { "label": "Y", "matrix": [6, 0], "x": 6, "y": 1 }, + { "label": "U", "matrix": [6, 1], "x": 7, "y": 1 }, + { "label": "I", "matrix": [6, 2], "x": 8, "y": 1 }, + { "label": "O", "matrix": [6, 3], "x": 9, "y": 1 }, + { "label": "P", "matrix": [6, 4], "x": 10, "y": 1 }, + { "label": "[{", "matrix": [6, 5], "x": 11, "y": 1 }, + + { "label": "\\|", "matrix": [2, 0], "x": 0, "y": 2 }, + { "label": "A", "matrix": [2, 1], "x": 1, "y": 2 }, + { "label": "S", "matrix": [2, 2], "x": 2, "y": 2 }, + { "label": "D", "matrix": [2, 3], "x": 3, "y": 2 }, + { "label": "F", "matrix": [2, 4], "x": 4, "y": 2 }, + { "label": "G", "matrix": [2, 5], "x": 5, "y": 2 }, + { "label": "H", "matrix": [7, 0], "x": 6, "y": 2 }, + { "label": "J", "matrix": [7, 1], "x": 7, "y": 2 }, + { "label": "K", "matrix": [7, 2], "x": 8, "y": 2 }, + { "label": "L", "matrix": [7, 3], "x": 9, "y": 2 }, + { "label": ";:", "matrix": [7, 4], "x": 10, "y": 2 }, + { "label": "'\"", "matrix": [7, 5], "x": 11, "y": 2 }, + + { "label": "TAB", "matrix": [3, 0], "x": 0, "y": 3 }, + { "label": "Z", "matrix": [3, 1], "x": 1, "y": 3 }, + { "label": "X", "matrix": [3, 2], "x": 2, "y": 3 }, + { "label": "C", "matrix": [3, 3], "x": 3, "y": 3 }, + { "label": "V", "matrix": [3, 4], "x": 4, "y": 3 }, + { "label": "B", "matrix": [3, 5], "x": 5, "y": 3 }, + { "label": "N", "matrix": [8, 0], "x": 6, "y": 3 }, + { "label": "M", "matrix": [8, 1], "x": 7, "y": 3 }, + { "label": ",<", "matrix": [8, 2], "x": 8, "y": 3 }, + { "label": ".>", "matrix": [8, 3], "x": 9, "y": 3 }, + { "label": "/?", "matrix": [8, 4], "x": 10, "y": 3 }, + { "label": "]{", "matrix": [8, 5], "x": 11, "y": 3 }, + + { "label": "_______", "matrix": [4, 1], "x": 1, "y": 4 }, + { "label": "PSCR", "matrix": [4, 2], "x": 2, "y": 4 }, + { "label": "ESC", "matrix": [4, 3], "x": 3, "y": 4 }, + { "label": "ENTER", "matrix": [4, 4], "x": 4, "y": 4 }, + { "label": "L_ROT", "matrix": [4, 5], "x": 5, "y": 4 }, + { "label": "R_ROT", "matrix": [9, 0], "x": 6, "y": 4 }, + { "label": "SPACE", "matrix": [9, 1], "x": 7, "y": 4 }, + { "label": "BSPC", "matrix": [9, 2], "x": 8, "y": 4 }, + { "label": "DEL", "matrix": [9, 3], "x": 9, "y": 4 }, + { "label": "_______", "matrix": [9, 4], "x": 10, "y": 4 } + ] + } + } +} diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c new file mode 100644 index 00000000000..1e2a3205854 --- /dev/null +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -0,0 +1,116 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Left-hand home row mods +#define GUI_A LGUI_T(KC_A) +#define ALT_S LALT_T(KC_S) +#define SFT_D LSFT_T(KC_D) +#define CTL_F LCTL_T(KC_F) + +// Right-hand home row mods +#define CTL_J RCTL_T(KC_J) +#define SFT_K RSFT_T(KC_K) +#define ALT_L LALT_T(KC_L) +#define GUI_SCLN RGUI_T(KC_SCLN) + +// Thumb Keys +#define L_THUMB LT(NavLayer, KC_ENTER) +#define R_THUMB LT(FnLayer, KC_SPACE) + +// Rotary +#define L_ROT TD(TD_MNXT_MPREV) +#define R_ROT KC_MPLY + + +// ###### TAP DANCE ###### + +enum TapDance { + TD_MNXT_MPREV, +}; + +// Tap Dance definitions +tap_dance_action_t tap_dance_actions[] = { + // Tap once for Media-Next, twice for Media-Previous + [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), +}; + +// ###### LAYERS ###### + +enum Layers { + BaseLayer, + FnLayer, + NavLayer +}; + +enum CustomKeycodes { + SS_LOREM = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BaseLayer] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, + _______, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, _______ + ), + [NavLayer] = LAYOUT( + _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, /**/ KC_BRID, KC_BRIU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, SS_LOREM, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ), + [FnLayer] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + SS_LOREM, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ) +}; + +// #if defined(ENCODER_MAP_ENABLE) +// const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +// [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +// }; +// #endif + +// ###### OVERRIDES ###### + +// Shift Left is Home +const key_override_t left_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_LEFT, KC_HOME); +// Shift Right is End +const key_override_t right_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_RIGHT, KC_END); +// Shift Up is PageUp +const key_override_t up_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_UP, KC_PGUP); +// Shift Down is PageDown +const key_override_t down_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOWN, KC_PGDN); + +// This globally defines all key overrides to be used +const key_override_t **key_overrides = (const key_override_t *[]){ + &left_key_override, + &right_key_override, + &up_key_override, + &down_key_override, + NULL // Null terminate the array of overrides! +}; + + +// ###### COMBOS ###### + +enum combos { + CAPS_COMBO, + COMBO_LENGTH +}; + +uint16_t COMBO_LEN = COMBO_LENGTH; + +// Left and right thumb is CapsLock +const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; + +combo_t key_combos[] = { + [CAPS_COMBO] = COMBO(caps_combo, KC_CAPS), +}; diff --git a/keyboards/keebit/coral/keymaps/default/rules.mk b/keyboards/keebit/coral/keymaps/default/rules.mk new file mode 100644 index 00000000000..b5ce6bb9933 --- /dev/null +++ b/keyboards/keebit/coral/keymaps/default/rules.mk @@ -0,0 +1 @@ +# ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keebit/coral/readme.md b/keyboards/keebit/coral/readme.md new file mode 100644 index 00000000000..99566c97a40 --- /dev/null +++ b/keyboards/keebit/coral/readme.md @@ -0,0 +1,27 @@ +# keebit/coral + +![keebit/coral](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [numToStr](https://github.com/numToStr) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make keebit/coral:default + +Flashing example for this keyboard: + + make keebit/coral:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/keebit/coral/rules.mk b/keyboards/keebit/coral/rules.mk new file mode 100644 index 00000000000..9e39bf2c059 --- /dev/null +++ b/keyboards/keebit/coral/rules.mk @@ -0,0 +1,2 @@ +# This file intentionally left blank +SERIAL_DRIVER = vendor From a8fd25cecabb1f1e81265b047b9d2e567a8a2dd3 Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 29 Jul 2023 16:34:41 +0530 Subject: [PATCH 02/25] polling rate, caps word and tap dance --- keyboards/keebit/coral/info.json | 9 ++++++--- keyboards/keebit/coral/keymaps/default/keymap.c | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 144342561f2..bc70a95fdba 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -15,7 +15,8 @@ "key_override": true, "combo": true, "tap_dance": true, - "rgblight": true + "rgblight": true, + "caps_word": true }, "matrix_pins": { "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], @@ -26,7 +27,8 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0xFEED", + "polling_interval": 1 }, "ws2812": { "driver": "vendor", @@ -75,7 +77,8 @@ }, "usb_detect": { "enabled": true, - "timeout": 2500 + "timeout": 2500, + "polling_interval": 1 } }, "layouts": { diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index 1e2a3205854..c72c99890df 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -21,19 +21,22 @@ // Rotary #define L_ROT TD(TD_MNXT_MPREV) -#define R_ROT KC_MPLY +#define R_ROT TD(TD_MPLY_MUTE) // ###### TAP DANCE ###### enum TapDance { TD_MNXT_MPREV, + TD_MPLY_MUTE, }; // Tap Dance definitions tap_dance_action_t tap_dance_actions[] = { // Tap once for Media-Next, twice for Media-Previous [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + // Tap once for Play/Pause, twice for Audio Mute + [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), }; // ###### LAYERS ###### @@ -112,5 +115,5 @@ uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; combo_t key_combos[] = { - [CAPS_COMBO] = COMBO(caps_combo, KC_CAPS), + [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), }; From 71fb3781f8e99e772baf3a7315cf50c459f45790 Mon Sep 17 00:00:00 2001 From: numToStr Date: Thu, 7 Sep 2023 15:03:44 +0530 Subject: [PATCH 03/25] lean default --- keyboards/keebit/coral/info.json | 6 +- .../keebit/coral/keymaps/default/keymap.c | 120 ++++-------------- 2 files changed, 23 insertions(+), 103 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index bc70a95fdba..d843077f5b8 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -12,11 +12,7 @@ "mousekey": true, "nkro": true, "lto": true, - "key_override": true, - "combo": true, - "tap_dance": true, - "rgblight": true, - "caps_word": true + "rgblight": true }, "matrix_pins": { "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index c72c99890df..514f2e9d31a 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -3,117 +3,41 @@ #include QMK_KEYBOARD_H -// Left-hand home row mods -#define GUI_A LGUI_T(KC_A) -#define ALT_S LALT_T(KC_S) -#define SFT_D LSFT_T(KC_D) -#define CTL_F LCTL_T(KC_F) - -// Right-hand home row mods -#define CTL_J RCTL_T(KC_J) -#define SFT_K RSFT_T(KC_K) -#define ALT_L LALT_T(KC_L) -#define GUI_SCLN RGUI_T(KC_SCLN) - // Thumb Keys -#define L_THUMB LT(NavLayer, KC_ENTER) -#define R_THUMB LT(FnLayer, KC_SPACE) +#define L_THUMB LT(LowerLayer, KC_ENTER) +#define R_THUMB LT(RaiseLayer, KC_SPACE) // Rotary -#define L_ROT TD(TD_MNXT_MPREV) -#define R_ROT TD(TD_MPLY_MUTE) +#define L_ROT KC_MNXT +#define R_ROT KC_MPLY -// ###### TAP DANCE ###### - -enum TapDance { - TD_MNXT_MPREV, - TD_MPLY_MUTE, -}; - -// Tap Dance definitions -tap_dance_action_t tap_dance_actions[] = { - // Tap once for Media-Next, twice for Media-Previous - [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), - // Tap once for Play/Pause, twice for Audio Mute - [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), -}; - -// ###### LAYERS ###### - enum Layers { BaseLayer, - FnLayer, - NavLayer -}; - -enum CustomKeycodes { - SS_LOREM = SAFE_RANGE, + LowerLayer, + RaiseLayer }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BaseLayer] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, - KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, - _______, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, _______ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LGUI, KC_LALT, KC_LCTL, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), - [NavLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, - _______, _______, _______, _______, _______, _______, /**/ KC_BRID, KC_BRIU, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, SS_LOREM, + [LowerLayer] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, /**/ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, /**/ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, /**/ KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), - [FnLayer] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - SS_LOREM, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + [RaiseLayer] = LAYOUT( + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, /**/ KC_PGUP, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, /**/ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, /**/ XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ) }; - -// #if defined(ENCODER_MAP_ENABLE) -// const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { -// [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, -// }; -// #endif - -// ###### OVERRIDES ###### - -// Shift Left is Home -const key_override_t left_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_LEFT, KC_HOME); -// Shift Right is End -const key_override_t right_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_RIGHT, KC_END); -// Shift Up is PageUp -const key_override_t up_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_UP, KC_PGUP); -// Shift Down is PageDown -const key_override_t down_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOWN, KC_PGDN); - -// This globally defines all key overrides to be used -const key_override_t **key_overrides = (const key_override_t *[]){ - &left_key_override, - &right_key_override, - &up_key_override, - &down_key_override, - NULL // Null terminate the array of overrides! -}; - - -// ###### COMBOS ###### - -enum combos { - CAPS_COMBO, - COMBO_LENGTH -}; - -uint16_t COMBO_LEN = COMBO_LENGTH; - -// Left and right thumb is CapsLock -const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; - -combo_t key_combos[] = { - [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), -}; From 7b48177af5337866a44d3bdaafe17267608d09e8 Mon Sep 17 00:00:00 2001 From: numToStr Date: Thu, 14 Sep 2023 05:40:34 +0000 Subject: [PATCH 04/25] my map --- .../keebit/coral/keymaps/numToStr/keymap.c | 124 ++++++++++++++++++ .../keebit/coral/keymaps/numToStr/rules.mk | 1 + 2 files changed, 125 insertions(+) create mode 100644 keyboards/keebit/coral/keymaps/numToStr/keymap.c create mode 100644 keyboards/keebit/coral/keymaps/numToStr/rules.mk diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c new file mode 100644 index 00000000000..e18e3efd45e --- /dev/null +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -0,0 +1,124 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Left-hand home row mods +#define GUI_A LGUI_T(KC_A) +#define ALT_S LALT_T(KC_S) +#define SFT_D LSFT_T(KC_D) +#define CTL_F LCTL_T(KC_F) + +// Right-hand home row mods +#define CTL_J RCTL_T(KC_J) +#define SFT_K RSFT_T(KC_K) +#define ALT_L LALT_T(KC_L) +#define GUI_SCLN RGUI_T(KC_SCLN) + +// Thumb Keys +#define L_THUMB LT(NavLayer, KC_ENTER) +#define R_THUMB LT(FnLayer, KC_SPACE) + +// Rotary +#define L_ROT TD(TD_MNXT_MPREV) +#define R_ROT TD(TD_MPLY_MUTE) + + +// ###### TAP DANCE ###### + +enum TapDance { + TD_MNXT_MPREV, + TD_MPLY_MUTE, +}; + +// Tap Dance definitions +tap_dance_action_t tap_dance_actions[] = { + // Tap once for Media-Next, twice for Media-Previous + [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + // Tap once for Play/Pause, twice for Audio Mute + [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), +}; + +// ###### LAYERS ###### + +enum Layers { + BaseLayer, + FnLayer, + NavLayer +}; + +enum CustomKeycodes { + KC_LOREM = SAFE_RANGE, + KC_PRVWD, + KC_NXTWD, + KC_LSTRT, + KC_LEND, + KC_DLINE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BaseLayer] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, + _______, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, _______ + ), + [NavLayer] = LAYOUT( + _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, /**/ KC_BRID, KC_BRIU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, SS_LOREM, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ), + [FnLayer] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + SS_LOREM, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ) +}; + +// #if defined(ENCODER_MAP_ENABLE) +// const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +// [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +// }; +// #endif + +// ###### OVERRIDES ###### + +// Shift Left is Home +const key_override_t left_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_LEFT, KC_HOME); +// Shift Right is End +const key_override_t right_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_RIGHT, KC_END); +// Shift Up is PageUp +const key_override_t up_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_UP, KC_PGUP); +// Shift Down is PageDown +const key_override_t down_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOWN, KC_PGDN); + +// This globally defines all key overrides to be used +const key_override_t **key_overrides = (const key_override_t *[]){ + &left_key_override, + &right_key_override, + &up_key_override, + &down_key_override, + NULL // Null terminate the array of overrides! +}; + + +// ###### COMBOS ###### + +enum combos { + CAPS_COMBO, + COMBO_LENGTH +}; + +uint16_t COMBO_LEN = COMBO_LENGTH; + +// Left and right thumb is CapsLock +const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; + +combo_t key_combos[] = { + [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), +}; diff --git a/keyboards/keebit/coral/keymaps/numToStr/rules.mk b/keyboards/keebit/coral/keymaps/numToStr/rules.mk new file mode 100644 index 00000000000..b5ce6bb9933 --- /dev/null +++ b/keyboards/keebit/coral/keymaps/numToStr/rules.mk @@ -0,0 +1 @@ +# ENCODER_MAP_ENABLE = yes From a146cfedbab8d8c5815c88ef88f2fd834f72df3e Mon Sep 17 00:00:00 2001 From: numToStr Date: Fri, 15 Sep 2023 13:12:32 +0530 Subject: [PATCH 05/25] keymap update --- keyboards/keebit/coral/info.json | 3 +- .../keebit/coral/keymaps/default/keymap.c | 193 ++++++++++++++++-- .../keebit/coral/keymaps/numToStr/config.h | 10 + .../keebit/coral/keymaps/numToStr/keymap.c | 87 ++++---- .../keebit/coral/keymaps/numToStr/rules.mk | 7 +- 5 files changed, 239 insertions(+), 61 deletions(-) create mode 100644 keyboards/keebit/coral/keymaps/numToStr/config.h diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index d843077f5b8..6cd84e674d3 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -24,7 +24,8 @@ "device_version": "1.0.0", "pid": "0x0000", "vid": "0xFEED", - "polling_interval": 1 + "polling_interval": 1, + "suspend_wakeup_delay": 500 }, "ws2812": { "driver": "vendor", diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index 514f2e9d31a..81accf563c6 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -4,40 +4,203 @@ #include QMK_KEYBOARD_H // Thumb Keys -#define L_THUMB LT(LowerLayer, KC_ENTER) -#define R_THUMB LT(RaiseLayer, KC_SPACE) +#define L_THUMB LT(_LOWER, KC_ENTER) +#define R_THUMB LT(_RAISE, KC_SPACE) // Rotary #define L_ROT KC_MNXT #define R_ROT KC_MPLY - -enum Layers { - BaseLayer, - LowerLayer, - RaiseLayer +enum coral_layers { + _QWRTY, + _CLMK, + _LOWER, + _RAISE, + _ADJUST, }; +enum custom_keycodes { + KC_QWRTY = SAFE_RANGE, + KC_CLMK, + KC_PRVWD, + KC_NXTWD, + KC_LSTRT, + KC_LEND, + KC_DLINE +}; + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BaseLayer] = LAYOUT( + [_QWRTY] = LAYOUT( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 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_LGUI, KC_LALT, KC_LCTL, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), - [LowerLayer] = LAYOUT( + [_CLMK] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, /**/ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI + ), + [_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, /**/ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, /**/ KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), - [RaiseLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, /**/ KC_PGUP, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_BSPC, - _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, /**/ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, /**/ XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + QK_BOOT, XXXXXXX, KC_QWRTY, KC_CLMK, CG_TOGG, XXXXXXX, /**/ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ) }; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_QWRTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWRTY); + } + return false; + case KC_CLMK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CLMK); + } + return false; + case KC_PRVWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_LEFT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_LEFT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } + } + break; + case KC_NXTWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_RIGHT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_RIGHT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } + } + break; + case KC_LSTRT: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } else { + register_code(KC_HOME); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } else { + unregister_code(KC_HOME); + } + } + break; + case KC_LEND: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } else { + register_code(KC_END); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } else { + unregister_code(KC_END); + } + } + break; + case KC_DLINE: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_BSPC); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_BSPC); + } + break; + case KC_COPY: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_C); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_C); + } + return false; + case KC_PASTE: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_V); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_V); + } + return false; + case KC_CUT: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_X); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_X); + } + return false; + break; + case KC_UNDO: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_Z); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_Z); + } + return false; + } + return true; +} diff --git a/keyboards/keebit/coral/keymaps/numToStr/config.h b/keyboards/keebit/coral/keymaps/numToStr/config.h new file mode 100644 index 00000000000..655b2303b59 --- /dev/null +++ b/keyboards/keebit/coral/keymaps/numToStr/config.h @@ -0,0 +1,10 @@ +// Copyright 2023 numToStr (@numToStr) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Configure the global tapping term (default: 200ms) +#define TAPPING_TERM 225 + +// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. +#define QUICK_TAP_TERM 0 diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index e18e3efd45e..db35263a06f 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -23,8 +23,11 @@ #define L_ROT TD(TD_MNXT_MPREV) #define R_ROT TD(TD_MPLY_MUTE) +// Custom Keys +#define KK_COPY LCTL(KC_C) +#define KK_PASTE RCTL(KC_V) -// ###### TAP DANCE ###### +// ###### Tap-Dance ###### enum TapDance { TD_MNXT_MPREV, @@ -39,7 +42,7 @@ tap_dance_action_t tap_dance_actions[] = { [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), }; -// ###### LAYERS ###### +// ###### Layers ###### enum Layers { BaseLayer, @@ -48,12 +51,7 @@ enum Layers { }; enum CustomKeycodes { - KC_LOREM = SAFE_RANGE, - KC_PRVWD, - KC_NXTWD, - KC_LSTRT, - KC_LEND, - KC_DLINE + KK_LOREM = SAFE_RANGE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -62,52 +60,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, - _______, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, _______ + KK_COPY, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, KK_PASTE ), [NavLayer] = LAYOUT( _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, - _______, _______, _______, _______, _______, _______, /**/ KC_BRID, KC_BRIU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, SS_LOREM, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, KK_LOREM, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), [FnLayer] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - SS_LOREM, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ) }; -// #if defined(ENCODER_MAP_ENABLE) -// const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { -// [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, -// }; -// #endif - -// ###### OVERRIDES ###### - -// Shift Left is Home -const key_override_t left_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_LEFT, KC_HOME); -// Shift Right is End -const key_override_t right_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_RIGHT, KC_END); -// Shift Up is PageUp -const key_override_t up_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_UP, KC_PGUP); -// Shift Down is PageDown -const key_override_t down_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOWN, KC_PGDN); - -// This globally defines all key overrides to be used -const key_override_t **key_overrides = (const key_override_t *[]){ - &left_key_override, - &right_key_override, - &up_key_override, - &down_key_override, - NULL // Null terminate the array of overrides! -}; - - -// ###### COMBOS ###### +// ###### Combos ###### enum combos { CAPS_COMBO, @@ -122,3 +93,31 @@ const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; combo_t key_combos[] = { [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), }; + +// ###### Encoders ####### + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [NavLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [FnLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KK_LOREM: + if (record->event.pressed) { + SEND_STRING("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vitae nibh neque. Etiam sed enim ac ipsum maximus rhoncus id et dui. Nam mi orci, rutrum in ipsum eget, hendrerit aliquam nulla. Maecenas ac nisl nibh. Integer erat mi, molestie vitae aliquet ut, faucibus eget sem. Suspendisse vel lacus interdum, consectetur nisi vitae, vulputate purus. Etiam ut aliquam turpis, id pellentesque ligula. Curabitur semper nisi in facilisis vehicula. Pellentesque felis risus, maximus blandit erat vel, congue sagittis mi. Etiam aliquam arcu sed neque semper laoreet. Sed id posuere libero, sed volutpat sapien."); + } + return false; + // case QK_CAPS_WORD_TOGGLE: + // if (record->event.pressed) { + // rgblight_setrgb_at(RGB_WHITE, 0); + // } + // return true; + default: + return true; + } +}; diff --git a/keyboards/keebit/coral/keymaps/numToStr/rules.mk b/keyboards/keebit/coral/keymaps/numToStr/rules.mk index b5ce6bb9933..3cc5dbe356b 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/rules.mk +++ b/keyboards/keebit/coral/keymaps/numToStr/rules.mk @@ -1 +1,6 @@ -# ENCODER_MAP_ENABLE = yes +ENCODER_MAP_ENABLE = yes +# KEY_OVERRIDE_ENABLE = yes +COMBO_ENABLE = yes +TAP_DANCE_ENABLE = yes +CAPS_WORD_ENABLE = yes +SEND_STRING_ENABLE = yes From 8c73131d4284c11808029e2fab8da60a308a8538 Mon Sep 17 00:00:00 2001 From: numToStr Date: Fri, 15 Sep 2023 20:05:14 +0530 Subject: [PATCH 06/25] more adjustments --- keyboards/keebit/coral/coral.c | 21 ---- keyboards/keebit/coral/info.json | 118 +++++++++--------- .../keebit/coral/keymaps/default/keymap.c | 11 +- .../keebit/coral/keymaps/default/rules.mk | 2 +- .../keebit/coral/keymaps/numToStr/config.h | 2 +- .../keebit/coral/keymaps/numToStr/keymap.c | 32 +++-- 6 files changed, 92 insertions(+), 94 deletions(-) diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c index 0a8cdf525f1..3fe6cfdf0fa 100644 --- a/keyboards/keebit/coral/coral.c +++ b/keyboards/keebit/coral/coral.c @@ -26,24 +26,3 @@ void keyboard_post_init_user(void) { // Enable the LED layers rgblight_layers = my_rgb_layers; } - -// ===== DEFAULT ENCODERS ===== -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { - return false; /* Don't process further events if user function exists and returns false */ - } - if (index == 0) { /* First encoder */ - if (clockwise) { - tap_code(KC_WH_D); - } else { - tap_code(KC_WH_U); - } - } else if (index == 1) { /* Second encoder */ - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - return true; -} diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 6cd84e674d3..a168ca7c033 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -1,6 +1,6 @@ { "manufacturer": "keeb.it!", - "keyboard_name": "coral!56", + "keyboard_name": "coral", "maintainer": "numToStr", "bootloader": "rp2040", "diode_direction": "COL2ROW", @@ -81,68 +81,68 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "1", "matrix": [0, 0], "x": 0, "y": 0 }, - { "label": "2", "matrix": [0, 1], "x": 1, "y": 0 }, - { "label": "3", "matrix": [0, 2], "x": 2, "y": 0 }, - { "label": "4", "matrix": [0, 3], "x": 3, "y": 0 }, - { "label": "5", "matrix": [0, 4], "x": 4, "y": 0 }, - { "label": "6", "matrix": [0, 5], "x": 5, "y": 0 }, - { "label": "7", "matrix": [5, 0], "x": 6, "y": 0 }, - { "label": "8", "matrix": [5, 1], "x": 7, "y": 0 }, - { "label": "9", "matrix": [5, 2], "x": 8, "y": 0 }, - { "label": "0", "matrix": [5, 3], "x": 9, "y": 0 }, - { "label": "-_", "matrix": [5, 4], "x": 10, "y": 0 }, - { "label": "=+", "matrix": [5, 5], "x": 11, "y": 0 }, + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [5, 0], "x": 6, "y": 0 }, + { "matrix": [5, 1], "x": 7, "y": 0 }, + { "matrix": [5, 2], "x": 8, "y": 0 }, + { "matrix": [5, 3], "x": 9, "y": 0 }, + { "matrix": [5, 4], "x": 10, "y": 0 }, + { "matrix": [5, 5], "x": 11, "y": 0 }, - { "label": "`~", "matrix": [1, 0], "x": 0, "y": 1 }, - { "label": "Q", "matrix": [1, 1], "x": 1, "y": 1 }, - { "label": "W", "matrix": [1, 2], "x": 2, "y": 1 }, - { "label": "E", "matrix": [1, 3], "x": 3, "y": 1 }, - { "label": "R", "matrix": [1, 4], "x": 4, "y": 1 }, - { "label": "T", "matrix": [1, 5], "x": 5, "y": 1 }, - { "label": "Y", "matrix": [6, 0], "x": 6, "y": 1 }, - { "label": "U", "matrix": [6, 1], "x": 7, "y": 1 }, - { "label": "I", "matrix": [6, 2], "x": 8, "y": 1 }, - { "label": "O", "matrix": [6, 3], "x": 9, "y": 1 }, - { "label": "P", "matrix": [6, 4], "x": 10, "y": 1 }, - { "label": "[{", "matrix": [6, 5], "x": 11, "y": 1 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1 }, + { "matrix": [1, 5], "x": 5, "y": 1 }, + { "matrix": [6, 0], "x": 6, "y": 1 }, + { "matrix": [6, 1], "x": 7, "y": 1 }, + { "matrix": [6, 2], "x": 8, "y": 1 }, + { "matrix": [6, 3], "x": 9, "y": 1 }, + { "matrix": [6, 4], "x": 10, "y": 1 }, + { "matrix": [6, 5], "x": 11, "y": 1 }, - { "label": "\\|", "matrix": [2, 0], "x": 0, "y": 2 }, - { "label": "A", "matrix": [2, 1], "x": 1, "y": 2 }, - { "label": "S", "matrix": [2, 2], "x": 2, "y": 2 }, - { "label": "D", "matrix": [2, 3], "x": 3, "y": 2 }, - { "label": "F", "matrix": [2, 4], "x": 4, "y": 2 }, - { "label": "G", "matrix": [2, 5], "x": 5, "y": 2 }, - { "label": "H", "matrix": [7, 0], "x": 6, "y": 2 }, - { "label": "J", "matrix": [7, 1], "x": 7, "y": 2 }, - { "label": "K", "matrix": [7, 2], "x": 8, "y": 2 }, - { "label": "L", "matrix": [7, 3], "x": 9, "y": 2 }, - { "label": ";:", "matrix": [7, 4], "x": 10, "y": 2 }, - { "label": "'\"", "matrix": [7, 5], "x": 11, "y": 2 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2 }, + { "matrix": [2, 5], "x": 5, "y": 2 }, + { "matrix": [7, 0], "x": 6, "y": 2 }, + { "matrix": [7, 1], "x": 7, "y": 2 }, + { "matrix": [7, 2], "x": 8, "y": 2 }, + { "matrix": [7, 3], "x": 9, "y": 2 }, + { "matrix": [7, 4], "x": 10, "y": 2 }, + { "matrix": [7, 5], "x": 11, "y": 2 }, - { "label": "TAB", "matrix": [3, 0], "x": 0, "y": 3 }, - { "label": "Z", "matrix": [3, 1], "x": 1, "y": 3 }, - { "label": "X", "matrix": [3, 2], "x": 2, "y": 3 }, - { "label": "C", "matrix": [3, 3], "x": 3, "y": 3 }, - { "label": "V", "matrix": [3, 4], "x": 4, "y": 3 }, - { "label": "B", "matrix": [3, 5], "x": 5, "y": 3 }, - { "label": "N", "matrix": [8, 0], "x": 6, "y": 3 }, - { "label": "M", "matrix": [8, 1], "x": 7, "y": 3 }, - { "label": ",<", "matrix": [8, 2], "x": 8, "y": 3 }, - { "label": ".>", "matrix": [8, 3], "x": 9, "y": 3 }, - { "label": "/?", "matrix": [8, 4], "x": 10, "y": 3 }, - { "label": "]{", "matrix": [8, 5], "x": 11, "y": 3 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3 }, + { "matrix": [3, 5], "x": 5, "y": 3 }, + { "matrix": [8, 0], "x": 6, "y": 3 }, + { "matrix": [8, 1], "x": 7, "y": 3 }, + { "matrix": [8, 2], "x": 8, "y": 3 }, + { "matrix": [8, 3], "x": 9, "y": 3 }, + { "matrix": [8, 4], "x": 10, "y": 3 }, + { "matrix": [8, 5], "x": 11, "y": 3 }, - { "label": "_______", "matrix": [4, 1], "x": 1, "y": 4 }, - { "label": "PSCR", "matrix": [4, 2], "x": 2, "y": 4 }, - { "label": "ESC", "matrix": [4, 3], "x": 3, "y": 4 }, - { "label": "ENTER", "matrix": [4, 4], "x": 4, "y": 4 }, - { "label": "L_ROT", "matrix": [4, 5], "x": 5, "y": 4 }, - { "label": "R_ROT", "matrix": [9, 0], "x": 6, "y": 4 }, - { "label": "SPACE", "matrix": [9, 1], "x": 7, "y": 4 }, - { "label": "BSPC", "matrix": [9, 2], "x": 8, "y": 4 }, - { "label": "DEL", "matrix": [9, 3], "x": 9, "y": 4 }, - { "label": "_______", "matrix": [9, 4], "x": 10, "y": 4 } + { "matrix": [4, 1], "x": 1, "y": 4 }, + { "matrix": [4, 2], "x": 2, "y": 4 }, + { "matrix": [4, 3], "x": 3, "y": 4 }, + { "matrix": [4, 4], "x": 4, "y": 4 }, + { "matrix": [4, 5], "x": 5, "y": 4 }, + { "matrix": [9, 0], "x": 6, "y": 4 }, + { "matrix": [9, 1], "x": 7, "y": 4 }, + { "matrix": [9, 2], "x": 8, "y": 4 }, + { "matrix": [9, 3], "x": 9, "y": 4 }, + { "matrix": [9, 4], "x": 10, "y": 4 } ] } } diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index 81accf563c6..e9ffc0c5896 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -19,7 +19,7 @@ enum coral_layers { _ADJUST, }; -enum custom_keycodes { +enum coral_keycodes { KC_QWRTY = SAFE_RANGE, KC_CLMK, KC_PRVWD, @@ -68,6 +68,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_QWRTY] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_CLMK] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [_RAISE] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [_ADJUST] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/keebit/coral/keymaps/default/rules.mk b/keyboards/keebit/coral/keymaps/default/rules.mk index b5ce6bb9933..ee325681483 100644 --- a/keyboards/keebit/coral/keymaps/default/rules.mk +++ b/keyboards/keebit/coral/keymaps/default/rules.mk @@ -1 +1 @@ -# ENCODER_MAP_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keebit/coral/keymaps/numToStr/config.h b/keyboards/keebit/coral/keymaps/numToStr/config.h index 655b2303b59..a373db3f912 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/config.h +++ b/keyboards/keebit/coral/keymaps/numToStr/config.h @@ -4,7 +4,7 @@ #pragma once // Configure the global tapping term (default: 200ms) -#define TAPPING_TERM 225 +#define TAPPING_TERM 220 // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index db35263a06f..ed7033d6283 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -26,10 +26,11 @@ // Custom Keys #define KK_COPY LCTL(KC_C) #define KK_PASTE RCTL(KC_V) +#define KK_MOUSE MO(MouseLayer) // ###### Tap-Dance ###### -enum TapDance { +enum coral_tapdance { TD_MNXT_MPREV, TD_MPLY_MUTE, }; @@ -44,13 +45,14 @@ tap_dance_action_t tap_dance_actions[] = { // ###### Layers ###### -enum Layers { +enum coral_layers { BaseLayer, + NavLayer, + MouseLayer, FnLayer, - NavLayer }; -enum CustomKeycodes { +enum coral_keycodes { KK_LOREM = SAFE_RANGE, }; @@ -63,10 +65,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KK_COPY, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, KK_PASTE ), [NavLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, - _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRID, KC_BRIU, - _______, _______, _______, _______, _______, _______, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, KK_LOREM, + _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRID, KC_BRIU, + _______, _______, _______, _______, _______, KK_MOUSE, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, KK_LOREM, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + ), + [MouseLayer] = LAYOUT( + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), [FnLayer] = LAYOUT( @@ -75,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ - ) + ), }; // ###### Combos ###### -enum combos { +enum coral_combos { CAPS_COMBO, COMBO_LENGTH }; @@ -98,8 +107,9 @@ combo_t key_combos[] = { #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [NavLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [MouseLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [FnLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, }; #endif From 3765c5679edab1d5e0442591dbb19d2db54997b3 Mon Sep 17 00:00:00 2001 From: numToStr Date: Tue, 19 Sep 2023 20:05:14 +0530 Subject: [PATCH 07/25] fix: keyboard not waking up on boot --- keyboards/keebit/coral/info.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index a168ca7c033..efa2e3152d3 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -24,6 +24,7 @@ "device_version": "1.0.0", "pid": "0x0000", "vid": "0xFEED", + "force_nkro": true, "polling_interval": 1, "suspend_wakeup_delay": 500 }, @@ -59,7 +60,8 @@ "enabled": true, "soft_serial_pin": "GP13", "transport": { - "protocol": "serial" + "protocol": "serial", + "watchdog": true }, "matrix_pins": { "right": { @@ -74,7 +76,7 @@ }, "usb_detect": { "enabled": true, - "timeout": 2500, + "timeout": 5000, "polling_interval": 1 } }, From be5b605dcd0cce289b38cee29cae588b98bd701f Mon Sep 17 00:00:00 2001 From: numToStr Date: Tue, 19 Sep 2023 20:05:34 +0530 Subject: [PATCH 08/25] keymap update --- keyboards/keebit/coral/keymaps/numToStr/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index ed7033d6283..79bb26a31ba 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -65,25 +65,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KK_COPY, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, KK_PASTE ), [NavLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, - _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRID, KC_BRIU, + _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLU, KC_VOLD, + _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRIU, KC_BRID, _______, _______, _______, _______, _______, KK_MOUSE, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, KK_LOREM, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, _______, _______, XXXXXXX, _______, /**/ _______, _______, _______, _______, _______ ), [MouseLayer] = LAYOUT( _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, /**/ _______, KC_BTN1, KC_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, XXXXXXX, /**/ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, _______, _______, XXXXXXX, _______, /**/ _______, _______, _______, _______, _______ ), [FnLayer] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, /**/ _______, XXXXXXX, _______, _______, _______ ), }; From e2e382642ff031b773e4025e687e62c7df28cc3f Mon Sep 17 00:00:00 2001 From: numToStr Date: Tue, 19 Sep 2023 20:52:06 +0530 Subject: [PATCH 09/25] rgb sync split and bootl combo --- keyboards/keebit/coral/info.json | 1 + keyboards/keebit/coral/keymaps/numToStr/keymap.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index efa2e3152d3..c71637ce660 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -33,6 +33,7 @@ "pin": "GP16" }, "rgblight": { + "split": true, "led_count": 1, "hue_steps": 4, "saturation_steps": 5, diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index 79bb26a31ba..b3b30f20d61 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -27,6 +27,9 @@ #define KK_COPY LCTL(KC_C) #define KK_PASTE RCTL(KC_V) #define KK_MOUSE MO(MouseLayer) +#define KK_7 KC_7 +#define KK_8 KC_8 +#define KK_9 KC_9 // ###### Tap-Dance ###### @@ -58,7 +61,7 @@ enum coral_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BaseLayer] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KK_7, KK_8, KK_9, KC_0, KC_MINUS, KC_EQUAL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, @@ -91,6 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { enum coral_combos { CAPS_COMBO, + BOOTL_COMBO, COMBO_LENGTH }; @@ -98,9 +102,11 @@ uint16_t COMBO_LEN = COMBO_LENGTH; // Left and right thumb is CapsLock const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; +const uint16_t PROGMEM bootl_combo[] = {KK_7, KK_8, KK_9, COMBO_END}; combo_t key_combos[] = { [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), + [BOOTL_COMBO] = COMBO(bootl_combo, QK_BOOTLOADER), }; // ###### Encoders ####### From e7f9630e750be7ad47e4c0feae2ff78027f0d6d3 Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 20 Sep 2023 18:04:53 +0530 Subject: [PATCH 10/25] add caps_word indicator --- keyboards/keebit/coral/coral.c | 22 ++++++++++++++----- .../keebit/coral/keymaps/numToStr/keymap.c | 5 ----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c index 3fe6cfdf0fa..fcc528c9ce5 100644 --- a/keyboards/keebit/coral/coral.c +++ b/keyboards/keebit/coral/coral.c @@ -5,24 +5,34 @@ // ===== LED/RGB INDICATOR ===== enum RGB_LAYERS { - RGBL_CAPS = 0 + RGBL_CAPSL = 0, + RGBL_CAPSW = 1, }; -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( +const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, RGBLED_NUM, HSV_BLUE} ); +const rgblight_segment_t PROGMEM capsword_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_WHITE} +); + // Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - [RGBL_CAPS] = my_capslock_layer +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + [RGBL_CAPSL] = capslock_layer, + [RGBL_CAPSW] = capsword_layer ); bool led_update_user(led_t led_state) { - rgblight_set_layer_state(RGBL_CAPS, led_state.caps_lock); + rgblight_set_layer_state(RGBL_CAPSL, led_state.caps_lock); return true; } +void caps_word_set_user(bool active) { + rgblight_set_layer_state(RGBL_CAPSW, active); +} + void keyboard_post_init_user(void) { // Enable the LED layers - rgblight_layers = my_rgb_layers; + rgblight_layers = rgb_layers; } diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index b3b30f20d61..fa165fd8a90 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -128,11 +128,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vitae nibh neque. Etiam sed enim ac ipsum maximus rhoncus id et dui. Nam mi orci, rutrum in ipsum eget, hendrerit aliquam nulla. Maecenas ac nisl nibh. Integer erat mi, molestie vitae aliquet ut, faucibus eget sem. Suspendisse vel lacus interdum, consectetur nisi vitae, vulputate purus. Etiam ut aliquam turpis, id pellentesque ligula. Curabitur semper nisi in facilisis vehicula. Pellentesque felis risus, maximus blandit erat vel, congue sagittis mi. Etiam aliquam arcu sed neque semper laoreet. Sed id posuere libero, sed volutpat sapien."); } return false; - // case QK_CAPS_WORD_TOGGLE: - // if (record->event.pressed) { - // rgblight_setrgb_at(RGB_WHITE, 0); - // } - // return true; default: return true; } From 28f7815f64296e4e45f023f57854b9476f12f42c Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 20 Sep 2023 18:18:15 +0530 Subject: [PATCH 11/25] rgblight adjustments --- keyboards/keebit/coral/info.json | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index c71637ce660..2f1ebe00d98 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -35,22 +35,15 @@ "rgblight": { "split": true, "led_count": 1, - "hue_steps": 4, - "saturation_steps": 5, - "brightness_steps": 5, - "max_brightness": 50, + "hue_steps": 2, + "saturation_steps": 2, + "brightness_steps": 2, + "max_brightness": 20, "sleep": false, "layers": { "blink": true, "enabled": true, - "max": 22, "override_rgb": true - }, - "animations": { - "breathing": true, - "christmas": true, - "rainbow_swirl": true, - "rgb_test": true } }, "encoder": { From ddaa014c70ab2c13974516e2312d6ea9c500e245 Mon Sep 17 00:00:00 2001 From: numToStr Date: Mon, 25 Sep 2023 19:06:22 +0530 Subject: [PATCH 12/25] copy and cut --- keyboards/keebit/coral/keymaps/numToStr/keymap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index fa165fd8a90..bb4fd4389fc 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -24,18 +24,19 @@ #define R_ROT TD(TD_MPLY_MUTE) // Custom Keys -#define KK_COPY LCTL(KC_C) +#define KK_COPY TD(TD_COPY_CUT) #define KK_PASTE RCTL(KC_V) #define KK_MOUSE MO(MouseLayer) -#define KK_7 KC_7 -#define KK_8 KC_8 -#define KK_9 KC_9 +#define BOOTL_1 KC_7 +#define BOOTL_2 KC_8 +#define BOOTL_3 KC_9 // ###### Tap-Dance ###### enum coral_tapdance { TD_MNXT_MPREV, TD_MPLY_MUTE, + TD_COPY_CUT, }; // Tap Dance definitions @@ -44,6 +45,8 @@ tap_dance_action_t tap_dance_actions[] = { [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), // Tap once for Play/Pause, twice for Audio Mute [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), + // Tap once copy, twice for cut + [TD_COPY_CUT] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), LCTL(KC_X)), }; // ###### Layers ###### @@ -61,7 +64,7 @@ enum coral_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BaseLayer] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ KK_7, KK_8, KK_9, KC_0, KC_MINUS, KC_EQUAL, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ BOOTL_1, BOOTL_2, BOOTL_3, KC_0, KC_MINUS, KC_EQUAL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, @@ -102,7 +105,7 @@ uint16_t COMBO_LEN = COMBO_LENGTH; // Left and right thumb is CapsLock const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; -const uint16_t PROGMEM bootl_combo[] = {KK_7, KK_8, KK_9, COMBO_END}; +const uint16_t PROGMEM bootl_combo[] = {BOOTL_1, BOOTL_2, BOOTL_3, COMBO_END}; combo_t key_combos[] = { [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), From a9f57596974c0922c9c0ab3ff2fdb511a01be4db Mon Sep 17 00:00:00 2001 From: numToStr Date: Fri, 29 Sep 2023 21:36:53 +0530 Subject: [PATCH 13/25] readme --- keyboards/keebit/coral/readme.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/keyboards/keebit/coral/readme.md b/keyboards/keebit/coral/readme.md index 99566c97a40..005e220796e 100644 --- a/keyboards/keebit/coral/readme.md +++ b/keyboards/keebit/coral/readme.md @@ -1,12 +1,12 @@ -# keebit/coral +# Coral | Split Keyboard ![keebit/coral](imgur.com image replace me!) -*A short description of the keyboard/project* +_A 58 keys (56 MX + 2 EC11) 5x6 column-staggered wired split keyboard using Waveshare RP2040-Zero inspired by corne and sofle_v1_ -* Keyboard Maintainer: [numToStr](https://github.com/numToStr) -* Hardware Supported: *The PCBs, controllers supported* -* Hardware Availability: *Links to where you can find this hardware* +- Keyboard Maintainer: [numToStr](https://github.com/numToStr) +- Hardware Supported: _Coral PCB, Waveshare RP2040-Zero_ +- Hardware Availability: _https://discord.gg/TkazrGqKYn_ Make example for this keyboard (after setting up your build environment): @@ -22,6 +22,8 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader in 3 ways: -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available +- **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +- **Physical reset button**: + - Press and hold the `BOOT` button on the MCU while connecting the board. + - Double press the `RESET` button on the MCU when connected, if you already flashed the firmware. +- **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From 65fd3eb043c7f5d64187cf76410c15d6885c2e56 Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 4 Oct 2023 19:10:36 +0530 Subject: [PATCH 14/25] animation might be handy for rpzero-matrix --- keyboards/keebit/coral/info.json | 7 +++++++ keyboards/keebit/coral/keymaps/numToStr/keymap.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 2f1ebe00d98..8bdf9f8d553 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -44,6 +44,13 @@ "blink": true, "enabled": true, "override_rgb": true + }, + "animations": { + "breathing": true, + "christmas": true, + "rainbow_swirl": true, + "snake": true, + "twinkle": true } }, "encoder": { diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c index bb4fd4389fc..ca89ae72b53 100644 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ b/keyboards/keebit/coral/keymaps/numToStr/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [NavLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [MouseLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, - [FnLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [FnLayer] = { ENCODER_CCW_CW(RGB_MODE_REVERSE, RGB_MODE_FORWARD), ENCODER_CCW_CW(_______, _______) }, }; #endif From 8d349525814466f32a5e6701251d183adfb083a7 Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 7 Oct 2023 15:28:32 +0530 Subject: [PATCH 15/25] qmk config layout --- keyboards/keebit/coral/info.json | 110 +++++++++++++++---------------- keyboards/keebit/coral/readme.md | 2 +- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 8bdf9f8d553..7796fca0a2a 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -84,68 +84,68 @@ "layouts": { "LAYOUT": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0 }, - { "matrix": [0, 1], "x": 1, "y": 0 }, - { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 0], "x": 0, "y": 0.375 }, + { "matrix": [0, 1], "x": 1, "y": 0.375 }, + { "matrix": [0, 2], "x": 2, "y": 0.125 }, { "matrix": [0, 3], "x": 3, "y": 0 }, - { "matrix": [0, 4], "x": 4, "y": 0 }, - { "matrix": [0, 5], "x": 5, "y": 0 }, - { "matrix": [5, 0], "x": 6, "y": 0 }, - { "matrix": [5, 1], "x": 7, "y": 0 }, - { "matrix": [5, 2], "x": 8, "y": 0 }, - { "matrix": [5, 3], "x": 9, "y": 0 }, - { "matrix": [5, 4], "x": 10, "y": 0 }, - { "matrix": [5, 5], "x": 11, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.125 }, + { "matrix": [0, 5], "x": 5, "y": 0.25 }, + { "matrix": [5, 0], "x": 11, "y": 0.25 }, + { "matrix": [5, 1], "x": 12, "y": 0.125 }, + { "matrix": [5, 2], "x": 13, "y": 0 }, + { "matrix": [5, 3], "x": 14, "y": 0.125 }, + { "matrix": [5, 4], "x": 15, "y": 0.375 }, + { "matrix": [5, 5], "x": 16, "y": 0.375 }, - { "matrix": [1, 0], "x": 0, "y": 1 }, - { "matrix": [1, 1], "x": 1, "y": 1 }, - { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 0], "x": 0, "y": 1.375 }, + { "matrix": [1, 1], "x": 1, "y": 1.375 }, + { "matrix": [1, 2], "x": 2, "y": 1.125 }, { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [1, 4], "x": 4, "y": 1 }, - { "matrix": [1, 5], "x": 5, "y": 1 }, - { "matrix": [6, 0], "x": 6, "y": 1 }, - { "matrix": [6, 1], "x": 7, "y": 1 }, - { "matrix": [6, 2], "x": 8, "y": 1 }, - { "matrix": [6, 3], "x": 9, "y": 1 }, - { "matrix": [6, 4], "x": 10, "y": 1 }, - { "matrix": [6, 5], "x": 11, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.125 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [6, 0], "x": 11, "y": 1.25 }, + { "matrix": [6, 1], "x": 12, "y": 1.125 }, + { "matrix": [6, 2], "x": 13, "y": 1 }, + { "matrix": [6, 3], "x": 14, "y": 1.125 }, + { "matrix": [6, 4], "x": 15, "y": 1.375 }, + { "matrix": [6, 5], "x": 16, "y": 1.375 }, - { "matrix": [2, 0], "x": 0, "y": 2 }, - { "matrix": [2, 1], "x": 1, "y": 2 }, - { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 0], "x": 0, "y": 2.375 }, + { "matrix": [2, 1], "x": 1, "y": 2.375 }, + { "matrix": [2, 2], "x": 2, "y": 2.125 }, { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [2, 4], "x": 4, "y": 2 }, - { "matrix": [2, 5], "x": 5, "y": 2 }, - { "matrix": [7, 0], "x": 6, "y": 2 }, - { "matrix": [7, 1], "x": 7, "y": 2 }, - { "matrix": [7, 2], "x": 8, "y": 2 }, - { "matrix": [7, 3], "x": 9, "y": 2 }, - { "matrix": [7, 4], "x": 10, "y": 2 }, - { "matrix": [7, 5], "x": 11, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.125 }, + { "matrix": [2, 5], "x": 5, "y": 2.25 }, + { "matrix": [7, 0], "x": 11, "y": 2.25 }, + { "matrix": [7, 1], "x": 12, "y": 2.125 }, + { "matrix": [7, 2], "x": 13, "y": 2 }, + { "matrix": [7, 3], "x": 14, "y": 2.125 }, + { "matrix": [7, 4], "x": 15, "y": 2.375 }, + { "matrix": [7, 5], "x": 16, "y": 2.375 }, - { "matrix": [3, 0], "x": 0, "y": 3 }, - { "matrix": [3, 1], "x": 1, "y": 3 }, - { "matrix": [3, 2], "x": 2, "y": 3 }, - { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [3, 4], "x": 4, "y": 3 }, - { "matrix": [3, 5], "x": 5, "y": 3 }, - { "matrix": [8, 0], "x": 6, "y": 3 }, - { "matrix": [8, 1], "x": 7, "y": 3 }, - { "matrix": [8, 2], "x": 8, "y": 3 }, - { "matrix": [8, 3], "x": 9, "y": 3 }, - { "matrix": [8, 4], "x": 10, "y": 3 }, - { "matrix": [8, 5], "x": 11, "y": 3 }, + { "matrix": [3, 0], "x": 0, "y": 3.375 }, + { "matrix": [3, 1], "x": 1, "y": 3.375 }, + { "matrix": [3, 2], "x": 2, "y": 3.125 }, + { "matrix": [3, 3], "x": 3, "y": 5 }, + { "matrix": [3, 4], "x": 4, "y": 3.125 }, + { "matrix": [3, 5], "x": 5, "y": 3.25 }, + { "matrix": [8, 0], "x": 11, "y": 3.25 }, + { "matrix": [8, 1], "x": 12, "y": 3.125 }, + { "matrix": [8, 2], "x": 13, "y": 3 }, + { "matrix": [8, 3], "x": 14, "y": 3.125 }, + { "matrix": [8, 4], "x": 15, "y": 3.375 }, + { "matrix": [8, 5], "x": 16, "y": 3.375 }, - { "matrix": [4, 1], "x": 1, "y": 4 }, - { "matrix": [4, 2], "x": 2, "y": 4 }, - { "matrix": [4, 3], "x": 3, "y": 4 }, - { "matrix": [4, 4], "x": 4, "y": 4 }, - { "matrix": [4, 5], "x": 5, "y": 4 }, - { "matrix": [9, 0], "x": 6, "y": 4 }, - { "matrix": [9, 1], "x": 7, "y": 4 }, - { "matrix": [9, 2], "x": 8, "y": 4 }, - { "matrix": [9, 3], "x": 9, "y": 4 }, - { "matrix": [9, 4], "x": 10, "y": 4 } + { "matrix": [4, 1], "x": 2.375, "y": 4.125 }, + { "matrix": [4, 2], "x": -0.01, "y": 4.75 }, + { "matrix": [4, 3], "x": 0.165, "y": 5.465 }, + { "matrix": [4, 4], "x": -0.55, "y": 5.865, "w": 1.5 }, + { "matrix": [4, 5], "x": 6.75, "y": 2.75 }, + { "matrix": [9, 0], "x": 9.25, "y": 2.75 }, + { "matrix": [9, 1], "x": 0.8, "y": 1.74, "w": 1.5 }, + { "matrix": [9, 2], "x": 6.75, "y": 7.99 }, + { "matrix": [9, 3], "x": 8.972, "y": 9.64 }, + { "matrix": [9, 4], "x": 13.625, "y": 4.125 } ] } } diff --git a/keyboards/keebit/coral/readme.md b/keyboards/keebit/coral/readme.md index 005e220796e..720f9221956 100644 --- a/keyboards/keebit/coral/readme.md +++ b/keyboards/keebit/coral/readme.md @@ -1,6 +1,6 @@ # Coral | Split Keyboard -![keebit/coral](imgur.com image replace me!) +![keebit/coral](https://user-images.githubusercontent.com/24727447/273894600-d73eba98-1507-43d7-8015-42daecd5f762.jpg) _A 58 keys (56 MX + 2 EC11) 5x6 column-staggered wired split keyboard using Waveshare RP2040-Zero inspired by corne and sofle_v1_ From f39a4b616445996b712f8890e8cde94bcdc33f60 Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 11 Oct 2023 19:57:57 +0530 Subject: [PATCH 16/25] resolve pr review comments --- keyboards/keebit/coral/config.h | 18 +-- keyboards/keebit/coral/coral.c | 12 +- keyboards/keebit/coral/coral.h | 6 - keyboards/keebit/coral/info.json | 5 +- .../keebit/coral/keymaps/default/keymap.c | 136 ++--------------- .../keebit/coral/keymaps/numToStr/config.h | 10 -- .../keebit/coral/keymaps/numToStr/keymap.c | 137 ------------------ .../keebit/coral/keymaps/numToStr/rules.mk | 6 - keyboards/keebit/coral/readme.md | 2 +- keyboards/keebit/coral/rules.mk | 1 - 10 files changed, 21 insertions(+), 312 deletions(-) delete mode 100644 keyboards/keebit/coral/coral.h delete mode 100644 keyboards/keebit/coral/keymaps/numToStr/config.h delete mode 100644 keyboards/keebit/coral/keymaps/numToStr/keymap.c delete mode 100644 keyboards/keebit/coral/keymaps/numToStr/rules.mk diff --git a/keyboards/keebit/coral/config.h b/keyboards/keebit/coral/config.h index 61453239b34..fcd7ca8ed0b 100644 --- a/keyboards/keebit/coral/config.h +++ b/keyboards/keebit/coral/config.h @@ -3,24 +3,8 @@ #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 220U #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP16 #define WS2812_PIO_USE_PIO1 diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c index fcc528c9ce5..4f8a157b299 100644 --- a/keyboards/keebit/coral/coral.c +++ b/keyboards/keebit/coral/coral.c @@ -1,7 +1,7 @@ // Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H +#include "quantum.h" // ===== LED/RGB INDICATOR ===== enum RGB_LAYERS { @@ -23,16 +23,20 @@ const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( [RGBL_CAPSW] = capsword_layer ); -bool led_update_user(led_t led_state) { +bool led_update_kb(led_t led_state) { + if (!led_update_user(led_state)) { + return false; + } rgblight_set_layer_state(RGBL_CAPSL, led_state.caps_lock); return true; } -void caps_word_set_user(bool active) { +__attribute__((weak)) void caps_word_set_user(bool active) { rgblight_set_layer_state(RGBL_CAPSW, active); } -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { // Enable the LED layers rgblight_layers = rgb_layers; + keyboard_post_init_user(); } diff --git a/keyboards/keebit/coral/coral.h b/keyboards/keebit/coral/coral.h deleted file mode 100644 index 26d9c6f0fbf..00000000000 --- a/keyboards/keebit/coral/coral.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2023 numToStr (@numToStr) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 7796fca0a2a..89d4bc23e40 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -23,10 +23,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED", - "force_nkro": true, - "polling_interval": 1, - "suspend_wakeup_delay": 500 + "vid": "0xFEED" }, "ws2812": { "driver": "vendor", diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index e9ffc0c5896..8d1ab097dfd 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -11,6 +11,15 @@ #define L_ROT KC_MNXT #define R_ROT KC_MPLY +// Custom Mod Keys +#define KC_PRVWD C(KC_LEFT) +#define KC_NXTWD C(KC_RIGHT) +#define KC_DLINE C(KC_BSPC) +#define KC_COPY C(KC_C) +#define KC_PASTE C(KC_V) +#define KC_CUT C(KC_X) +#define KC_UNDO C(KC_Z) + enum coral_layers { _QWRTY, _CLMK, @@ -22,11 +31,6 @@ enum coral_layers { enum coral_keycodes { KC_QWRTY = SAFE_RANGE, KC_CLMK, - KC_PRVWD, - KC_NXTWD, - KC_LSTRT, - KC_LEND, - KC_DLINE }; @@ -56,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, + _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), [_ADJUST] = LAYOUT( @@ -90,126 +94,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_CLMK); } return false; - case KC_PRVWD: - if (record->event.pressed) { - if (keymap_config.swap_lctl_lgui) { - register_mods(mod_config(MOD_LALT)); - register_code(KC_LEFT); - } else { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_LEFT); - } - } else { - if (keymap_config.swap_lctl_lgui) { - unregister_mods(mod_config(MOD_LALT)); - unregister_code(KC_LEFT); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_LEFT); - } - } - break; - case KC_NXTWD: - if (record->event.pressed) { - if (keymap_config.swap_lctl_lgui) { - register_mods(mod_config(MOD_LALT)); - register_code(KC_RIGHT); - } else { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_RIGHT); - } - } else { - if (keymap_config.swap_lctl_lgui) { - unregister_mods(mod_config(MOD_LALT)); - unregister_code(KC_RIGHT); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_RIGHT); - } - } - break; - case KC_LSTRT: - if (record->event.pressed) { - if (keymap_config.swap_lctl_lgui) { - //CMD-arrow on Mac, but we have CTL and GUI swapped - register_mods(mod_config(MOD_LCTL)); - register_code(KC_LEFT); - } else { - register_code(KC_HOME); - } - } else { - if (keymap_config.swap_lctl_lgui) { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_LEFT); - } else { - unregister_code(KC_HOME); - } - } - break; - case KC_LEND: - if (record->event.pressed) { - if (keymap_config.swap_lctl_lgui) { - //CMD-arrow on Mac, but we have CTL and GUI swapped - register_mods(mod_config(MOD_LCTL)); - register_code(KC_RIGHT); - } else { - register_code(KC_END); - } - } else { - if (keymap_config.swap_lctl_lgui) { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_RIGHT); - } else { - unregister_code(KC_END); - } - } - break; - case KC_DLINE: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_BSPC); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_BSPC); - } - break; - case KC_COPY: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_C); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_C); - } - return false; - case KC_PASTE: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_V); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_V); - } - return false; - case KC_CUT: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_X); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_X); - } - return false; - break; - case KC_UNDO: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_Z); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_Z); - } - return false; } return true; } diff --git a/keyboards/keebit/coral/keymaps/numToStr/config.h b/keyboards/keebit/coral/keymaps/numToStr/config.h deleted file mode 100644 index a373db3f912..00000000000 --- a/keyboards/keebit/coral/keymaps/numToStr/config.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2023 numToStr (@numToStr) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -// Configure the global tapping term (default: 200ms) -#define TAPPING_TERM 220 - -// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -#define QUICK_TAP_TERM 0 diff --git a/keyboards/keebit/coral/keymaps/numToStr/keymap.c b/keyboards/keebit/coral/keymaps/numToStr/keymap.c deleted file mode 100644 index ca89ae72b53..00000000000 --- a/keyboards/keebit/coral/keymaps/numToStr/keymap.c +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -// Left-hand home row mods -#define GUI_A LGUI_T(KC_A) -#define ALT_S LALT_T(KC_S) -#define SFT_D LSFT_T(KC_D) -#define CTL_F LCTL_T(KC_F) - -// Right-hand home row mods -#define CTL_J RCTL_T(KC_J) -#define SFT_K RSFT_T(KC_K) -#define ALT_L LALT_T(KC_L) -#define GUI_SCLN RGUI_T(KC_SCLN) - -// Thumb Keys -#define L_THUMB LT(NavLayer, KC_ENTER) -#define R_THUMB LT(FnLayer, KC_SPACE) - -// Rotary -#define L_ROT TD(TD_MNXT_MPREV) -#define R_ROT TD(TD_MPLY_MUTE) - -// Custom Keys -#define KK_COPY TD(TD_COPY_CUT) -#define KK_PASTE RCTL(KC_V) -#define KK_MOUSE MO(MouseLayer) -#define BOOTL_1 KC_7 -#define BOOTL_2 KC_8 -#define BOOTL_3 KC_9 - -// ###### Tap-Dance ###### - -enum coral_tapdance { - TD_MNXT_MPREV, - TD_MPLY_MUTE, - TD_COPY_CUT, -}; - -// Tap Dance definitions -tap_dance_action_t tap_dance_actions[] = { - // Tap once for Media-Next, twice for Media-Previous - [TD_MNXT_MPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), - // Tap once for Play/Pause, twice for Audio Mute - [TD_MPLY_MUTE] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_MUTE), - // Tap once copy, twice for cut - [TD_COPY_CUT] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), LCTL(KC_X)), -}; - -// ###### Layers ###### - -enum coral_layers { - BaseLayer, - NavLayer, - MouseLayer, - FnLayer, -}; - -enum coral_keycodes { - KK_LOREM = SAFE_RANGE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BaseLayer] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, /**/ BOOTL_1, BOOTL_2, BOOTL_3, KC_0, KC_MINUS, KC_EQUAL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_GRV, GUI_A, ALT_S, SFT_D, CTL_F, KC_G, /**/ KC_H, CTL_J, SFT_K, ALT_L, GUI_SCLN, KC_QUOTE, - KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RBRC, - KK_COPY, KC_PSCR, KC_ESC, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_BSPC, KC_DEL, KK_PASTE - ), - [NavLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLU, KC_VOLD, - _______, _______, _______, _______, _______, _______, /**/ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BRIU, KC_BRID, - _______, _______, _______, _______, _______, KK_MOUSE, /**/ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, KK_LOREM, - _______, _______, _______, XXXXXXX, _______, /**/ _______, _______, _______, _______, _______ - ), - [MouseLayer] = LAYOUT( - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, KC_BTN1, KC_BTN2, _______, _______, _______, - _______, _______, _______, _______, _______, XXXXXXX, /**/ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, XXXXXXX, _______, /**/ _______, _______, _______, _______, _______ - ), - [FnLayer] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, /**/ _______, _______, _______, _______, _______, _______, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, /**/ _______, XXXXXXX, _______, _______, _______ - ), -}; - -// ###### Combos ###### - -enum coral_combos { - CAPS_COMBO, - BOOTL_COMBO, - COMBO_LENGTH -}; - -uint16_t COMBO_LEN = COMBO_LENGTH; - -// Left and right thumb is CapsLock -const uint16_t PROGMEM caps_combo[] = {L_THUMB, R_THUMB, COMBO_END}; -const uint16_t PROGMEM bootl_combo[] = {BOOTL_1, BOOTL_2, BOOTL_3, COMBO_END}; - -combo_t key_combos[] = { - [CAPS_COMBO] = COMBO(caps_combo, QK_CAPS_WORD_TOGGLE), - [BOOTL_COMBO] = COMBO(bootl_combo, QK_BOOTLOADER), -}; - -// ###### Encoders ####### - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [BaseLayer] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [NavLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, - [MouseLayer] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, - [FnLayer] = { ENCODER_CCW_CW(RGB_MODE_REVERSE, RGB_MODE_FORWARD), ENCODER_CCW_CW(_______, _______) }, -}; -#endif - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KK_LOREM: - if (record->event.pressed) { - SEND_STRING("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vitae nibh neque. Etiam sed enim ac ipsum maximus rhoncus id et dui. Nam mi orci, rutrum in ipsum eget, hendrerit aliquam nulla. Maecenas ac nisl nibh. Integer erat mi, molestie vitae aliquet ut, faucibus eget sem. Suspendisse vel lacus interdum, consectetur nisi vitae, vulputate purus. Etiam ut aliquam turpis, id pellentesque ligula. Curabitur semper nisi in facilisis vehicula. Pellentesque felis risus, maximus blandit erat vel, congue sagittis mi. Etiam aliquam arcu sed neque semper laoreet. Sed id posuere libero, sed volutpat sapien."); - } - return false; - default: - return true; - } -}; diff --git a/keyboards/keebit/coral/keymaps/numToStr/rules.mk b/keyboards/keebit/coral/keymaps/numToStr/rules.mk deleted file mode 100644 index 3cc5dbe356b..00000000000 --- a/keyboards/keebit/coral/keymaps/numToStr/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -ENCODER_MAP_ENABLE = yes -# KEY_OVERRIDE_ENABLE = yes -COMBO_ENABLE = yes -TAP_DANCE_ENABLE = yes -CAPS_WORD_ENABLE = yes -SEND_STRING_ENABLE = yes diff --git a/keyboards/keebit/coral/readme.md b/keyboards/keebit/coral/readme.md index 720f9221956..d8e9d402e12 100644 --- a/keyboards/keebit/coral/readme.md +++ b/keyboards/keebit/coral/readme.md @@ -1,6 +1,6 @@ # Coral | Split Keyboard -![keebit/coral](https://user-images.githubusercontent.com/24727447/273894600-d73eba98-1507-43d7-8015-42daecd5f762.jpg) +![keebit/coral](https://i.imgur.com/wPt8oUi.jpg) _A 58 keys (56 MX + 2 EC11) 5x6 column-staggered wired split keyboard using Waveshare RP2040-Zero inspired by corne and sofle_v1_ diff --git a/keyboards/keebit/coral/rules.mk b/keyboards/keebit/coral/rules.mk index 9e39bf2c059..161ec22b16e 100644 --- a/keyboards/keebit/coral/rules.mk +++ b/keyboards/keebit/coral/rules.mk @@ -1,2 +1 @@ -# This file intentionally left blank SERIAL_DRIVER = vendor From 2981d18032854a82690c36b662e8df31d463c512 Mon Sep 17 00:00:00 2001 From: numToStr Date: Wed, 1 Nov 2023 20:38:36 +0530 Subject: [PATCH 17/25] update qmk config layout --- keyboards/keebit/coral/info.json | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 89d4bc23e40..24de946aaa9 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -36,7 +36,7 @@ "saturation_steps": 2, "brightness_steps": 2, "max_brightness": 20, - "sleep": false, + "sleep": true, "layers": { "blink": true, "enabled": true, @@ -87,12 +87,12 @@ { "matrix": [0, 3], "x": 3, "y": 0 }, { "matrix": [0, 4], "x": 4, "y": 0.125 }, { "matrix": [0, 5], "x": 5, "y": 0.25 }, - { "matrix": [5, 0], "x": 11, "y": 0.25 }, - { "matrix": [5, 1], "x": 12, "y": 0.125 }, - { "matrix": [5, 2], "x": 13, "y": 0 }, - { "matrix": [5, 3], "x": 14, "y": 0.125 }, - { "matrix": [5, 4], "x": 15, "y": 0.375 }, - { "matrix": [5, 5], "x": 16, "y": 0.375 }, + { "matrix": [5, 0], "x": 10, "y": 0.25 }, + { "matrix": [5, 1], "x": 11, "y": 0.125 }, + { "matrix": [5, 2], "x": 12, "y": 0 }, + { "matrix": [5, 3], "x": 13, "y": 0.125 }, + { "matrix": [5, 4], "x": 14, "y": 0.375 }, + { "matrix": [5, 5], "x": 15, "y": 0.375 }, { "matrix": [1, 0], "x": 0, "y": 1.375 }, { "matrix": [1, 1], "x": 1, "y": 1.375 }, @@ -100,12 +100,12 @@ { "matrix": [1, 3], "x": 3, "y": 1 }, { "matrix": [1, 4], "x": 4, "y": 1.125 }, { "matrix": [1, 5], "x": 5, "y": 1.25 }, - { "matrix": [6, 0], "x": 11, "y": 1.25 }, - { "matrix": [6, 1], "x": 12, "y": 1.125 }, - { "matrix": [6, 2], "x": 13, "y": 1 }, - { "matrix": [6, 3], "x": 14, "y": 1.125 }, - { "matrix": [6, 4], "x": 15, "y": 1.375 }, - { "matrix": [6, 5], "x": 16, "y": 1.375 }, + { "matrix": [6, 0], "x": 10, "y": 1.25 }, + { "matrix": [6, 1], "x": 11, "y": 1.125 }, + { "matrix": [6, 2], "x": 12, "y": 1 }, + { "matrix": [6, 3], "x": 13, "y": 1.125 }, + { "matrix": [6, 4], "x": 14, "y": 1.375 }, + { "matrix": [6, 5], "x": 15, "y": 1.375 }, { "matrix": [2, 0], "x": 0, "y": 2.375 }, { "matrix": [2, 1], "x": 1, "y": 2.375 }, @@ -113,36 +113,36 @@ { "matrix": [2, 3], "x": 3, "y": 2 }, { "matrix": [2, 4], "x": 4, "y": 2.125 }, { "matrix": [2, 5], "x": 5, "y": 2.25 }, - { "matrix": [7, 0], "x": 11, "y": 2.25 }, - { "matrix": [7, 1], "x": 12, "y": 2.125 }, - { "matrix": [7, 2], "x": 13, "y": 2 }, - { "matrix": [7, 3], "x": 14, "y": 2.125 }, - { "matrix": [7, 4], "x": 15, "y": 2.375 }, - { "matrix": [7, 5], "x": 16, "y": 2.375 }, + { "matrix": [7, 0], "x": 10, "y": 2.25 }, + { "matrix": [7, 1], "x": 11, "y": 2.125 }, + { "matrix": [7, 2], "x": 12, "y": 2 }, + { "matrix": [7, 3], "x": 13, "y": 2.125 }, + { "matrix": [7, 4], "x": 14, "y": 2.375 }, + { "matrix": [7, 5], "x": 15, "y": 2.375 }, { "matrix": [3, 0], "x": 0, "y": 3.375 }, { "matrix": [3, 1], "x": 1, "y": 3.375 }, { "matrix": [3, 2], "x": 2, "y": 3.125 }, - { "matrix": [3, 3], "x": 3, "y": 5 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, { "matrix": [3, 4], "x": 4, "y": 3.125 }, { "matrix": [3, 5], "x": 5, "y": 3.25 }, - { "matrix": [8, 0], "x": 11, "y": 3.25 }, - { "matrix": [8, 1], "x": 12, "y": 3.125 }, - { "matrix": [8, 2], "x": 13, "y": 3 }, - { "matrix": [8, 3], "x": 14, "y": 3.125 }, - { "matrix": [8, 4], "x": 15, "y": 3.375 }, - { "matrix": [8, 5], "x": 16, "y": 3.375 }, + { "matrix": [8, 0], "x": 10, "y": 3.25 }, + { "matrix": [8, 1], "x": 11, "y": 3.125 }, + { "matrix": [8, 2], "x": 12, "y": 3 }, + { "matrix": [8, 3], "x": 13, "y": 3.125 }, + { "matrix": [8, 4], "x": 14, "y": 3.375 }, + { "matrix": [8, 5], "x": 15, "y": 3.375 }, { "matrix": [4, 1], "x": 2.375, "y": 4.125 }, - { "matrix": [4, 2], "x": -0.01, "y": 4.75 }, - { "matrix": [4, 3], "x": 0.165, "y": 5.465 }, - { "matrix": [4, 4], "x": -0.55, "y": 5.865, "w": 1.5 }, - { "matrix": [4, 5], "x": 6.75, "y": 2.75 }, - { "matrix": [9, 0], "x": 9.25, "y": 2.75 }, - { "matrix": [9, 1], "x": 0.8, "y": 1.74, "w": 1.5 }, - { "matrix": [9, 2], "x": 6.75, "y": 7.99 }, - { "matrix": [9, 3], "x": 8.972, "y": 9.64 }, - { "matrix": [9, 4], "x": 13.625, "y": 4.125 } + { "matrix": [4, 2], "x": 3.49, "y": 4.2 }, + { "matrix": [4, 3], "x": 4.6, "y": 4.35 }, + { "matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5 }, + { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, + { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, + { "matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5 }, + { "matrix": [9, 2], "x": 10.4, "y": 4.35 }, + { "matrix": [9, 3], "x": 11.51, "y": 4.2 }, + { "matrix": [9, 4], "x": 12.625, "y": 4.125 } ] } } From 4c483b26e44886661ccd9d3597460ff891b01347 Mon Sep 17 00:00:00 2001 From: numToStr Date: Fri, 10 Nov 2023 19:22:09 +0530 Subject: [PATCH 18/25] fix encoder resolution and map --- keyboards/keebit/coral/info.json | 4 ++-- keyboards/keebit/coral/keymaps/default/keymap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 24de946aaa9..f75cb993f3d 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -52,7 +52,7 @@ }, "encoder": { "enabled": true, - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 1 }] + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] }, "split": { "enabled": true, @@ -69,7 +69,7 @@ }, "encoder": { "right": { - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 1 }] + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] } }, "usb_detect": { diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index 8d1ab097dfd..e61050d26cb 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_QWRTY] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_CLMK] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_CLMK] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [_LOWER] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [_RAISE] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [_ADJUST] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, From 7730590345ef06b576e775815d9d69e60b9ce107 Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 2 Dec 2023 12:11:35 +0530 Subject: [PATCH 19/25] resolve comments --- keyboards/keebit/coral/info.json | 230 +++++++++++++++---------------- keyboards/keebit/coral/readme.md | 2 +- 2 files changed, 116 insertions(+), 116 deletions(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index f75cb993f3d..326dd169c24 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -4,21 +4,74 @@ "maintainer": "numToStr", "bootloader": "rp2040", "diode_direction": "COL2ROW", + "encoder": { + "enabled": true, + "rotary": [ + {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} + ] + }, "features": { "bootmagic": true, "command": false, "console": false, "extrakey": true, + "lto": true, "mousekey": true, "nkro": true, - "lto": true, "rgblight": true }, "matrix_pins": { - "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], - "cols": ["GP1", "GP0", "GP27", "GP26", "GP15", "GP5"] + "cols": ["GP1", "GP0", "GP27", "GP26", "GP15", "GP5"], + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] }, "processor": "RP2040", + "rgblight": { + "animations": { + "breathing": true, + "christmas": true, + "rainbow_swirl": true, + "snake": true, + "twinkle": true + }, + "brightness_steps": 2, + "hue_steps": 2, + "layers": { + "blink": true, + "enabled": true, + "override_rgb": true + }, + "led_count": 1, + "max_brightness": 20, + "saturation_steps": 2, + "sleep": true, + "split": true + }, + "split": { + "enabled": true, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["GP5", "GP15", "GP26", "GP27", "GP0", "GP1"], + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] + } + }, + "soft_serial_pin": "GP13", + "transport": { + "protocol": "serial", + "watchdog": true + }, + "usb_detect": { + "enabled": true, + "polling_interval": 1, + "timeout": 5000 + } + }, "url": "https://github.com/keeb-it/coral", "usb": { "device_version": "1.0.0", @@ -29,121 +82,68 @@ "driver": "vendor", "pin": "GP16" }, - "rgblight": { - "split": true, - "led_count": 1, - "hue_steps": 2, - "saturation_steps": 2, - "brightness_steps": 2, - "max_brightness": 20, - "sleep": true, - "layers": { - "blink": true, - "enabled": true, - "override_rgb": true - }, - "animations": { - "breathing": true, - "christmas": true, - "rainbow_swirl": true, - "snake": true, - "twinkle": true - } - }, - "encoder": { - "enabled": true, - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] - }, - "split": { - "enabled": true, - "soft_serial_pin": "GP13", - "transport": { - "protocol": "serial", - "watchdog": true - }, - "matrix_pins": { - "right": { - "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"], - "cols": ["GP5", "GP15", "GP26", "GP27", "GP0", "GP1"] - } - }, - "encoder": { - "right": { - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] - } - }, - "usb_detect": { - "enabled": true, - "timeout": 5000, - "polling_interval": 1 - } - }, "layouts": { "LAYOUT": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0.375 }, - { "matrix": [0, 1], "x": 1, "y": 0.375 }, - { "matrix": [0, 2], "x": 2, "y": 0.125 }, - { "matrix": [0, 3], "x": 3, "y": 0 }, - { "matrix": [0, 4], "x": 4, "y": 0.125 }, - { "matrix": [0, 5], "x": 5, "y": 0.25 }, - { "matrix": [5, 0], "x": 10, "y": 0.25 }, - { "matrix": [5, 1], "x": 11, "y": 0.125 }, - { "matrix": [5, 2], "x": 12, "y": 0 }, - { "matrix": [5, 3], "x": 13, "y": 0.125 }, - { "matrix": [5, 4], "x": 14, "y": 0.375 }, - { "matrix": [5, 5], "x": 15, "y": 0.375 }, - - { "matrix": [1, 0], "x": 0, "y": 1.375 }, - { "matrix": [1, 1], "x": 1, "y": 1.375 }, - { "matrix": [1, 2], "x": 2, "y": 1.125 }, - { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [1, 4], "x": 4, "y": 1.125 }, - { "matrix": [1, 5], "x": 5, "y": 1.25 }, - { "matrix": [6, 0], "x": 10, "y": 1.25 }, - { "matrix": [6, 1], "x": 11, "y": 1.125 }, - { "matrix": [6, 2], "x": 12, "y": 1 }, - { "matrix": [6, 3], "x": 13, "y": 1.125 }, - { "matrix": [6, 4], "x": 14, "y": 1.375 }, - { "matrix": [6, 5], "x": 15, "y": 1.375 }, - - { "matrix": [2, 0], "x": 0, "y": 2.375 }, - { "matrix": [2, 1], "x": 1, "y": 2.375 }, - { "matrix": [2, 2], "x": 2, "y": 2.125 }, - { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [2, 4], "x": 4, "y": 2.125 }, - { "matrix": [2, 5], "x": 5, "y": 2.25 }, - { "matrix": [7, 0], "x": 10, "y": 2.25 }, - { "matrix": [7, 1], "x": 11, "y": 2.125 }, - { "matrix": [7, 2], "x": 12, "y": 2 }, - { "matrix": [7, 3], "x": 13, "y": 2.125 }, - { "matrix": [7, 4], "x": 14, "y": 2.375 }, - { "matrix": [7, 5], "x": 15, "y": 2.375 }, - - { "matrix": [3, 0], "x": 0, "y": 3.375 }, - { "matrix": [3, 1], "x": 1, "y": 3.375 }, - { "matrix": [3, 2], "x": 2, "y": 3.125 }, - { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [3, 4], "x": 4, "y": 3.125 }, - { "matrix": [3, 5], "x": 5, "y": 3.25 }, - { "matrix": [8, 0], "x": 10, "y": 3.25 }, - { "matrix": [8, 1], "x": 11, "y": 3.125 }, - { "matrix": [8, 2], "x": 12, "y": 3 }, - { "matrix": [8, 3], "x": 13, "y": 3.125 }, - { "matrix": [8, 4], "x": 14, "y": 3.375 }, - { "matrix": [8, 5], "x": 15, "y": 3.375 }, - - { "matrix": [4, 1], "x": 2.375, "y": 4.125 }, - { "matrix": [4, 2], "x": 3.49, "y": 4.2 }, - { "matrix": [4, 3], "x": 4.6, "y": 4.35 }, - { "matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5 }, - { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, - { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, - { "matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5 }, - { "matrix": [9, 2], "x": 10.4, "y": 4.35 }, - { "matrix": [9, 3], "x": 11.51, "y": 4.2 }, - { "matrix": [9, 4], "x": 12.625, "y": 4.125 } + {"matrix": [0, 0], "x": 0, "y": 0.375}, + {"matrix": [0, 1], "x": 1, "y": 0.375}, + {"matrix": [0, 2], "x": 2, "y": 0.125}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.125}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [5, 0], "x": 10, "y": 0.25}, + {"matrix": [5, 1], "x": 11, "y": 0.125}, + {"matrix": [5, 2], "x": 12, "y": 0}, + {"matrix": [5, 3], "x": 13, "y": 0.125}, + {"matrix": [5, 4], "x": 14, "y": 0.375}, + {"matrix": [5, 5], "x": 15, "y": 0.375}, + {"matrix": [1, 0], "x": 0, "y": 1.375}, + {"matrix": [1, 1], "x": 1, "y": 1.375}, + {"matrix": [1, 2], "x": 2, "y": 1.125}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.125}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [6, 0], "x": 10, "y": 1.25}, + {"matrix": [6, 1], "x": 11, "y": 1.125}, + {"matrix": [6, 2], "x": 12, "y": 1}, + {"matrix": [6, 3], "x": 13, "y": 1.125}, + {"matrix": [6, 4], "x": 14, "y": 1.375}, + {"matrix": [6, 5], "x": 15, "y": 1.375}, + {"matrix": [2, 0], "x": 0, "y": 2.375}, + {"matrix": [2, 1], "x": 1, "y": 2.375}, + {"matrix": [2, 2], "x": 2, "y": 2.125}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.125}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [7, 0], "x": 10, "y": 2.25}, + {"matrix": [7, 1], "x": 11, "y": 2.125}, + {"matrix": [7, 2], "x": 12, "y": 2}, + {"matrix": [7, 3], "x": 13, "y": 2.125}, + {"matrix": [7, 4], "x": 14, "y": 2.375}, + {"matrix": [7, 5], "x": 15, "y": 2.375}, + {"matrix": [3, 0], "x": 0, "y": 3.375}, + {"matrix": [3, 1], "x": 1, "y": 3.375}, + {"matrix": [3, 2], "x": 2, "y": 3.125}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3.125}, + {"matrix": [3, 5], "x": 5, "y": 3.25}, + {"matrix": [8, 0], "x": 10, "y": 3.25}, + {"matrix": [8, 1], "x": 11, "y": 3.125}, + {"matrix": [8, 2], "x": 12, "y": 3}, + {"matrix": [8, 3], "x": 13, "y": 3.125}, + {"matrix": [8, 4], "x": 14, "y": 3.375}, + {"matrix": [8, 5], "x": 15, "y": 3.375}, + {"matrix": [4, 1], "x": 2.375, "y": 4.125}, + {"matrix": [4, 2], "x": 3.49, "y": 4.2}, + {"matrix": [4, 3], "x": 4.6, "y": 4.35}, + {"matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5}, + {"matrix": [4, 5], "x": 6.25, "y": 2.5}, + {"matrix": [9, 0], "x": 8.75, "y": 2.5}, + {"matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5}, + {"matrix": [9, 2], "x": 10.4, "y": 4.35}, + {"matrix": [9, 3], "x": 11.51, "y": 4.2}, + {"matrix": [9, 4], "x": 12.625, "y": 4.125} ] } } -} +} \ No newline at end of file diff --git a/keyboards/keebit/coral/readme.md b/keyboards/keebit/coral/readme.md index d8e9d402e12..98d9ac00e6f 100644 --- a/keyboards/keebit/coral/readme.md +++ b/keyboards/keebit/coral/readme.md @@ -1,6 +1,6 @@ # Coral | Split Keyboard -![keebit/coral](https://i.imgur.com/wPt8oUi.jpg) +![keebit/coral](https://i.imgur.com/wPt8oUih.jpg) _A 58 keys (56 MX + 2 EC11) 5x6 column-staggered wired split keyboard using Waveshare RP2040-Zero inspired by corne and sofle_v1_ From 9fe719a5e4cf0698827eab2f8a1e4dd7a3c87ea6 Mon Sep 17 00:00:00 2001 From: numToStr Date: Thu, 29 Feb 2024 22:00:08 +0530 Subject: [PATCH 20/25] 2024q1 update and rgblight adjustments --- keyboards/keebit/coral/coral.c | 4 ++-- keyboards/keebit/coral/info.json | 27 +++++++++++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c index 4f8a157b299..7c75123cfb8 100644 --- a/keyboards/keebit/coral/coral.c +++ b/keyboards/keebit/coral/coral.c @@ -10,11 +10,11 @@ enum RGB_LAYERS { }; const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_BLUE} + {0, RGBLIGHT_LED_COUNT, HSV_BLUE} ); const rgblight_segment_t PROGMEM capsword_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_WHITE} + {0, RGBLIGHT_LED_COUNT, HSV_WHITE} ); // Now define the array of layers. Later layers take precedence diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 326dd169c24..2cf11b8af71 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -3,6 +3,9 @@ "keyboard_name": "coral", "maintainer": "numToStr", "bootloader": "rp2040", + "build": { + "lto": true + }, "diode_direction": "COL2ROW", "encoder": { "enabled": true, @@ -15,7 +18,6 @@ "command": false, "console": false, "extrakey": true, - "lto": true, "mousekey": true, "nkro": true, "rgblight": true @@ -26,25 +28,18 @@ }, "processor": "RP2040", "rgblight": { - "animations": { - "breathing": true, - "christmas": true, - "rainbow_swirl": true, - "snake": true, - "twinkle": true - }, - "brightness_steps": 2, - "hue_steps": 2, + "brightness_steps": 1, + "hue_steps": 1, "layers": { - "blink": true, "enabled": true, "override_rgb": true }, - "led_count": 1, - "max_brightness": 20, - "saturation_steps": 2, + "led_count": 2, + "max_brightness": 2, + "saturation_steps": 1, "sleep": true, - "split": true + "split": true, + "split_count": [1, 1] }, "split": { "enabled": true, @@ -146,4 +141,4 @@ ] } } -} \ No newline at end of file +} From 8ebc21bb2502dc7e191fbe3a5471729a82fda62b Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 23 Mar 2024 20:11:02 +0530 Subject: [PATCH 21/25] lowest brightness to prevent mcu browning --- keyboards/keebit/coral/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json index 2cf11b8af71..e4b039df5f0 100644 --- a/keyboards/keebit/coral/info.json +++ b/keyboards/keebit/coral/info.json @@ -35,7 +35,7 @@ "override_rgb": true }, "led_count": 2, - "max_brightness": 2, + "max_brightness": 1, "saturation_steps": 1, "sleep": true, "split": true, From 3e3c2ea68fc4f2e6b296de51287d0d0fba95cd4f Mon Sep 17 00:00:00 2001 From: numToStr Date: Mon, 3 Jun 2024 11:10:13 +0530 Subject: [PATCH 22/25] ifdef RGBLIGHT --- keyboards/keebit/coral/coral.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/keebit/coral/coral.c b/keyboards/keebit/coral/coral.c index 7c75123cfb8..2fd6569c8c9 100644 --- a/keyboards/keebit/coral/coral.c +++ b/keyboards/keebit/coral/coral.c @@ -3,6 +3,8 @@ #include "quantum.h" +#ifdef RGBLIGHT_ENABLE + // ===== LED/RGB INDICATOR ===== enum RGB_LAYERS { RGBL_CAPSL = 0, @@ -40,3 +42,5 @@ void keyboard_post_init_kb(void) { rgblight_layers = rgb_layers; keyboard_post_init_user(); } + +#endif /* ifdef RGBLIGHT_ENABLE */ From b3a9288c4940b6550452276cc54b1c4a2dc39499 Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 23 Nov 2024 11:10:48 +0530 Subject: [PATCH 23/25] update codebase --- keyboards/keebit/coral/info.json | 144 ------------------ keyboards/keebit/coral/keyboard.json | 142 +++++++++++++++++ .../keebit/coral/keymaps/default/keymap.c | 44 ++---- keyboards/keebit/coral/rules.mk | 1 - 4 files changed, 157 insertions(+), 174 deletions(-) delete mode 100644 keyboards/keebit/coral/info.json create mode 100644 keyboards/keebit/coral/keyboard.json delete mode 100644 keyboards/keebit/coral/rules.mk diff --git a/keyboards/keebit/coral/info.json b/keyboards/keebit/coral/info.json deleted file mode 100644 index e4b039df5f0..00000000000 --- a/keyboards/keebit/coral/info.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "manufacturer": "keeb.it!", - "keyboard_name": "coral", - "maintainer": "numToStr", - "bootloader": "rp2040", - "build": { - "lto": true - }, - "diode_direction": "COL2ROW", - "encoder": { - "enabled": true, - "rotary": [ - {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} - ] - }, - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["GP1", "GP0", "GP27", "GP26", "GP15", "GP5"], - "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] - }, - "processor": "RP2040", - "rgblight": { - "brightness_steps": 1, - "hue_steps": 1, - "layers": { - "enabled": true, - "override_rgb": true - }, - "led_count": 2, - "max_brightness": 1, - "saturation_steps": 1, - "sleep": true, - "split": true, - "split_count": [1, 1] - }, - "split": { - "enabled": true, - "encoder": { - "right": { - "rotary": [ - {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} - ] - } - }, - "matrix_pins": { - "right": { - "cols": ["GP5", "GP15", "GP26", "GP27", "GP0", "GP1"], - "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] - } - }, - "soft_serial_pin": "GP13", - "transport": { - "protocol": "serial", - "watchdog": true - }, - "usb_detect": { - "enabled": true, - "polling_interval": 1, - "timeout": 5000 - } - }, - "url": "https://github.com/keeb-it/coral", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "ws2812": { - "driver": "vendor", - "pin": "GP16" - }, - "layouts": { - "LAYOUT": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0.375}, - {"matrix": [0, 1], "x": 1, "y": 0.375}, - {"matrix": [0, 2], "x": 2, "y": 0.125}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0.125}, - {"matrix": [0, 5], "x": 5, "y": 0.25}, - {"matrix": [5, 0], "x": 10, "y": 0.25}, - {"matrix": [5, 1], "x": 11, "y": 0.125}, - {"matrix": [5, 2], "x": 12, "y": 0}, - {"matrix": [5, 3], "x": 13, "y": 0.125}, - {"matrix": [5, 4], "x": 14, "y": 0.375}, - {"matrix": [5, 5], "x": 15, "y": 0.375}, - {"matrix": [1, 0], "x": 0, "y": 1.375}, - {"matrix": [1, 1], "x": 1, "y": 1.375}, - {"matrix": [1, 2], "x": 2, "y": 1.125}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1.125}, - {"matrix": [1, 5], "x": 5, "y": 1.25}, - {"matrix": [6, 0], "x": 10, "y": 1.25}, - {"matrix": [6, 1], "x": 11, "y": 1.125}, - {"matrix": [6, 2], "x": 12, "y": 1}, - {"matrix": [6, 3], "x": 13, "y": 1.125}, - {"matrix": [6, 4], "x": 14, "y": 1.375}, - {"matrix": [6, 5], "x": 15, "y": 1.375}, - {"matrix": [2, 0], "x": 0, "y": 2.375}, - {"matrix": [2, 1], "x": 1, "y": 2.375}, - {"matrix": [2, 2], "x": 2, "y": 2.125}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2.125}, - {"matrix": [2, 5], "x": 5, "y": 2.25}, - {"matrix": [7, 0], "x": 10, "y": 2.25}, - {"matrix": [7, 1], "x": 11, "y": 2.125}, - {"matrix": [7, 2], "x": 12, "y": 2}, - {"matrix": [7, 3], "x": 13, "y": 2.125}, - {"matrix": [7, 4], "x": 14, "y": 2.375}, - {"matrix": [7, 5], "x": 15, "y": 2.375}, - {"matrix": [3, 0], "x": 0, "y": 3.375}, - {"matrix": [3, 1], "x": 1, "y": 3.375}, - {"matrix": [3, 2], "x": 2, "y": 3.125}, - {"matrix": [3, 3], "x": 3, "y": 3}, - {"matrix": [3, 4], "x": 4, "y": 3.125}, - {"matrix": [3, 5], "x": 5, "y": 3.25}, - {"matrix": [8, 0], "x": 10, "y": 3.25}, - {"matrix": [8, 1], "x": 11, "y": 3.125}, - {"matrix": [8, 2], "x": 12, "y": 3}, - {"matrix": [8, 3], "x": 13, "y": 3.125}, - {"matrix": [8, 4], "x": 14, "y": 3.375}, - {"matrix": [8, 5], "x": 15, "y": 3.375}, - {"matrix": [4, 1], "x": 2.375, "y": 4.125}, - {"matrix": [4, 2], "x": 3.49, "y": 4.2}, - {"matrix": [4, 3], "x": 4.6, "y": 4.35}, - {"matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5}, - {"matrix": [4, 5], "x": 6.25, "y": 2.5}, - {"matrix": [9, 0], "x": 8.75, "y": 2.5}, - {"matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5}, - {"matrix": [9, 2], "x": 10.4, "y": 4.35}, - {"matrix": [9, 3], "x": 11.51, "y": 4.2}, - {"matrix": [9, 4], "x": 12.625, "y": 4.125} - ] - } - } -} diff --git a/keyboards/keebit/coral/keyboard.json b/keyboards/keebit/coral/keyboard.json new file mode 100644 index 00000000000..9adf5a8347b --- /dev/null +++ b/keyboards/keebit/coral/keyboard.json @@ -0,0 +1,142 @@ +{ + "manufacturer": "keeb.it!", + "keyboard_name": "coral", + "maintainer": "numToStr", + "bootloader": "rp2040", + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "encoder": { + "enabled": true, + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "caps_word": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["GP1", "GP0", "GP27", "GP26", "GP15", "GP5"], + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] + }, + "processor": "RP2040", + "rgblight": { + "brightness_steps": 8, + "hue_steps": 8, + "layers": { + "enabled": true, + "override_rgb": true + }, + "led_count": 2, + "max_brightness": 180, + "saturation_steps": 8, + "sleep": true, + "split": true, + "split_count": [1, 1] + }, + "split": { + "enabled": true, + "encoder": { + "right": { + "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] + } + }, + "matrix_pins": { + "right": { + "cols": ["GP5", "GP15", "GP26", "GP27", "GP0", "GP1"], + "rows": ["GP29", "GP28", "GP14", "GP6", "GP7"] + } + }, + "serial": { + "driver": "vendor", + "pin": "GP13" + }, + "transport": { + "protocol": "serial", + "watchdog": true + }, + "usb_detect": { + "enabled": true, + "polling_interval": 1, + "timeout": 5000 + } + }, + "url": "https://github.com/keeb-it/coral", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP16" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.375 }, + { "matrix": [0, 1], "x": 1, "y": 0.375 }, + { "matrix": [0, 2], "x": 2, "y": 0.125 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.125 }, + { "matrix": [0, 5], "x": 5, "y": 0.25 }, + { "matrix": [5, 0], "x": 10, "y": 0.25 }, + { "matrix": [5, 1], "x": 11, "y": 0.125 }, + { "matrix": [5, 2], "x": 12, "y": 0 }, + { "matrix": [5, 3], "x": 13, "y": 0.125 }, + { "matrix": [5, 4], "x": 14, "y": 0.375 }, + { "matrix": [5, 5], "x": 15, "y": 0.375 }, + { "matrix": [1, 0], "x": 0, "y": 1.375 }, + { "matrix": [1, 1], "x": 1, "y": 1.375 }, + { "matrix": [1, 2], "x": 2, "y": 1.125 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.125 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [6, 0], "x": 10, "y": 1.25 }, + { "matrix": [6, 1], "x": 11, "y": 1.125 }, + { "matrix": [6, 2], "x": 12, "y": 1 }, + { "matrix": [6, 3], "x": 13, "y": 1.125 }, + { "matrix": [6, 4], "x": 14, "y": 1.375 }, + { "matrix": [6, 5], "x": 15, "y": 1.375 }, + { "matrix": [2, 0], "x": 0, "y": 2.375 }, + { "matrix": [2, 1], "x": 1, "y": 2.375 }, + { "matrix": [2, 2], "x": 2, "y": 2.125 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.125 }, + { "matrix": [2, 5], "x": 5, "y": 2.25 }, + { "matrix": [7, 0], "x": 10, "y": 2.25 }, + { "matrix": [7, 1], "x": 11, "y": 2.125 }, + { "matrix": [7, 2], "x": 12, "y": 2 }, + { "matrix": [7, 3], "x": 13, "y": 2.125 }, + { "matrix": [7, 4], "x": 14, "y": 2.375 }, + { "matrix": [7, 5], "x": 15, "y": 2.375 }, + { "matrix": [3, 0], "x": 0, "y": 3.375 }, + { "matrix": [3, 1], "x": 1, "y": 3.375 }, + { "matrix": [3, 2], "x": 2, "y": 3.125 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3.125 }, + { "matrix": [3, 5], "x": 5, "y": 3.25 }, + { "matrix": [8, 0], "x": 10, "y": 3.25 }, + { "matrix": [8, 1], "x": 11, "y": 3.125 }, + { "matrix": [8, 2], "x": 12, "y": 3 }, + { "matrix": [8, 3], "x": 13, "y": 3.125 }, + { "matrix": [8, 4], "x": 14, "y": 3.375 }, + { "matrix": [8, 5], "x": 15, "y": 3.375 }, + { "matrix": [4, 1], "x": 2.375, "y": 4.125 }, + { "matrix": [4, 2], "x": 3.49, "y": 4.2 }, + { "matrix": [4, 3], "x": 4.6, "y": 4.35 }, + { "matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5 }, + { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, + { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, + { "matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5 }, + { "matrix": [9, 2], "x": 10.4, "y": 4.35 }, + { "matrix": [9, 3], "x": 11.51, "y": 4.2 }, + { "matrix": [9, 4], "x": 12.625, "y": 4.125 } + ] + } + } +} diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index e61050d26cb..d7272e62c9c 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -7,19 +7,6 @@ #define L_THUMB LT(_LOWER, KC_ENTER) #define R_THUMB LT(_RAISE, KC_SPACE) -// Rotary -#define L_ROT KC_MNXT -#define R_ROT KC_MPLY - -// Custom Mod Keys -#define KC_PRVWD C(KC_LEFT) -#define KC_NXTWD C(KC_RIGHT) -#define KC_DLINE C(KC_BSPC) -#define KC_COPY C(KC_C) -#define KC_PASTE C(KC_V) -#define KC_CUT C(KC_X) -#define KC_UNDO C(KC_Z) - enum coral_layers { _QWRTY, _CLMK, @@ -33,21 +20,20 @@ enum coral_keycodes { KC_CLMK, }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWRTY] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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_LGUI, KC_LALT, KC_LCTL, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LGUI, KC_LALT, KC_LCTL, L_THUMB, KC_MNXT, /**/ KC_MPLY, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), [_CLMK] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, - KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, /**/ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, L_ROT, /**/ R_ROT, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, /**/ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, KC_MNXT, /**/ KC_MPLY, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), [_LOWER] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, /**/ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, @@ -57,11 +43,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), [_RAISE] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, - _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, C(KC_LEFT), KC_UP, C(KC_RIGHT), C(KC_BSPC), KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ ), [_ADJUST] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/keebit/coral/rules.mk b/keyboards/keebit/coral/rules.mk deleted file mode 100644 index 161ec22b16e..00000000000 --- a/keyboards/keebit/coral/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor From f063a8b33eb1a432ead9bdeceffd614894c9dfda Mon Sep 17 00:00:00 2001 From: numToStr Date: Sat, 23 Nov 2024 14:15:11 +0530 Subject: [PATCH 24/25] move encoder to 3rd row --- keyboards/keebit/coral/keyboard.json | 4 ++-- .../keebit/coral/keymaps/default/keymap.c | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/keyboards/keebit/coral/keyboard.json b/keyboards/keebit/coral/keyboard.json index 9adf5a8347b..93ee274818f 100644 --- a/keyboards/keebit/coral/keyboard.json +++ b/keyboards/keebit/coral/keyboard.json @@ -120,6 +120,8 @@ { "matrix": [3, 3], "x": 3, "y": 3 }, { "matrix": [3, 4], "x": 4, "y": 3.125 }, { "matrix": [3, 5], "x": 5, "y": 3.25 }, + { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, + { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, { "matrix": [8, 0], "x": 10, "y": 3.25 }, { "matrix": [8, 1], "x": 11, "y": 3.125 }, { "matrix": [8, 2], "x": 12, "y": 3 }, @@ -130,8 +132,6 @@ { "matrix": [4, 2], "x": 3.49, "y": 4.2 }, { "matrix": [4, 3], "x": 4.6, "y": 4.35 }, { "matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5 }, - { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, - { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, { "matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5 }, { "matrix": [9, 2], "x": 10.4, "y": 4.35 }, { "matrix": [9, 3], "x": 11.51, "y": 4.2 }, diff --git a/keyboards/keebit/coral/keymaps/default/keymap.c b/keyboards/keebit/coral/keymaps/default/keymap.c index d7272e62c9c..eb42d97cbcc 100644 --- a/keyboards/keebit/coral/keymaps/default/keymap.c +++ b/keyboards/keebit/coral/keymaps/default/keymap.c @@ -25,42 +25,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 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_LGUI, KC_LALT, KC_LCTL, L_THUMB, KC_MNXT, /**/ KC_MPLY, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MNXT, /**/ KC_MPLY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, /**/ R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), [_CLMK] = LAYOUT( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, /**/ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, /**/ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, KC_MNXT, /**/ KC_MPLY, R_THUMB, KC_RCTL, KC_RALT, KC_RGUI + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MNXT, /**/ KC_MPLY, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_LCTL, L_THUMB, /**/ R_THUMB, KC_RCTL, KC_RALT, KC_RGUI ), [_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, /**/ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, - _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, /**/ KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, /**/ _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, /**/ _______, _______, _______, _______ ), [_RAISE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, C(KC_LEFT), KC_UP, C(KC_RIGHT), C(KC_BSPC), KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, _______, /**/ _______, XXXXXXX, KC_HOME, XXXXXXX, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, /**/ _______, _______, _______, _______ ), [_ADJUST] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, KC_QWRTY, KC_CLMK, CG_TOGG, XXXXXXX, /**/ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, /**/ XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, /**/ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, /**/ _______, _______, _______, _______ ) }; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_QWRTY] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_QWRTY] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [_CLMK] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [_LOWER] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [_RAISE] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, From 2fc9bd3b64d991feffc2d44bf806392e42e3cd78 Mon Sep 17 00:00:00 2001 From: numToStr Date: Thu, 28 Nov 2024 21:39:53 +0530 Subject: [PATCH 25/25] format-json --- keyboards/keebit/coral/keyboard.json | 126 ++++++++++++++------------- 1 file changed, 65 insertions(+), 61 deletions(-) diff --git a/keyboards/keebit/coral/keyboard.json b/keyboards/keebit/coral/keyboard.json index 93ee274818f..e4689eca0bf 100644 --- a/keyboards/keebit/coral/keyboard.json +++ b/keyboards/keebit/coral/keyboard.json @@ -9,13 +9,15 @@ "diode_direction": "COL2ROW", "encoder": { "enabled": true, - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] + "rotary": [ + {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} + ] }, "features": { "bootmagic": true, + "caps_word": true, "extrakey": true, "mousekey": true, - "caps_word": true, "nkro": true, "rgblight": true }, @@ -42,7 +44,9 @@ "enabled": true, "encoder": { "right": { - "rotary": [{ "pin_a": "GP9", "pin_b": "GP8", "resolution": 2 }] + "rotary": [ + {"pin_a": "GP9", "pin_b": "GP8", "resolution": 2} + ] } }, "matrix_pins": { @@ -78,64 +82,64 @@ "layouts": { "LAYOUT": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0.375 }, - { "matrix": [0, 1], "x": 1, "y": 0.375 }, - { "matrix": [0, 2], "x": 2, "y": 0.125 }, - { "matrix": [0, 3], "x": 3, "y": 0 }, - { "matrix": [0, 4], "x": 4, "y": 0.125 }, - { "matrix": [0, 5], "x": 5, "y": 0.25 }, - { "matrix": [5, 0], "x": 10, "y": 0.25 }, - { "matrix": [5, 1], "x": 11, "y": 0.125 }, - { "matrix": [5, 2], "x": 12, "y": 0 }, - { "matrix": [5, 3], "x": 13, "y": 0.125 }, - { "matrix": [5, 4], "x": 14, "y": 0.375 }, - { "matrix": [5, 5], "x": 15, "y": 0.375 }, - { "matrix": [1, 0], "x": 0, "y": 1.375 }, - { "matrix": [1, 1], "x": 1, "y": 1.375 }, - { "matrix": [1, 2], "x": 2, "y": 1.125 }, - { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [1, 4], "x": 4, "y": 1.125 }, - { "matrix": [1, 5], "x": 5, "y": 1.25 }, - { "matrix": [6, 0], "x": 10, "y": 1.25 }, - { "matrix": [6, 1], "x": 11, "y": 1.125 }, - { "matrix": [6, 2], "x": 12, "y": 1 }, - { "matrix": [6, 3], "x": 13, "y": 1.125 }, - { "matrix": [6, 4], "x": 14, "y": 1.375 }, - { "matrix": [6, 5], "x": 15, "y": 1.375 }, - { "matrix": [2, 0], "x": 0, "y": 2.375 }, - { "matrix": [2, 1], "x": 1, "y": 2.375 }, - { "matrix": [2, 2], "x": 2, "y": 2.125 }, - { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [2, 4], "x": 4, "y": 2.125 }, - { "matrix": [2, 5], "x": 5, "y": 2.25 }, - { "matrix": [7, 0], "x": 10, "y": 2.25 }, - { "matrix": [7, 1], "x": 11, "y": 2.125 }, - { "matrix": [7, 2], "x": 12, "y": 2 }, - { "matrix": [7, 3], "x": 13, "y": 2.125 }, - { "matrix": [7, 4], "x": 14, "y": 2.375 }, - { "matrix": [7, 5], "x": 15, "y": 2.375 }, - { "matrix": [3, 0], "x": 0, "y": 3.375 }, - { "matrix": [3, 1], "x": 1, "y": 3.375 }, - { "matrix": [3, 2], "x": 2, "y": 3.125 }, - { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [3, 4], "x": 4, "y": 3.125 }, - { "matrix": [3, 5], "x": 5, "y": 3.25 }, - { "matrix": [4, 5], "x": 6.25, "y": 2.5 }, - { "matrix": [9, 0], "x": 8.75, "y": 2.5 }, - { "matrix": [8, 0], "x": 10, "y": 3.25 }, - { "matrix": [8, 1], "x": 11, "y": 3.125 }, - { "matrix": [8, 2], "x": 12, "y": 3 }, - { "matrix": [8, 3], "x": 13, "y": 3.125 }, - { "matrix": [8, 4], "x": 14, "y": 3.375 }, - { "matrix": [8, 5], "x": 15, "y": 3.375 }, - { "matrix": [4, 1], "x": 2.375, "y": 4.125 }, - { "matrix": [4, 2], "x": 3.49, "y": 4.2 }, - { "matrix": [4, 3], "x": 4.6, "y": 4.35 }, - { "matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5 }, - { "matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5 }, - { "matrix": [9, 2], "x": 10.4, "y": 4.35 }, - { "matrix": [9, 3], "x": 11.51, "y": 4.2 }, - { "matrix": [9, 4], "x": 12.625, "y": 4.125 } + {"matrix": [0, 0], "x": 0, "y": 0.375}, + {"matrix": [0, 1], "x": 1, "y": 0.375}, + {"matrix": [0, 2], "x": 2, "y": 0.125}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.125}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [5, 0], "x": 10, "y": 0.25}, + {"matrix": [5, 1], "x": 11, "y": 0.125}, + {"matrix": [5, 2], "x": 12, "y": 0}, + {"matrix": [5, 3], "x": 13, "y": 0.125}, + {"matrix": [5, 4], "x": 14, "y": 0.375}, + {"matrix": [5, 5], "x": 15, "y": 0.375}, + {"matrix": [1, 0], "x": 0, "y": 1.375}, + {"matrix": [1, 1], "x": 1, "y": 1.375}, + {"matrix": [1, 2], "x": 2, "y": 1.125}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.125}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [6, 0], "x": 10, "y": 1.25}, + {"matrix": [6, 1], "x": 11, "y": 1.125}, + {"matrix": [6, 2], "x": 12, "y": 1}, + {"matrix": [6, 3], "x": 13, "y": 1.125}, + {"matrix": [6, 4], "x": 14, "y": 1.375}, + {"matrix": [6, 5], "x": 15, "y": 1.375}, + {"matrix": [2, 0], "x": 0, "y": 2.375}, + {"matrix": [2, 1], "x": 1, "y": 2.375}, + {"matrix": [2, 2], "x": 2, "y": 2.125}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.125}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [7, 0], "x": 10, "y": 2.25}, + {"matrix": [7, 1], "x": 11, "y": 2.125}, + {"matrix": [7, 2], "x": 12, "y": 2}, + {"matrix": [7, 3], "x": 13, "y": 2.125}, + {"matrix": [7, 4], "x": 14, "y": 2.375}, + {"matrix": [7, 5], "x": 15, "y": 2.375}, + {"matrix": [3, 0], "x": 0, "y": 3.375}, + {"matrix": [3, 1], "x": 1, "y": 3.375}, + {"matrix": [3, 2], "x": 2, "y": 3.125}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3.125}, + {"matrix": [3, 5], "x": 5, "y": 3.25}, + {"matrix": [4, 5], "x": 6.25, "y": 2.5}, + {"matrix": [9, 0], "x": 8.75, "y": 2.5}, + {"matrix": [8, 0], "x": 10, "y": 3.25}, + {"matrix": [8, 1], "x": 11, "y": 3.125}, + {"matrix": [8, 2], "x": 12, "y": 3}, + {"matrix": [8, 3], "x": 13, "y": 3.125}, + {"matrix": [8, 4], "x": 14, "y": 3.375}, + {"matrix": [8, 5], "x": 15, "y": 3.375}, + {"matrix": [4, 1], "x": 2.375, "y": 4.125}, + {"matrix": [4, 2], "x": 3.49, "y": 4.2}, + {"matrix": [4, 3], "x": 4.6, "y": 4.35}, + {"matrix": [4, 4], "x": 5.7, "y": 4.5, "w": 1.5}, + {"matrix": [9, 1], "x": 8.8, "y": 4.5, "w": 1.5}, + {"matrix": [9, 2], "x": 10.4, "y": 4.35}, + {"matrix": [9, 3], "x": 11.51, "y": 4.2}, + {"matrix": [9, 4], "x": 12.625, "y": 4.125} ] } }