numToStr 2 weeks ago
committed by GitHub
parent
commit
6a07e0c29c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
7 changed files with 326 additions and 0 deletions
  1. +10
    -0
      keyboards/keebit/coral/config.h
  2. +42
    -0
      keyboards/keebit/coral/coral.c
  3. +144
    -0
      keyboards/keebit/coral/info.json
  4. +99
    -0
      keyboards/keebit/coral/keymaps/default/keymap.c
  5. +1
    -0
      keyboards/keebit/coral/keymaps/default/rules.mk
  6. +29
    -0
      keyboards/keebit/coral/readme.md
  7. +1
    -0
      keyboards/keebit/coral/rules.mk

+ 10
- 0
keyboards/keebit/coral/config.h View File

@ -0,0 +1,10 @@
// Copyright 2023 numToStr (@numToStr)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 220U
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP16
#define WS2812_PIO_USE_PIO1

+ 42
- 0
keyboards/keebit/coral/coral.c View File

@ -0,0 +1,42 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
// ===== LED/RGB INDICATOR =====
enum RGB_LAYERS {
RGBL_CAPSL = 0,
RGBL_CAPSW = 1,
};
const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, RGBLIGHT_LED_COUNT, HSV_BLUE}
);
const rgblight_segment_t PROGMEM capsword_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, RGBLIGHT_LED_COUNT, HSV_WHITE}
);
// Now define the array of layers. Later layers take precedence
const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(
[RGBL_CAPSL] = capslock_layer,
[RGBL_CAPSW] = capsword_layer
);
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;
}
__attribute__((weak)) void caps_word_set_user(bool active) {
rgblight_set_layer_state(RGBL_CAPSW, active);
}
void keyboard_post_init_kb(void) {
// Enable the LED layers
rgblight_layers = rgb_layers;
keyboard_post_init_user();
}

+ 144
- 0
keyboards/keebit/coral/info.json View File

@ -0,0 +1,144 @@
{
"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}
]
}
}
}

+ 99
- 0
keyboards/keebit/coral/keymaps/default/keymap.c View File

@ -0,0 +1,99 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
// Thumb Keys
#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,
_LOWER,
_RAISE,
_ADJUST,
};
enum coral_keycodes {
KC_QWRTY = SAFE_RANGE,
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
),
[_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, _______,
_______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______
),
[_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, _______,
_______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______
),
[_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,
_______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______
)
};
#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(_______, _______), ENCODER_CCW_CW(_______, _______) },
[_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) {
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;
}
return true;
}

+ 1
- 0
keyboards/keebit/coral/keymaps/default/rules.mk View File

@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes

+ 29
- 0
keyboards/keebit/coral/readme.md View File

@ -0,0 +1,29 @@
# Coral | Split Keyboard
![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_
- 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):
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**:
- 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

+ 1
- 0
keyboards/keebit/coral/rules.mk View File

@ -0,0 +1 @@
SERIAL_DRIVER = vendor

Loading…
Cancel
Save