From c05bf934931042d5b461708770fe9eaaf380fa34 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 7 Aug 2018 17:30:29 -0700 Subject: [PATCH] Audio and RGB support for clueboard 66% hotswap --- keyboards/clueboard/66_hotswap/config.h | 9 ++--- keyboards/clueboard/66_hotswap/gen1/config.h | 4 ++- keyboards/clueboard/66_hotswap/gen1/rules.mk | 2 +- .../66_hotswap/keymaps/default/keymap.c | 2 +- .../66_hotswap/keymaps/skully/config.h | 10 ++++++ .../66_hotswap/keymaps/skully/keymap.c | 35 +++++++++++++++++++ .../66_hotswap/keymaps/skully/readme.md | 11 ++++++ .../66_hotswap/keymaps/skully/rules.mk | 1 + keyboards/clueboard/66_hotswap/rules.mk | 23 ++++++------ 9 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 keyboards/clueboard/66_hotswap/keymaps/skully/config.h create mode 100644 keyboards/clueboard/66_hotswap/keymaps/skully/keymap.c create mode 100644 keyboards/clueboard/66_hotswap/keymaps/skully/readme.md create mode 100644 keyboards/clueboard/66_hotswap/keymaps/skully/rules.mk diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index 59a0abc7f5..deb4db687b 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -47,17 +47,12 @@ along with this program. If not, see . * 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 NO_ACTION_MACRO +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION #endif diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index d8163f5383..2b9a7b2479 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -26,7 +26,9 @@ /* Speaker configuration */ -//#define SPEAKER_PIN B7 // FIXME: find the correct name for this define +#define B7_AUDIO +#define NO_MUSIC_MODE +#define AUDIO_CLICKY /* Backlight configuration */ diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk index 54a2685bf6..bd518d8f27 100644 --- a/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -1 +1 @@ -BACKLIGHT_ENABLE = yes \ No newline at end of file +BACKLIGHT_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c index 240eb0e970..ae80de256e 100644 --- a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c +++ b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_CL] = LAYOUT( BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + CK_TOGG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______,MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,MO(_FL),_______, RGB_SAI, \ _______,_______,_______, RGB_MOD,RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), diff --git a/keyboards/clueboard/66_hotswap/keymaps/skully/config.h b/keyboards/clueboard/66_hotswap/keymaps/skully/config.h new file mode 100644 index 0000000000..719cb8c381 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/keymaps/skully/config.h @@ -0,0 +1,10 @@ +#pragma once + +#define AUDIO_CLICKY_ON +#define AUDIO_CLICKY_FREQ_DEFAULT 261.63f +#define AUDIO_CLICKY_FREQ_MIN 65.41f +#define AUDIO_CLICKY_FREQ_MAX 1046.5f +//#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f +//#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e +#define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio +#define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f diff --git a/keyboards/clueboard/66_hotswap/keymaps/skully/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/skully/keymap.c new file mode 100644 index 0000000000..25c41b4c18 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/keymaps/skully/keymap.c @@ -0,0 +1,35 @@ +#include "66_hotswap.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT_66_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + 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_RBRC, KC_BSLS, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + MO(_FL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT_66_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, BL_STEP, + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT), S(KC_ENT), + MO(_FL), S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH), KC_RSFT, KC_PGUP, + KC_LCTL, KC_LALT, KC_LGUI, S(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT_66_ansi( + BL_STEP, RGB_M_P, RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + CK_TOGG, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + MO(_FL), _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), RGB_SAI, + _______, _______, _______, RGB_MOD, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66_hotswap/keymaps/skully/readme.md b/keyboards/clueboard/66_hotswap/keymaps/skully/readme.md new file mode 100644 index 0000000000..b9ad1b09a9 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/keymaps/skully/readme.md @@ -0,0 +1,11 @@ +![Clueboard Layout Image](http://i.imgur.com/VaoGn3M.png) + +# skullY's Clueboard Layout + +This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. + +I've made the following changes from the default layout: + +* shift_fn on left shift +* Change capslock to control +* Swap Alt and Cmd diff --git a/keyboards/clueboard/66_hotswap/keymaps/skully/rules.mk b/keyboards/clueboard/66_hotswap/keymaps/skully/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/clueboard/66_hotswap/keymaps/skully/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/rules.mk b/keyboards/clueboard/66_hotswap/rules.mk index 1a22696e48..ed44d33aa0 100644 --- a/keyboards/clueboard/66_hotswap/rules.mk +++ b/keyboards/clueboard/66_hotswap/rules.mk @@ -1,4 +1,5 @@ DEFAULT_FOLDER = clueboard/66_hotswap/gen1 +EXTRAFLAGS += -flto LAYOUTS = 66_ansi MCU = atmega32u4 F_CPU = 16000000 @@ -10,14 +11,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = no +NKRO_ENABLE = yes +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = yes +MIDI_ENABLE = no +UNICODE_ENABLE = no +BLUETOOTH_ENABLE = no