Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cKeys theDora Refactor #14495

Merged
merged 7 commits into from
Sep 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions keyboards/ckeys/thedora/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
"url": "https://ckeys.org/slides/exboard",
"maintainer": "brandenbyers",
"layouts": {
"LAYOUT_ortho_4x5": {
"LAYOUT": {
"layout": [
{"label":"k00", "x":1, "y":0},
{"label":"k01", "x":2, "y":0},
{"label":"k02", "x":3, "y":0},
{"label":"k03", "x":4, "y":0},
{"label":"k04", "x":5, "y":0},
{"label":"k05 (Rotary Push)", "x":0, "y":3},

{"label":"k06", "x":1, "y":1},
{"label":"k07", "x":2, "y":1},
{"label":"k08", "x":3, "y":1},
{"label":"k09", "x":4, "y":1},
{"label":"k10", "x":5, "y":1},
{"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":"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":"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":"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}
{"label":"k05 (Rotary Push)", "x":0, "y":3},
{"label":"k30", "x":1, "y":3},
{"label":"k31", "x":2, "y":3},
{"label":"k32", "x":3, "y":3},
{"label":"k33", "x":4, "y":3},
{"label":"k34", "x":5, "y":3}
]
}
}
Expand Down
3 changes: 0 additions & 3 deletions keyboards/ckeys/thedora/keymaps/default/config.h

This file was deleted.

278 changes: 147 additions & 131 deletions keyboards/ckeys/thedora/keymaps/default/keymap.c

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion keyboards/ckeys/thedora/keymaps/default/readme.md

This file was deleted.

6 changes: 3 additions & 3 deletions keyboards/ckeys/thedora/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers)
Hardware Supported: theDora
Hardware Availability: [cKeys.org](https://ckeys.org)
* Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers)
* Hardware Supported: theDora
* Hardware Availability: [cKeys.org](https://ckeys.org)

Make example for this keyboard (after setting up your build environment):

Expand Down
23 changes: 13 additions & 10 deletions keyboards/ckeys/thedora/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ BOARD = QMK_PROTON_C
BOOTLOADER = stm32-dfu

# Build Options
# comment out to disable the options.
# change yes to no to disable
#
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = yes
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# 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
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output

MIDI_ENABLE = yes # MIDI support
RGBLIGHT_ENABLE = no
ENCODER_ENABLE = yes
30 changes: 30 additions & 0 deletions keyboards/ckeys/thedora/thedora.c
Original file line number Diff line number Diff line change
@@ -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"

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;
}
38 changes: 27 additions & 11 deletions keyboards/ckeys/thedora/thedora.h
Original file line number Diff line number Diff line change
@@ -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

#include "quantum.h"

#define XXX KC_NO

// 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 arguements
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, \
k06, k07, k08, k09, k10, \
k11, k12, k13, k14, k15, \
k16, k17, k18, k19, k20 \
k00, k01, k02, k03, k04, \
k10, k11, k12, k13, k14, \
k20, k21, k22, k23, k24, \
k05, k30, k31, k32, k33, k34 \
) \
{ \
{ k00, k01, k02, k03, k04, k05, }, \
{ k06, k07, k08, k09, k10 }, \
{ k11, k12, k13, k14, k15 }, \
{ k16, k17, k18, k19, k20 } \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, XXX }, \
{ k20, k21, k22, k23, k24, XXX }, \
{ k30, k31, k32, k33, k34, XXX } \
}