1
0
Fork 0

cKeys theDora Refactor (#14495)

This commit is contained in:
James Young 2021-09-19 18:52:54 +00:00 committed by GitHub
parent 4e7801d4fb
commit 53c2f67748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 239 additions and 178 deletions

View file

@ -3,32 +3,32 @@
"url": "https://ckeys.org/slides/exboard", "url": "https://ckeys.org/slides/exboard",
"maintainer": "brandenbyers", "maintainer": "brandenbyers",
"layouts": { "layouts": {
"LAYOUT_ortho_4x5": { "LAYOUT": {
"layout": [ "layout": [
{"label":"k00", "x":1, "y":0}, {"label":"k00", "x":1, "y":0},
{"label":"k01", "x":2, "y":0}, {"label":"k01", "x":2, "y":0},
{"label":"k02", "x":3, "y":0}, {"label":"k02", "x":3, "y":0},
{"label":"k03", "x":4, "y":0}, {"label":"k03", "x":4, "y":0},
{"label":"k04", "x":5, "y":0}, {"label":"k04", "x":5, "y":0},
{"label":"k10", "x":1, "y":1},
{"label":"k11", "x":2, "y":1},
{"label":"k12", "x":3, "y":1},
{"label":"k13", "x":4, "y":1},
{"label":"k14", "x":5, "y":1},
{"label":"k20", "x":1, "y":2},
{"label":"k21", "x":2, "y":2},
{"label":"k22", "x":3, "y":2},
{"label":"k23", "x":4, "y":2},
{"label":"k24", "x":5, "y":2},
{"label":"k05 (Rotary Push)", "x":0, "y":3}, {"label":"k05 (Rotary Push)", "x":0, "y":3},
{"label":"k30", "x":1, "y":3},
{"label":"k06", "x":1, "y":1}, {"label":"k31", "x":2, "y":3},
{"label":"k07", "x":2, "y":1}, {"label":"k32", "x":3, "y":3},
{"label":"k08", "x":3, "y":1}, {"label":"k33", "x":4, "y":3},
{"label":"k09", "x":4, "y":1}, {"label":"k34", "x":5, "y":3}
{"label":"k10", "x":5, "y":1},
{"label":"k11", "x":1, "y":2},
{"label":"k12", "x":2, "y":2},
{"label":"k13", "x":3, "y":2},
{"label":"k14", "x":4, "y":2},
{"label":"k15", "x":5, "y":2},
{"label":"k16", "x":1, "y":3},
{"label":"k17", "x":2, "y":3},
{"label":"k18", "x":3, "y":3},
{"label":"k19", "x":4, "y":3},
{"label":"k20", "x":5, "y":3}
] ]
} }
} }

View file

@ -1,3 +0,0 @@
#pragma once
// Add overrides here

View file

@ -1,3 +1,19 @@
/* Copyright 2019 Branden Byers (@brandenbyers)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum layers { enum layers {
@ -13,13 +29,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ // ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │ // │ │ │ │ │ │
// │ 7 │ 8 │ 9 │ / │ ADMIN │ // │ 7 │ 8 │ 9 │ / │ ADMIN │
// ROTORY │ │ │ │ │ │ // ROTARY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// VOL UP │ │ │ │ │ │ // PAGE DOWN│ │ │ │ │ │
// │ 4 │ 5 │ 6 │ * │ MOUSE │ // │ 4 │ 5 │ 6 │ * │ MOUSE │
// ROTORY │ │ │ │ │ │ // ROTARY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// VOL DOWN │ │ │ │ │ │ // PAGE UP │ │ │ │ │ │
// │ 1 │ 2 │ 3 │ - │ MIDI │ // │ 1 │ 2 │ 3 │ - │ MIDI │
// │ │ │ │ │ │ // │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ // ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
@ -29,23 +45,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ // └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_BASE] = LAYOUT( [_BASE] = LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9, KC_PSLS, MO(_ADMIN), MU_TOG, KC_P7, KC_P8 , KC_P9 , KC_PSLS, MO(_ADMIN),
KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, TG(_MOUSE), KC_P4, KC_P5 , KC_P6 , KC_PAST, TG(_MOUSE),
KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, TG(_MIDI), KC_P1, KC_P2 , KC_P3 , KC_PMNS, TG(_MIDI),
KC_KP_0, KC_KP_DOT, KC_KP_EQUAL, KC_PPLS, MO(_MUSIC) MU_TOG, KC_P0, KC_PDOT, KC_PEQL, KC_PPLS, MO(_MUSIC)
), ),
// MUSIC LAYER // MUSIC LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ // ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │ // │ │ │ │ │ │
// │ │ │ │ │ │ // │ │ │ │ │ │
// ROTORY │ │ │ │ │ │ // ROTARY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ │ │ │ │ │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │ // PAGE DOWN│ │ │ │ │ │
// │ │ │ │ │ │
// ROTARY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ │ │ │ MODE │ │ // │ │ │ │ MODE │ │
// │ │ │ │ │ │ // │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ // ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
@ -55,23 +71,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ // └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MUSIC] = LAYOUT( [_MUSIC] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, MU_MOD, _______, _______, _______, _______, MU_MOD,
KC_LCTL, KC_LALT, _______, KC_LGUI, _______ _______, KC_LCTL, KC_LALT, _______, KC_LGUI, _______
), ),
// MIDI LAYER // MIDI LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ // ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │ // │ │ │ │ │ │
// │ D♯ │ E │ F │ F♯ │ G │ // │ D♯ │ E │ F │ F♯ │ G │
// ROTORY │ │ │ │ │ │ // ROTARY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ A♯ │ B │ C │ C♯ │ D │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │ // PAGE DOWN│ │ │ │ │ │
// │ A♯ │ B │ C │ C♯ │ D │
// ROTARY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ F │ F♯ │ G │ G♯ │ A │ // │ F │ F♯ │ G │ G♯ │ A │
// │ │ │ │ │ │ // │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ // ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
@ -81,21 +97,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ // └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MIDI] = LAYOUT( [_MIDI] = LAYOUT(
MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, _______, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3,
MI_As_2, MI_B_2, MI_C_3, MI_Cs_3, MI_D_3, MI_As_2, MI_B_2, MI_C_3, MI_Cs_3, MI_D_3,
MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, TG(_MIDI), MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, TG(_MIDI),
MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2 _______, MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2
), ),
// MOUSE LAYER // MOUSE LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ // ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │ // │ │ │ │ │ │
// │ BTN 5 │ │ WHEEL │ │ │ // │ BTN 5 │ │ WHEEL │ │ │
// ROTORY │ │ │ UP │ │ │ // ROTARY │ │ │ UP │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │ // PAGE DOWN│ │ │ │ │ │
// │ │ LEFT │ MOUSE │ RIGHT │ │ // │ │ LEFT │ MOUSE │ RIGHT │ │
// ROTORY │ │ CLICK │ UP │ CLICK │ │ // ROTARY │ │ CLICK │ UP │ CLICK │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │ // PAGE UP │ │ │ │ │ │
// │ BTN 4 │ MOUSE │ MOUSE │ MOUSE │ │ // │ BTN 4 │ MOUSE │ MOUSE │ MOUSE │ │
@ -107,23 +123,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ // └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MOUSE] = LAYOUT( [_MOUSE] = LAYOUT(
KC_MS_BTN5, _______, KC_MS_WH_UP, _______, _______, _______, KC_BTN5, _______, KC_WH_U, _______, _______,
_______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, TG(_MOUSE), _______, KC_BTN1, KC_MS_U, KC_BTN2, TG(_MOUSE),
KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, _______,
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, _______ _______, KC_BTN3, KC_WH_L, KC_WH_D, KC_WH_R, _______
), ),
// ADMIN LAYER // ADMIN LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐ // ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │ // │ │ │ │ │ │
// │ RESET │ │ │ │ │ // │ RESET │ │ │ │ │
// ROTORY │ │ │ │ │ │ // ROTARY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤ // RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ 4 │ 5 │ 6 │ * │ │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │ // PAGE DOWN│ │ │ │ │ │
// │ 4 │ 5 │ 6 │ * │ │
// ROTARY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ 1 │ 2 │ 3 │ │ │ // │ 1 │ 2 │ 3 │ │ │
// │ │ │ │ │ │ // │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ // ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
@ -133,10 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ // └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_ADMIN] = LAYOUT( [_ADMIN] = LAYOUT(
RESET, _______, _______, _______, TG(_ADMIN), _______, RESET, _______, _______, _______, TG(_ADMIN),
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
), ),
}; };

View file

@ -1 +0,0 @@
# The default keymap for the cKeys Handwire 101 4x4 keyboard.

View file

@ -4,9 +4,9 @@
A 4x5 keyboard with rotary encoder, QWIIC connector, and header pinouts for easy access to all pins on the Proton C. This keyboard was built for QMK exploration big and small. What will you discover next? A 4x5 keyboard with rotary encoder, QWIIC connector, and header pinouts for easy access to all pins on the Proton C. This keyboard was built for QMK exploration big and small. What will you discover next?
Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers) * Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers)
Hardware Supported: theDora * Hardware Supported: theDora
Hardware Availability: [cKeys.org](https://ckeys.org) * Hardware Availability: [cKeys.org](https://ckeys.org)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):

View file

@ -6,17 +6,20 @@ BOARD = QMK_PROTON_C
BOOTLOADER = stm32-dfu BOOTLOADER = stm32-dfu
# Build Options # Build Options
# comment out to disable the options. # change yes to no to disable
# #
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = yes BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
MIDI_ENABLE = yes # MIDI support MIDI_ENABLE = yes # MIDI support
RGBLIGHT_ENABLE = no
ENCODER_ENABLE = yes ENCODER_ENABLE = yes

View file

@ -1 +1,31 @@
/* Copyright 2019 Branden Byers (@brandenbyers)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "thedora.h" #include "thedora.h"
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return true;
}

View file

@ -1,21 +1,37 @@
/* Copyright 2019 Branden Byers (@brandenbyers)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
#include "quantum.h" #include "quantum.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout. // This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout // The first section contains all of the arguments
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array // The second converts the arguments into a two-dimensional array
#define LAYOUT( \ #define LAYOUT( \
k00, k01, k02, k03, k04, k05, \ k00, k01, k02, k03, k04, \
k06, k07, k08, k09, k10, \ k10, k11, k12, k13, k14, \
k11, k12, k13, k14, k15, \ k20, k21, k22, k23, k24, \
k16, k17, k18, k19, k20 \ k05, k30, k31, k32, k33, k34 \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05, }, \ { k00, k01, k02, k03, k04, k05 }, \
{ k06, k07, k08, k09, k10 }, \ { k10, k11, k12, k13, k14, XXX }, \
{ k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, XXX }, \
{ k16, k17, k18, k19, k20 } \ { k30, k31, k32, k33, k34, XXX } \
} }