Skip to content

Commit

Permalink
Clueboard refresh (qmk#4902)
Browse files Browse the repository at this point in the history
* Cluecard: refactor

- renamed layout macro KEYMAP to LAYOUT
- reformatted layout macro to more closely resemble physical device layout
- keymaps now use #include QMK_KEYBOARD_H
- config.h files updated to use #pragma once method
- deleted outdated QUANTUM_DIR code blocks from rules.mk files
- white space changes on rules.mk files (alignment/readability)

* Cluecard: Configurator support

* Cluecard: readme update

- added image
- updated Docs links

* Clueboard 66% HotSwap: corrected matrix and Configurator data

- removed k31 and k84 from LAYOUT
  - both appear to be unsupported for this PCB according to images on clueboard.co
  - updated block comment mock-ups to match changes
- rebuilt info.json file
- delete removed keys from default keymap.c

* Clueboard 66% HotSwap: readme update

- fix make example
- updated Docs links

* Clueboard 66% HotSwap: 66_ansi keymap update

Updated to use #include QMK_KEYBOARD_H

* Clueboard 60% refactor

- renamed layout macro KEYMAP to LAYOUT_all
- renamed layout macro KEYMAP_AEK to LAYOUT_aek
- removed redundant KC_TRNS definitions from keymaps
- all keymaps now use #include QMK_KEYBOARD_H

* Clueboard 17%: refactor

* Clueboard 17%: Configurator support

* Clueboard 17%: update Docs links in readme

* Cleanup the 2x1800 files

* Update Clueboard 60% to standard matrix

* Update the clueboard default keymaps

* Refresh and update clueboard 17

* Add the 66% hotswap to Clueboard's readme

* Clarify the 66% hotswap's readme

* change the image to imgur

* Update the clueboard 66 to follow modern standards

* update clueboard 66_hotswap to follow modern practices

* Move the logo to imgur

* update clueboard/card to follow modern practices

* remove clueboard/66 as a valid make target

* Address comments in qmk#4902

* fix user keymaps after the changes
  • Loading branch information
skullydazed authored Jan 23, 2019
1 parent 9667c10 commit d1f735b
Show file tree
Hide file tree
Showing 101 changed files with 583 additions and 4,094 deletions.
9 changes: 3 additions & 6 deletions keyboards/clueboard/17/17.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ void matrix_init_kb(void) {
MCUCR |= (1<<JTD);
};

void led_set_kb(uint8_t usb_led)
{
void led_set_kb(uint8_t usb_led) {
print("led_set\n");
}

void backlight_init_ports(void)
{
void backlight_init_ports(void) {
// Set C7 to output
DDRC |= (1<<7);

Expand All @@ -29,8 +27,7 @@ void backlight_init_ports(void)
TCCR4B = 0b00000001;
}

void backlight_set(uint8_t level)
{
void backlight_set(uint8_t level) {
// Determine the PWM level
switch (level)
{
Expand Down
23 changes: 13 additions & 10 deletions keyboards/clueboard/17/17.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
#define LAYOUT_numpad_5x4( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, \
k30, k31, k32, k33, \
k40, k42 \
k10, k11, k12, \
k20, k21, k22, k13, \
k30, k31, k32, \
k40, k42, k33 \
) { \
{ k00, k01, k02, k03, }, \
{ k10, k11, k12, k13, }, \
{ k20, k21, k22, KC_NO, }, \
{ k30, k31, k32, k33, }, \
{ k40, KC_NO, k42, KC_NO } \
{ k00, k01, k02, k03 }, \
{ k10, k11, k12, k13 }, \
{ k20, k21, k22, KC_NO }, \
{ k30, k31, k32, k33 }, \
{ k40, KC_NO, k42, KC_NO } \
}

#define LAYOUT LAYOUT_numpad_5x4
#define KEYMAP LAYOUT_numpad_5x4

#endif
31 changes: 31 additions & 0 deletions keyboards/clueboard/17/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"keyboard_name": "Clueboard 17% (Cluepad)",
"keyboard_folder": "clueboard/17",
"url": "",
"maintainer": "qmk",
"width": 4,
"height": 5,
"layouts": {
"LAYOUT_numpad_5x4": {
"layout": [
{"label":"Num Lock", "x":0, "y":0},
{"label":"/", "x":1, "y":0},
{"label":"*", "x":2, "y":0},
{"label":"-", "x":3, "y":0},
{"label":"7", "x":0, "y":1},
{"label":"8", "x":1, "y":1},
{"label":"9", "x":2, "y":1},
{"label":"4", "x":0, "y":2},
{"label":"5", "x":1, "y":2},
{"label":"6", "x":2, "y":2},
{"label":"+", "x":3, "y":1, "h":2},
{"label":"1", "x":0, "y":3},
{"label":"2", "x":1, "y":3},
{"label":"3", "x":2, "y":3},
{"label":"0", "x":0, "y":4, "w":2},
{"label":".", "x":2, "y":4},
{"label":"Enter", "x":3, "y":3, "h":2}
]
}
}
}
31 changes: 15 additions & 16 deletions keyboards/clueboard/17/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "17.h"

#include "backlight.h"
#include QMK_KEYBOARD_H

// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _RS 2

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
Expand All @@ -24,12 +21,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | 0| .| Ent|
* '-------------------'
*/
[_BL] = KEYMAP(
LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_PDOT),
[_BL] = LAYOUT_numpad_5x4(
LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, \
KC_P0, KC_PDOT, KC_PENT \
),

/* Keymap _FL: Function Layer
* .-------------------.
Expand All @@ -44,10 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn1| | Fn7|
* '-------------------'
*/
[_FL] = KEYMAP(
LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, RGB_TOG, \
KC_TRNS, RGB_SAI, KC_TRNS, RGB_VAI, \
RGB_HUD, BL_STEP, RGB_HUI, \
KC_TRNS, RGB_SAD, KC_TRNS, RGB_VAD, \
RGB_MOD, KC_TRNS)
[_FL] = LAYOUT_numpad_5x4(
LT(_FL, KC_NLCK), _______, _______, RGB_TOG, \
_______, RGB_SAI, _______, \
RGB_HUD, BL_STEP, RGB_HUI, RGB_VAI, \
_______, RGB_SAD, _______, \
RGB_MOD, _______, RGB_VAD \
)
};
4 changes: 2 additions & 2 deletions keyboards/clueboard/17/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Clueboard 17% (Formerly Cluepad)

![Clueboard 17%](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w)
![Clueboard 17%](https://i.imgur.com/3XBC5c0.jpg)

A basic 17 key numpad PCB.

Expand All @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment):

make clueboard/17:default

See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
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).
25 changes: 10 additions & 15 deletions keyboards/clueboard/17/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

# MCU name
#MCU = at90usb1287
MCU = atmega32u4

# Processor frequency.
Expand Down Expand Up @@ -50,16 +48,13 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096


# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
# EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
# CONSOLE_ENABLE = yes # Console for debug(+400)
# COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality
RGBLIGHT_ENABLE = yes
# MIDI_ENABLE = YES # MIDI controls
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
15 changes: 5 additions & 10 deletions keyboards/clueboard/2x1800/2x1800.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ void matrix_init_kb(void) {
DDRB |= (1<<5); // Capslock
DDRB |= (1<<6); // Scroll Lock

// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);

// Run the keymap level init
matrix_init_user();
}
Expand All @@ -38,25 +34,24 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}

void led_set_kb(uint8_t usb_led) {
// Toggle numlock as needed
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// Turn numlock on
PORTB |= (1<<4);
} else {
// Turn numlock off
PORTB &= ~(1<<4);
}

// Toggle capslock as needed
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTB |= (1<<5);
} else {
// Turn capslock off
PORTB &= ~(1<<5);
}

// Toggle scrolllock as needed
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
// Turn scroll lock on
PORTB |= (1<<6);
} else {
// Turn scroll lock off
PORTB &= ~(1<<6);
}
}
4 changes: 3 additions & 1 deletion keyboards/clueboard/2x1800/2x1800.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
#define LAYOUT_all( \
k00, k01, k02, k03, k04, k06, k07, k08, k09, k0a, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a, \
Expand Down Expand Up @@ -90,4 +90,6 @@
{ kb0, KC_NO, KC_NO, KC_NO, kb4, kb5, kb6, kb7, kb8, kb9, KC_NO } \
}

#define LAYOUT LAYOUT_all

#endif
1 change: 1 addition & 0 deletions keyboards/clueboard/2x1800/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* audio support */
#define B7_AUDIO
#define C4_AUDIO
#define AUDIO_CLICKY

/* number of backlight levels */
// #define BACKLIGHT_PIN B7
Expand Down
Loading

0 comments on commit d1f735b

Please sign in to comment.